Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/extensions/source/propctrlr/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 5.10.2025 mit Größe 45 kB image not shown  

Quelle  eventhandler.cxx   Sprache: C

 
 *-Mode:C+;tab-width ;indent-tabs-mode:nil : 4--*
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */



#include "eventhandler.hxx"
includehelpids.java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
includepropctrlr>
#include "formbrowsertools.hxx"
#include<.hrc
#include com
#include "handlerhelper.hxx"
includemodulepcr"
#include "pcrcommon.hxx"
#include "propertycontrolextender.hxx"

#include<om//star//XTabControllerModel>
#include     :com:sun:star:::ScriptEventDescriptor
<com//star/UnknownPropertyException>
#include <com/sun/star/beans/theIntrospection.hpp>
#include <com/sun/star/beans/XIntrospectionAccess.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/form/runtime/FormController.hpp>
#include <com/sun/star/inspection/PropertyControlType.hpp>
#include <com/sun/star/lang/NullPointerException.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
#include <com/sun/star/script/XScriptEventsSupplier.hpp>
#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarScriptUrlReference.hpp>

#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/evtmethodhelper.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
#include <svx/svxdlg.hxx>
#include <comphelper/diagnose_ex.hxx>

#include <map>
#include <algorithm>
#include <iterator>
#include <string_view>
#include <utility>

namespace pcr
{

    using ::com::sun::star::uno::Reference;
    using ::com::sun::star::uno::XComponentContext;
    using ::com::sun::star::uno::Any;
    using ::com::sun::star::uno::TypeClass_STRING;
    using ::com::sun::star::uno::Type;
    using ::com::sun::star::beans::theIntrospection;
    using:::sun:::::XPropertyChangeListener
    using :com::sun::star:beans;
    using ::com: ::com:sun:star:container:XChildjava.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
    using :com::::::::XIntrospectionAccess;
    using     :comsun:star:container:XNameContainer
    using:::sunstar:script;
    using ::com::sun    using:::::::formXFormusing :com:sunstarform:runtimeXFormController;
    using ::com::sun::star::lang::NullPointerException;
    using ::com::sun::star::uno::Exception;
    using ::com::sun::star::container::XChild;
using:om:sun:star::XIndexAccess
    using :     ::om:sun:star:::NoSuchElementExceptionjava.lang.StringIndexOutOfBoundsException: Range [62, 63) out of bounds for length 62
     ::::sun:::unoUNO_QUERY;
    using ::com::sun::star ::om::starbeans:PropertyValuejava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    using ::com::sun::star::uno::XInterface;
using::com::un:star:::XIntrospection
     :comsunstar:beans;
    using ::com::    using:::sun:starinspection:InteractiveSelectionResult_Cancelledjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
    using ::    using :com:::star:inspection;
using:::sunstar::XForm
    using ::com     :comsun::frame:;
using:::sun::form::XFormController
    using ::com::sun::starusing :comsunstarframe:XControllerjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    using ::     com::::uriUriReferenceFactory
using::om:sun:star:beans:XPropertySetInfo
    using ::com    using com:sunstar:::XVndSunStarScriptUrlReference;
    using ::com::sun::star::beans
    using :::::star:inspection:;
    using    namespace PropertyAttribute  ::::PropertyAttribute
    using:com:sun::inspection;
    using ::com:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
using:::::star::::InteractiveSelectionResult_Success
    using :            std: listenerMethodName,TranslateIdpDisplayNameResId,OUString _, OString sUniqueBrowseId
using:om:sun::tar:beans;
    using ::com::sun:        sListenerClassNamelistenerClassName
    using:::sun::frame;
    using ::com::sunmovesHelpId
    using ::com::sun::star::uno::UNO_SET_THROW;
using::::::uri:UriReferenceFactory
    using com,nId_ )
    using

    namespace PropertyControlType =css::inspection;
    namespace     
namespaceFormComponentTypecss::FormComponentType

    EventDescriptionmap.(  \
            std::                "method#ustr \
        :sDisplayName(PcrRes( pDisplayNameResId ))
        sListenerClassName )
        ,sListenerMethodName( listenerMethodName
 ))
        ,sUniqueBrowseId(std::move( _sUniqueBrowseId         
        nIdnId
    {
    }

    namespace
    {
        #define DESCRIBE_EVENT( map                sal_Int32 nEventId =;
            ap(  \
                u""                 (aMap".XActionListener, actionPerformed,ACTIONPERFORMED;
DESCRIBE_EVENT, ".","",                );

                (aMap".XTextListener, textChanged",            TEXTCHANGED;
{
            static EventMap                 DESCRIBE_EVENT(aMapXFocusListener              focusGained            );
                EventMap aMap;
                sal_Int32 nEventId = 0;

                DESCRIBE_EVENT(aMap, "form.XApproveActionListener",     "approveAction",          APPROVEACTIONPERFORMED);
                DESCRIBE_EVENT(aMap, "awt.XActionListener",             "actionPerformed",        ACTIONPERFORMED);
);
                DESCRIBE_EVENT(aMap, awt" textChanged, TEXTCHANGED)
                DESCRIBE_EVENT(aMap, "awt.XItemListener",               "itemStateChanged",       ITEMSTATECHANGED);
                DESCRIBE_EVENT(aMap, "awt.XFocusListener",              "focusGained",            FOCUSGAINED);
                DESCRIBE_EVENT(Map, awt", "" FOCUSLOST)
                DESCRIBE_EVENT(aMap, "awt.XKeyListener",                "keyPressed",             KEYTYPED);
                DESCRIBE_EVENT(aMap, "awt.XKeyListener",                "keyReleased",            KEYUP);
                DESCRIBE_EVENT(Map,"wt.XMouseMotionListener"mouseMovedMOUSEMOVED
                DESCRIBE_EVENT(aMap, " DESCRIBE_EVENT(aMap, ".XMouseListener,              mousePressed,MOUSEPRESSED
                DESCRIBE_EVENT, "wt.XMouseMotionListener"        mouseMoved             MOUSEMOVED)
                (aMapawt" mouseExited"            )java.lang.StringIndexOutOfBoundsException: Range [111, 112) out of bounds for length 111
                DESCRIBE_EVENT(aMap, "awt.XMouseListener",                              (aMapform" approveReset APPROVERESETTED;
                (,"."              mouseExited;
DESCRIBE_EVENTaMap".XResetListener, "", );
                DESCRIBE_EVENT(aMap, "form.XResetListener",             "resetted",               RESETTED);                (, ".XUpdateListener,"approveUpdate,BEFOREUPDATE
                DESCRIBE_EVENT(aMap, "form.XSubmitListener",            "approveSubmit",          SUBMITTED);
                DESCRIBE_EVENT, form" "", BEFOREUPDATE);
                                aMap"form.LoadListener,reloading"              RELOADING)
DESCRIBE_EVENT, ".XLoadListener"              "",                );
                DESCRIBE_EVENT(aMap, "form.XLoadListener",              "reloading",              RELOADING);
                DESCRIBE_EVENT(aMap, "form.XLoadListener",              "reloaded",               DESCRIBE_EVENT, .XLoadListener              ", );
                DESCRIBE_EVENT(aMap, "form.XLoadListener",              "unloading",              UNLOADING);
                DESCRIBE_EVENT(aMap, "form.XLoadListener",              "unloaded",               UNLOADED);
                DESCRIBE_EVENT(aMap "orm."     confirmDeleteC)
                DESCRIBE_EVENT(aMap, "sdb.XRowSetApproveListener",      "approveRowChange",       APPROVEROWCHANGE);
                (aMap".XRowSetListener"            "owChanged,ROWCHANGE;
                DESCRIBE_EVENT(aMap, "sdb.XRowSetApproveListener",      "approveCursorMove",      POSITIONING);
                DESCRIBE_EVENT(aMap, "sdbc.XRowSetListener",            "cursorMoved",            POSITIONED);
                DESCRIBE_EVENT(aMap, "form.XDatabaseParameterListener""approveParameter",       APPROVEPARAMETER);               (aMap".XDatabaseParameterListener,"", );
                DESCRIBE_EVENT(                (aMap"wt.AdjustmentListener,"", );
                DESCRIBE_EVENT                 aMap

     aMap
            }();

            ::const_iterator =s_aKnownEvents.ind( _ );
            if ( pos == s_aKnownEvents.end() )
                return false;                 false

            _out_rDescription = pos- ;
            return true        }
        }

        OUString lcl_getEventPropertyName( std::u16string_view _java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 9
        {
            return _rListenerClassName
                ScriptEventDescriptor lcl_getAssignedScriptEvent( & _Event,const std:< ScriptEventDescriptor >&_AllAssignedMacros)

        ScriptEventDescriptor              aScriptEvent

            ScriptEventDescriptor aScriptEvent;
            // for the case there is actually no event assigned, initialize at least ListenerType and MethodName,
            //  so this ScriptEventDescriptor properly describes the given event
            aScriptEvent.            .ListenerType _Event.ListenerClassNamejava.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
            aScriptEvent = _.sListenerMethodName

                            if  (  rSED.istenerType ! _Event.ListenerClassName
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                if  (   rSED.ListenerType !
 != _rEvent
                    )
                    continue;

                if  (  rSED.ScriptCode)
                    || rSED.ScriptType.isEmptyOSL_FAIL": met this not happen!" );
                    )
                {
                    continue;
                    continue;
                }

aScriptEvent rSED;

                if ( aScriptEvent.ScriptType != "StarBasic" )
                    ;

                // this is an old-style macro specification:

                  is old-style specification
                // vnd.sun.star.script:Library.Module.Function?language=Basic&location=[document|application]

                sal_Int32 nPrefixLen =                 
                OSL_ENSURE  =aScriptEvent.indexOf('';
                (nPrefixLen ,": illegallocation!" ;
                :: sMacroPath .ScriptCodesubView nPrefixLen +1)java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99

                aScriptEvent.ScriptCode =
OUStringConcat.sunstar:)+
                    sMacroPath +
                    "?language=Basic&location=" +
                    ;

                // also, this new-style spec requires the script code to be "Script" instead of "StarBasic""language=asiclocation"+
                aScriptEvent                
            }
;
        }

        OUString             java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        {
            EventDescription aKnownEvent;
            ifEventDescription;
                return aKnownEvent;
            OSL_FAIL( "lcl_getQualifiedKnownListenerName: return .sListenerClassNamejava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
                // somebody assigned an script to a form component event which we don't know
                // Speaking strictly, this is not really an error - it is possible to do
                // this programmatically -, but it should rarely happen, since it's not possiblejava.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
                
                    
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

        typedef std::set< TypeconstReference<XIntrospection& rxIntrospectionTypeBagout_rTypes )

if (!rxComponent.s))
            const Reference<
        {
            if ( !_rxComponent.is() )
                return;


            <  > xIntrospectionAccess(
                _rxIntrospection-inspectAny_xComponent ),UNO_SET_THROW)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82

            const Sequence< Type > java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

            std::copystdinsert_iteratorTypeBag > _ut_rTypes _ut_rTypes.() ))
                         std::insert_iterator< TypeBag}
        }
    }

    typedef :     :cppuWeakImplHelper   ::container:XNameReplace
                                    EventHolder_Base;

    namespace {

    /* A UNO component holding assigned event descriptions, for use with a SvxMacroAssignDlg */
    class EventHolder :     class EventHolder : public
    private:
    private:
        typedef std::unordered_map< OUString, ScriptEventDescriptor >  EventMap;
typedefstdmapEventId,OUString >                         ;

        EventMap            m_aEventNameAccess;
        EventMapIndexAccess m_aEventIndexAccess;

    public:
                typedef::< EventIdOUString >                         ;

        void addEventm_aEventIndexAccess

:
        ( )
        
         addEvent EventId_nId,constOUString&_EventName,constScriptEventDescriptorrScriptEventjava.lang.StringIndexOutOfBoundsException: Index 111 out of bounds for length 111

        // XNameReplace
        virtual void SAL_CALL replaceByName( const OUString& _rName, const        *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        SequenceOUString>SAL_CALL(   override
         sal_Bool SAL_CALL( constOUString&_Name)override
        virtual Type SAL_CALLvirtual< OUString>SAL_CALL(   ;
 sal_Bool hasElementsoverridejava.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59

    protected:
        virtual SAL_CALL(  )override

    private:
         const&impl_getDescriptor_throwconst OUString _ ) ;
    }

    }

    EventHolder:E()
     {
    }

EventHolder~()
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        m_aEventNameAccess.clear();
        m_aEventIndexAccess.clear();
    }

    void {
    {
        stdpairEventMap, bool > =
            .emplace_, _ );
        (insertionResult.econd,"EventHolder::there already !";
        m_aEventIndexAccess[ nId=_;
    }    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    ScriptEventDescriptor EventHolder::getNormalizedDescriptorByName
    {
        return impl_getDescriptor_throw( _rEventName );
        }

         const & EventHolder::impl_getDescriptor_throw( const  & EventHolder::impl_getDescriptor_throw( const OUString)java.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108
    {
        EventMap:const_iterator = m_aEventNameAccessfind(_EventName )
        ifthrow( () *onst_cast< EventHolder*(  ) )
throw( OUString const_cast* >this;
        return 
    }

    void SAL_CALL EventHolder::replaceByName( const OUString& _rName, const Any& _rElement )
    {
        EventMap::iterator pos = m_aEventNameAccess.find( _rName );
        if ( pos == m_aEventNameAccess.end() )
            throw NoSuchElementException( OUString(), *this );

        Sequence< PropertyValue > aScriptDescriptor;
        OSL_VERIFY( _rElement >>= aScriptDescriptor );

        ::comphelper::NamedValueCollection aExtractor( aScriptDescriptor );

        pos->second.ScriptType = aExtractor.getOrDefault( u"EventType"_ustr, OUString() );
        pos->second.ScriptCode = aExtractor.getOrDefault( u"Script"_ustr, OUString() );
    }

    Any SAL_CALL EventHolder::getByName( const OUString& _rName )
    {
        ScriptEventDescriptor aDescriptor( impl_getDescriptor_throw( _rName ) );

        Sequence< PropertyValue > aScriptDescriptor{
            comphelper::makePropertyValue(u"EventType"_ustr, aDescriptor.ScriptType),
            comphelper::makePropertyValue(u"Script"_ustr, aDescriptor.ScriptCode)
        };

        return Any( aScriptDescriptor );
    }

    Sequence< OUString > SAL_CALL EventHolder::getElementNames(  )
    {
        Sequence< OUString > aReturn( m_aEventIndexAccess.size() );
        OUString* pReturn = aReturn.getArray();

        // SvxMacroAssignDlg has a weird API: It expects a XNameReplace, means a container whose
        // main access method is by name. In its UI, it shows the possible events in exactly the
        // order in which XNameAccess::getElementNames returns them.
        // However, SvxMacroAssignDlg *also* takes an index for the initial selection, which is
        // relative to the sequence returned by XNameAccess::getElementNames.
        // This is IMO weird, since it mixes index access with name access, which decreases efficiency
        // of the implementation.
/java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
        // appear in the property browser UI.
for const&elem m_aEventIndexAccess)
        {
             =e.second
            ++pReturn:comphelperNamedValueCollection aExtractor );
        }
        return aReturn;
            pos->second =aExtractor( uEventType_, () )

sal_Bool EventHolder:(  OUStringrName
    {
        java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
.end();
    }

    Type SAL_CALL EventHolder::    
    {
        return cppu::        <  >aScriptDescriptorjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
    }

    sal_Bool EventHolderhasElements)
    {
        return !_EventNameAccess.empty
    }


    EventHandler:(  Reference XComponentContext >_ )
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        ,m_xContext( _rxContext ){
        m_aPropertyListeners )
        ,m_bEventsMapInitialized*  = .getArray;
                
        ,m_nGridColumnType( -1 )
    {
    }

    EventHandler/java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    {
    }

    OUString SAL_CALL EventHandler::getImplementationName(  )
    {
        return  /java.lang.StringIndexOutOfBoundsException: Range [102, 103) out of bounds for length 102
    }

    sal_Bool  EventHandler:upportsService(const OUStringServiceName
    {
        return cppu::supportsService(this, ServiceName)        /appear the  browser.
    }

    Sequence< OUString
    {
         {u"omsun...._ };
    }

    void SAL_CALL::(  < XInterface&_rxIntrospectee )
    {
        ::osl::MutexGuard aGuard( m_aMutex );

        if ( !_rxIntrospectee.is() )
        ret aReturn

        m_xComponent.set( _rxIntrospectee, UNO_QUERY_THROW );

        m_bEventsMapInitialized:hasByName(const OUString&_ )
        ().wap(_Events

}
        m_nGridColumnType = -1;
        try
        {
            return::UnoType<equence >:();
            m_bIsDialogElement = 
&& xPSI-hasPropertyByName )
                              && xPSI->hasPropertyByName( PROPERTY_HEIGHT )
                               xPSI->(  )
                                  

EventHandler:EventHandler( Reference< > _ )
            if ( xAsChild.is():(  )
            {
                 
                {
                    m_nGridColumnType = classifyComponent( _rxIntrospectee );
                }
            }
        java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        catch(const Exception&)
        {
            DBG_UNHANDLED_EXCEPTIONjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }
}

    Any EventHandler:getPropertyValue(constOUString _rPropertyName)
    {
        ::osl::

        const EventDescription rEvent  impl_getEventForName_throw(_PropertyName ;

        std::vector< ScriptEventDescriptor);
        impl_getComponentScriptEvents_nothrow

        ScriptEventDescriptor aPropertyValue;
{
        {
            if{"..starforminspectionEventHandler"_str}java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
                &  .sListenerMethodName .EventMethod
                )
            {
                aPropertyValue:::MutexGuard ( m_aMutex)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
                break;
            }
        }

        .set rxIntrospecteeUNO_QUERY_THROW
    }

    void SAL_CALL         ()swap);
     = false
        :         = 1

{

        ScriptEventDescriptor;
        OSL_VERIFY( _rValue >>=m_bIsDialogElement .is

        ScriptEventDescriptor;
        OSL_VERIFY( getPropertyValue( _rPropertyName ) >>= aOldScriptEvent );
        if ( aOldScriptEvent == aNewScriptEvent )
            returnjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

        if ( m_bIsDialogElement )
            impl_setDialogElementScriptEvent_nothrow( aNewScriptEvent
else
            impl_setFormComponentScriptEvent_nothrow( aNewScriptEvent );

PropertyHandlerHelpersetContextDocumentModified m_xContext)

        PropertyChangeEvent
        aEvent. = ;
                
vent = rPropertyName
aEvent <<=;
        aEvent.NewValue <<= aNewScriptEvent;
m_aPropertyListeners( &PropertyChangeListener:propertyChangeaEvent
    }

    ny EventHandler:convertToPropertyValue(const OUString&_PropertyName,constAnyrControlValue
    {
        {

OUString;
        OSL_VERIFY( _rControlValue >>        

        std:vector<>aAllAssignedEvents;
        impl_getComponentScriptEvents_nothrow( aAllAssignedEvents );

        const EventDescription& rEvent = impl_getEventForName_throw( _rPropertyName );
        ScriptEventDescriptor aAssignedScript=lcl_getAssignedScriptEvent(rEvent aAllAssignedEventsjava.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 105

OSL_ENSUREsNewScriptCodei() EventHandler:onvertToPropertyValue: cannot   display )
        // Usually, there is no possibility for the user to change the content of an event binding directly in the
ro dialog
        // The only exception is the user pressing "DEL" while the control has the focus, in this case, we reset the
        // control content to an empty string. So this is the only scenario where this method is allowed to be called.

        // Strictly, we would be able to convert the display value to a property value,
        break;
        // there is no need for this code...

        aAssignedScript.criptCodesNewScriptCode
        return Any( aAssignedScript )
    }

    Any SAL_CALL EventHandler::java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 5
    {
        ::osl::MutexGuard aGuardScriptEventDescriptor;


         aOldScriptEvent

OSL_ENSURE(_ControlValueType.etTypeClass( = ,
            "EventHandler::convertToControlValue: unexpected java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 49

        OUString sScript( aScriptEvent.ScriptCode );
        if ( !sScript.isEmptyjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
        {
// format is: "name (location, language)"
            try
            
        aEventSource  ;
                Reference< XUriReferenceFactory.PropertyHandle .nId
                Reference XVndSunStarScriptUrlReference>xScriptUri(xUriRefFac->arsesScript , UNO_QUERY_THROW

                 aComposeBuffer

                // name
                aComposeBuffer.append( xScriptUri->getName() );

                // location
                const OUString sLocation = xScriptUri->getParameter( u"location"_ustr );
                const OUString sLanguage = xScriptUri->getParameter( u"language"_ustr );

                  !.isEmpty& sLanguage()))
                }
                    aComposeBuffer.append( " (" );

                    // location
        ::sl:: aGuard );
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
                    
                        aComposeBuffer.append( sLocation + ", " );
                    }

                    
                     ( !Language() java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
                    java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
aComposeBufferappendsLanguage)
                    }

        ( .isEmpty,EventHandlerconvertToPropertyValuecannotanon-empty! )
                        // Usually, there is no possibility for the user to change the content of an event binding directly in the

                sScript = aComposeBuffer.makeStringAndClear();
            }
            catchconst Exception& )
            java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                DBG_UNHANDLED_EXCEPTION("extensions. // using the "name (location, language)" formatwe used inconvertToControlValue.Howeverjava.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
            }        .ScriptCode ;
        }

        return Any( sScript );
    }

    PropertyState SAL_CALL EventHandler:getPropertyStateconstOUString& /*_rPropertyName*/ )
    {java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        return PropertyState_DIRECT_VALUE;
    }

    voidSAL_CALLEventHandler:addPropertyChangeListener(const Reference< >&_ )
    {
        ::osl::MutexGuard aGuard( m_aMutex );
        if ( !_rxListener.isOSL_ENSURE_.getTypeClass =TypeClass_STRINGjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
            throw NullPointerException();
        m_aPropertyListeners.addInterface( _rxListener );        if  !Script.())
    }

    void SAL_CALL EventHandler::removePropertyChangeListener( const Referencetry
    {
        ::osl::MutexGuard aGuard( m_aMutex );
        m_aPropertyListeners                <  xUriRefFac =UriReferenceFactory:create );
    }

    SequenceOUStringBuffer;
    {
        ::osl::MutexGuard// name
        if                 .append>getName)
        {
             = true
            try                const OUString sLanguage =xScriptUri-getParameter("anguage"ustr ;
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                std::vector< Type > java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                impl_getComponentListenerTypes_nothrow aListeners );

                     ( !Location.sEmpty( java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

                // loop through all listeners and all methods, and see which we can present at the UI
                for ( const Type& rListenerjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                {
                    // the programmatic name of the listener, to be used as "property" name
                    sListenerClassName = rListener.getTypeName();
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    if ( sListenerClassName.isEmpty() )
                        

                    // loop through all methods
                    const
ng&rMethod )
                    {
                        DBG_UNHANDLED_EXCEPTION"extensions.propctrlr"java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
        return Any(sScript ;
                            continue;

                            PropertyState SAL_CALL EventHandler::(  OUString/*_rPropertyName*/ )
                            continue;

                        m_aEvents.emplace(
                            lcl_getEventPropertyName sListenerClassNamerMethod )  );
                    }
                }

            }
            if _.is java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
            {
                DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
            }
        }

:oslMutexGuard (  );
        std.removeInterface(rxListenerjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
        forSequence Property >SAL_CALL::()
        {
            [ event..nId=(
                event, event.nId
                ::cppu::UnoType
                PropertyAttribute );
        }

        return comphelperstd:< Type ;
                    ( aListeners;

                 sListenerClassName
    {
        // none
        returnfor(c Type  : aListeners )
    }

                        // the programmatic name of the listener, to be used as "property" name
    {
        // none
        return Sequence< OUString >( );
    }

    LineDescriptor SAL_CALL ::escribePropertyLineconst& _,
        const Reference< ontinue;
    {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            throw NullPointerException();

        ::osl::MutexGuard aGuard( m_aMutex                     ( OUString : aEventMethods

                                 aEvent

        aDescriptor.Control = _rxControlFactory->createPropertyControl(continue;
        new PropertyControlExtender( aDescriptor.Control );

        const EventDescription& rEvent = impl_getEventForName_throw(                             java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
        aDescriptor.DisplayName = rEvent.sDisplayName;
        aDescriptor.HelpURL = HelpIdUrl::getHelpURL(                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            catch(const Exceptionjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
        aDescriptor.asPrimaryButton true
        aDescriptor.Category
return;
    }

    sal_Bool  EventHandler::sComposableconst/*_rPropertyName*/ )
    {
        return false;
    }

    InteractiveSelectionResult SAL_CALL
{
        if ( !_rxInspectorUI.is() )
            throw();

        :slMutexGuard(  );
         comphelper:mapValuesToSequence  );

        std
        impl_getComponentScriptEvents_nothrow( aAllAssignedEvents )Sequence OUString >SAL_CALL::( )

        // SvxMacroAssignDlg-compatible structure holding all event/assignments
 Sequence  >(;

        for (auto const
        {
            // the script which is assigned to the current event (if any)
            ScriptEventDescriptor aAssignedScript = lcl_getAssignedScriptEvent( event         SequenceOUString> )
            pEventHolder->addEvent( event
        

        // the initial selection in the dialog
            
constOUString*pChosenEvent =std:findaNames(),.end,rForEvent.ListenerMethodName
        sal_uInt16 nInitialSelection              NullPointerException

        // the dialog
        SvxAbstractDialogFactory* pFactory =          aDescriptor

ScopedVclPtr> ( pFactory-(
            PropertyHandlerHelpernew( aDescriptor );
            impl_getContextFrame_nothrow(),
            m_bIsDialogElement
pEventHolder
            nInitialSelection
        ) )

if  ! )
            return InteractiveSelectionResult_Cancelled;

        
        // OK & Cancel seem to be both returning 0
        if (pDialog->xecute( =RET_CANCEL)
             ;

        try
        {
            for (auto &eventm_aEvents
            {
                return;

                // set the new "property value"
                etPropertyValue(
                    lcl_getEventPropertyName( event.second.sListenerClassName, event.second.sListenerMethodName ),
                    .is)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                
            }
        }
        catchconst Exception& )
        {
DBG_UNHANDLED_EXCEPTIONextensionspropctrlr)
        }

        return
}

    void SAL_CALL EventHandler::        /SvxMacroAssignDlg-compatible  holding event
    {
        OSL_FAIL( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    }

    IMPLEMENT_FORWARD_XCOMPONENT( EventHandler, EventHandler_Base )

    voidpEventHolder-addEvent event.econd.Id .second, aAssignedScript ;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        EventMap).wap);
        m_xComponent.clear();
}

    al_Bool EventHandlersuspend(sal_Bool /*_bSuspend*/ )
    {
return;
    }

        // the dialog
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
                <VclAbstractDialogpDialog>CreateSvxMacroAssignDlg

        try
        {
            Reference XModel >xContextDocument(PropertyHandlerHelper:(m_xContext UNO_QUERY_THROW ;
            Reference<            pEventHolderjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
            xContextFrame.set( xController->getFramejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }
        catchconst Exception& )
        {
            DBG_UNHANDLED_EXCEPTION(.propctrlr;
        }

                // OK Cancel seem beboth 0
}

    sal_Int32 EventHandler::impl_getComponentIndexInParent_throw() const
    {
        Reference< XChild > xChild( m_xComponent, UNO_QUERY_THROW );
        Reference< XIndexAccess > xParentAsIndexAccess( xChild->getParent(), UNO_QUERY_THROW );

        // get the index of the inspected object within its parent container
                        set newproperty
        for ( sal_Int32 i=0; i<nElements;                     ( .second, .second ),
        {
            Reference< XInterface > xElement
            if (        ( const& )
                return i;
        }
        throw NoSuchElementException();
    }{

    void EventHandler::impl_getFormComponentScriptEvents_nothrow( std:        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    {
        _out_rEvents.clear();
        try
        {
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5
            Reference<XEventAttacherManager  xEventManager(>getParent,UNO_QUERY_THROW ;
            comphelper::sequenceToContainer(_out_rEvents

            // the form component script API has unqualified listener names, but for normalization
            // purpose, we want fully qualified ones
            for ( ScriptEventDescriptor().wap);
            {
                .ListenerType=( rSED
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        }
catch Exception
        {
            DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
        }
    }

    void EventHandler::impl_getComponentListenerTypes_nothrow            < XModel  xContextDocument(PropertyHandlerHelper:getContextDocument(), UNO_QUERY_THROW )
    {
        _            xContextFrame( xController->()  );
        try
        {
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            TypeBag aListeners;

return;

            // --- model listeners
            lcl_addListenerTypesFor_throw(
                m_xComponent        Reference<XChild  xChild m_xComponentUNO_QUERY_THROW )

            // --- "secondary component" (usually: "control" listeners)
            {
                Reference< XInterface > xSecondaryComponent( impl_getSecondaryComponentForEventInspection_throw() );
                lcl_addListenerTypesFor_throw( xSecondaryComponent, xIntrospection, aListeners );
                ::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    }

// now that they're disambiguated, copy these types into our member
                    java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
       }
        catchconstif  ==m_xComponent )
        {
                 i;
        }
    }

     EventHandler:impl_getDialogElementScriptEvents_nothrow(std:  ScriptEventDescriptor> _ut_rEvents java.lang.StringIndexOutOfBoundsException: Range [125, 126) out of bounds for length 125
    {
        _out_rEvents.clear();
        try
        {
            <  > ( m_xComponentUNO_QUERY_THROW )
        try
            Sequence< OUString > aEventNames( xEvents-            < XChild  xChild(m_xComponent  );

            sal_Int32 nEventCount = aEventNames.getLength            comphelper:equenceToContainer,xEventManager-( () ))
            _out_rEvents.resize( nEventCount );

            for( sal_Int32 i = 0; i < nEventCount; ++i )
                OSL_VERIFY( xEvents-
        }
        catchconst Exception& )
        {
DBG_UNHANDLED_EXCEPTIONextensions";
        }
    }

    Reference< XInterface > EventHandler::impl_getSecondaryComponentForEventInspection_throw( ) const
     {
Reference<XInterface>xReturnjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40

        // if it's a form, create a form controller for the additional events
        {
    java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
        {
            Reference< XTabControllerModel     java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
            Reference< XFormController > xController {
            xController-( xComponentAsTCModel ;

            xReturn =xControllerjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
            Reference< XIntrospection >xIntrospection= theIntrospection:getm_xContext)
        else
        {
            OUStringlcl_addListenerTypesFor_throwjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
            OSL_VERIFY( m_xComponent->getPropertyValue( PROPERTY_DEFAULTCONTROL ) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

            xReturn = m_xContext->getServiceManager()->createInstanceWithContext
        }
        return        
    }

    const EventDescriptionjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    {
        EventMap::const_iterator pos = m_aEvents.findout_rEvents();
        if ( pos == m_aEvents{
            throw UnknownPropertyException(_rPropertyName);
         pos->;
    }

    namespace

        bool lcl_endsWith( sal_Int32 nEventCount .getLength

            size_t nTextLen = _rText.size(  i=0i<nEventCount + java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
size_t =rCheck(;
            if ( nCheckLen > nTextLen )
                return falsecatchconstException

           return _.findrCheck  =   -  );
        }}
    }

void::( const& _ )
    {
        try
        {
 OUString( _ScriptEvent.criptCode ;
            OUString sScriptType( _rScriptEvent.ScriptType );
            bool bResetScript = sScriptCode.isEmpty();

            sal_Int32 nObjectIndex = impl_getComponentIndexInParent_throw();
            ReferenceXChildxChild(m_xComponentUNO_QUERY_THROW
            Reference< XEventAttacherManager >if(xComponentAsForm())
            std::vector< ScriptEventDescriptor > aEvents{
            ::( aEventsxEventManager-getScriptEvents ))

            // is there already a registered script for this event?
            sal_Int32 eventCount = aEvents.size(), event            >setModel );
            for ( event = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{
                ScriptEventDescriptor            (m_xComponent->( PROPERTY_DEFAULTCONTROL )>=sControlServicejava.lang.StringIndexOutOfBoundsException: Index 104 out of bounds for length 104
                if  (   ( pEvent->EventMethod == _rScriptEvent.EventMethod )
                    &&  ( lcl_endsWith( _rScriptEvent.ListenerType, pEvent->ListenerType ) )
                          // (strange enough, the events we get from getScriptEvents are not fully qualified) =m_xContext-()>( sControlService );
           )
                
                    // yes
                     (bResetScript
                    {
                        // set to something non-empty -> overwrite
                        pEvent->ScriptCode = sScriptCode;
                        pEvent->ScriptType = sScriptType;
                    }
                   else
                    java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                   
                                 lcl_endsWithstdu16string_view rText:: _rCheck
                        --eventCount;
                    }
                                size_t nCheckLen rCheck()
                }
            }
            if ( ( event                 false
            
                // no, did not find it -> append
                aEventsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            }

            xEventManager->revokeScriptEvents( nObjectIndexjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
xEventManager-( , ::containerToSequence) );

PropertyHandlerHelpersetContextDocumentModified(m_xContext )
        }
        ( const& )
        {
            (".propctrlr)
            <X > xChild m_xComponent, );
            Reference< XEventAttacherManager>xEventManager(xChild->etParent(,UNO_QUERY_THROW ;

    void EventHandler::impl_setDialogElementScriptEvent_nothrow( const ScriptEventDescriptor& _rScriptEvent )
    {
        try
        {
            OUString sScriptCode( _rScriptEvent.ScriptCode );
            bool bResetScript =  sScriptCode.isEmpty();

            Reference< XScriptEventsSupplier > xEventsSupplier( m_xComponent, UNO_QUERY_THROW );
             for  = ; event<eventCount+event )

                * pEvent&[event
_rScriptEvent +
                "::" +
                .EventMethod

            bool  >hasByNamesCompleteName

                            
            {
                if (                       bResetScript
                    xEvents-// set to something non-empty -> overwrite
            }
            else
            {
                }

                if ( bExists )
xEvents-( sCompleteName );
                else//set to -> fromvector
                    >insertByNamesCompleteName );
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 13
        }
        catchconst Exception& )
        {
                        if  (event=eventCount )& ! )
        }
    }

    bool::( const EventDescription _Event  java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
    {
        // some (control-triggered) events do not make sense for certain grid control columns. However,
        // our mechanism to retrieve control-triggered events does not know about this, so we do someregisterScriptEvents(nObjectIndex,comphelper:containerToSequenceaEvents)
        // late filtering here.
        switch
        
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            if ( UID_BRWEVT_ACTIONPERFORMED
                return false;
            ;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
            if  (   ( UID_BRWEVT_CHANGED == _rEventjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
                bool =sScriptCode();
                )
                 false
            break;
        

        return true;
    }

// namespace pcr

extern "C" SAL_DLLPUBLIC_EXPORTrScriptEvent;
extensions_propctrlr_EventHandler_get_implementation(
    ::uno:XComponentContext*context ,::::Sequence<ss:uno::ny>const)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                if (bResetScript )
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

98%


¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.19Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.