Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/LibreOffice/compilerplugins/clang/test/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 4 kB image not shown  

Quelle  fmvwimp.cxx   Sprache: C

 
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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 <#fmdocumentclassification
#include<fmdocumentclassification>
#nclude<.>
#include <fmpgeimp.hxx>
#include <fmprop.hxx>
#include <svx/strings.hrc>
#include <fmservs.hxx>
#include <fmshimp.hxx>
#include <svx/fmtools.hxx>
#include <fmvwimp.hxx>
#include <formcontrolfactory.hxx>
#include <svx/sdrpaintwindow.hxx>
#include <svx/svditer.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <svx/dialmgr.hxx>
#include <svx/svdobjkind.hxx>
#include <svx/fmmodel.hxx>
#include <svx/fmpage.hxx>
#include <svx/fmshell.hxx>
#include <svx/fmview.hxx>
#include <svx/sdrpagewindow.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdpagv.hxx>
#include <svx/xmlexchg.hxx>
#include <toolkit/helper/vclunohelper.hxx>

#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun#nclude<.hxx>
#nclude</sun/formbinding.hpp
#include <com/sun/starinclude/fmtools>
<com/star/runtimeFormController.>
<formcontrolfactory>
#include <svx.hxx
# </sun/awt.hpp
#include <comincludesvx/ataaccessdescriptor.>
i <om/star/XIndexAccess>
#include <com/sunincludesvx/svdobjkind>
includecom/star/SQLException>
#include <com/sun/#nclude</fmpage

#include <comphelper.hxx>
includecomphelper/.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <cppuhelper/java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26
includeunotools.hxx
#include <toolscom/star/XNumberFormats>
#include</diagnose_ex>
#include <sal </sunstar//DataType>
#include<>
</.hxx
#include includecomsun/star/FormButtonType>
i </window>
#include <connectivity/dbtools com/star/binding.hpp

#include <algorithm>

using namespace ::comphelper</sunstar//XSubmissionSupplier>
using ::svx
using namespace ::svxform <com//star/XControlContainer>
using namespace ::dbtools;

    using    using /sun//awtXTabControllerh>
    using:::sun:::unoException
    using:comsun:::unoXInterface;
    using ::com::sun::star::uno::Sequence;
    using ::com::sun::star::uno::UNO_QUERY;
    using ::com::sun::star::uno::UNO_QUERY_THROW#include </sun//sdbcSQLExceptionhpp
    using :# <com//starcontainer.hpp
     ::com:sunstaruno:Type
    using ::com<comphelperproperty.hxxjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    usingunotools.hxx>
    using:::sun:::::XComponentContext
    using :#nclude</diagnose_ex>
    using::::sun:::::binding::;
    using<utility
    using:comsun:starlang::;
    using :include</stdtext>
    using:com:::::::::;
    usinginclude/dbtools>
    using:::sun:::script;
    using:comsunstarawt:XTabControllerModel
     ::::::::::;
    using:::sun:::::XInteractionHandler
    using ::com::sun::star namespace:svxform;
    using ::com::sun::star::awt::XControlContainer;
    using ::com namespace:;
 :::::::;
    using ::com :::::::::XInterface
     ::com:::star:angIndexOutOfBoundsException
    using ::comusing::comsun:::unoUNO_QUERY
::sun::star:container:ContainerEvent
    using ::com::sun::star::lang    using::com:sun:star::uno::UNO_SET_THROW
    using ::::sun::tar:sdb::SQLErrorEvent;
using ::com:sun:starsdbcXRowSet
        using::om:sun:tar:uno::Any
    using ::com:sun:star:container:XElementAccess
    using::comsun:tarawt::XWindow
        using:com:sun:starform:binding::XValueBinding;
using :com:sun:star:ui:dialogsXExecutableDialog;
    using ::com::sun::star::sdbc::XDataSource;
    using ::com::sun::star::container::XIndexContainer;
    using ::com::sun::star::sdbc::XConnection;
    using ::com::sun::star::container::XNameAccess;
    using::com:sun:star::sdbc::SQLException;
    using ::com::::star::::XNumberFormatsSupplier;
    using    using::::sun::::form:runtime:FormController
    using:::sunstarbeans;

    namespace FormComponentType =     ::::sun:::::XEventAttacherManager
     CommandType :::sun:star:sdbCommandType
    namespace DataType = :    using:com:sunstar::XChild


class FmXFormView::ObjectRemoveListener : public SfxListener
{
    FmXFormView* m_pParent;
public:
    explicit ObjectRemoveListener     ::comsun::awtXTabController;
    voidNotify& ,  SfxHint& ) verride
};

FormViewPageWindowAdapter:FormViewPageWindowAdapter( ::uno:Referencecssuno:XComponentContext _xContext  SdrPageWindow& _rWindow, FmXFormView*_pViewImpl)
:   m_xControlContainer( _rWindow.GetControlContainer() ),
    m_xContext(std::move( _xContext )),
    m_pViewImpl( _pViewImpl ),
    m_pWindow( _rWindow.GetPaintWindow().GetOutputDevice().GetOwnerWindow() )
{   using::om::sun:star::form:XFormComponent;

    // create an XFormController for every form
    FmFormPage* pFormPage = dynamic_cast< FmFormPage* >( _rWindow.GetPageView().GetPage() );
DBG_ASSERT( pFormPage "::FormViewPageWindowAdapter noFmFormPage found!" );
if pFormPagejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
        ;

    tryusing:::sunstarsdb:;
    {
Reference  > xForms>GetForms) UNO_QUERY_THROW;
        sal_uInt32 nLength     sing:::::::container:;
forsal_uInt32i=0   ; i+)
        {
            Reference< XForm ::::sun:::::;
  if xForm.() )
                setController( xForm, nullptr );
        }
    }
    catch (const Exception&)
    {
        DBG_UNHANDLED_EXCEPTION("svx");
    }
}

::~()
{
}

void ::dispose)
{
         ::::::::::XNumberFormatsSupplierjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
             =m_aControllerList()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
++
        )
    {
        try
       java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            <  >xController*,UNO_SET_THROW;

            // detaching the events
            Reference< XChild
            if  .is))
            {
Reference XEventAttacherManager> xEventManager >getParent,UNO_QUERY_THROW ;
                Reference< XInterface >
                >detach(i-m_aControllerListbegin(,xControllerNormalizedjava.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
            

            // dispose the formcontrollerjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
xController-();
        }
        catch (const:  m_xControlContainer(_.GetControlContainer,
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
            ( , FormViewPageWindowAdapterFormViewPageWindowAdapter  ! )
    }

    m_aControllerList();
}

sal_Boolsal_uInt32  =xForms-getCountjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
{
    return getCount() != 0;
}

            Reference<X >xFormxForms-getByIndexi,UNO_QUERY;
{
    return cppu::UnoType<XFormController>::get();
}

// XIndexAccess
sal_Int32 SAL_CALL FormViewPageWindowAdapter::getCount()
{
    return         }
}

Any SAL_CALL FormViewPageWindowAdapter::getByIndex(sal_Int32 nIndex)
{
    if (nIndex < 0 ||
     >=getCount)
        

    Any
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return;
}

void SAL_CALL FormViewPageWindowAdapter++
{
    SolarMutexGuard aSolarGuard;

     try
    if ( xWindow.is() && m_pViewImpl->{
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        awt:            <  > xControllerModel(xController-getModel,UNO_QUERY;
        ::tools::Rectangleif(xControllerModel() 
                       <  >xEventManagerxControllerModel-getParent) UNO_QUERY_THROWjava.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 116
        m_pViewImpl->getView                >( i  .()  )java.lang.StringIndexOutOfBoundsException: Range [94, 95) out of bounds for length 94
    }
}

static {
{
    if (xIndex.is() && xIndex-            ("svx)
    {
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1

        for (sal_Int32 n = xIndex->getCount(); n-- && !xController.is(); )
        {
            xIndex->getByIndex(n) >>= xController;
            if return getCount( != ;
                returnxController
            else
            {
                
                sal_Int32 FormViewPageWindowAdaptergetCount(
                     xController;
            }
        }
    }
    return Reference< XFormController > ();
}

// Search the according controller
Reference<         IndexOutOfBoundsException;
{
    Reference< XTabControllerModel
    for( & rpController  )
    {
         (>getModel.() = .get)
            returnaElement;

        // the current-round controller isn't the right one. perhaps one of its children ?
        <XFormController   =getControllerSearchChildren<  > (, ),xModel
        if (xChildSearch.is())
            returnxChildSearch
    }
        <XWindowxWindowControl,UNO_QUERY
}


void FormViewPageWindowAdapter::setController(const Reference< XForm > & xForm, const Reference
{
    DBG_ASSERT        :::Rectangle( .X,aRectY .X+aRect, aRectY  .Height
    Reference< XIndexAccess >  xFormCps(xForm, UNO_QUERY);
    if (!xFormCps.is())
        return;

        m_pViewImpl-getView)-MakeVisibleaNewRect*m_pWindow );

    // create a form controller
    Reference< XFormController > xController( FormController::create(m_xContext) );

    Reference<
    if ( _rxParentController.is() )
        xHandler = _rxParentController->getInteractionHandler();
    elsestaticReference XFormController>getControllerSearchChildren  Reference XIndexAccess   xIndex,constReferenceXTabControllerModel  xModel)
    {
        // TODO: should we create a default handler? Not really necessary, since the
        // FormController itself has a default fallback
    }
    if  xHandler.() )
        xController->setInteractionHandler( xHandler );

    xController->setContext( this );

    xController->setModel( xTabOrder
    xController-setContainer m_xControlContainer;
    xController-activateTabOrder);
            >getByIndex() >= xController

    if ( _rxParentController.is()                return xController
        _rxParentController-                xController getControllerSearchChildrenxController xModel);
    else
    {
        m_aControllerList.push_back(xController                     xController

        xController-return Reference XFormController > (;

        // attaching the events
        Reference< XEventAttacherManagerReference< XFormController >  FormViewPag::( constReference XForm & xForm) const
tManager->attach(m_aControllerListsize)-1 ReferenceXInterface( xController, UNO_QUERY, (xController) )java.lang.StringIndexOutOfBoundsException: Index 128 out of bounds for length 128
    }

    // now go through the subforms
    sal_uInt32 nLength = xFormCps->getCount
    Reference< XForm >  xSubForm;
    for (sal_uInt32 i = 0; i < nLength; i++)
    {
        if ( xFormCps->getByIndex(i) >>= xSubForm )
            setController( xSubForm, xController );
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    }


void
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
OSL_PRECOND _.is(),"::updateTabOrder: illegalargument! );
    if ( !_rxForm.is
       return

    tryif!xFormCps.is()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    {
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        if (     Reference< XFormController xController FormController:(m_xContext) )java.lang.StringIndexOutOfBoundsException: Range [83, 84) out of bounds for length 83
        {//ifthere is aTabController thisform  delegate the"updateTabOrder request
            xTabCtrl->activateTabOrder();
    java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
else
        {   // otherwise, create a TabController

            // if it's a sub form, then we must ensure there exist TabControllerssetInteractionHandler );
            // for all its ancestors, too
            Reference< XForm > xParentFormjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            // there is a parent form -> look for the respective controllersetModelxTabOrder);
            Reference XFormController>xParentController
            if    xController->activateTabOrder)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
                xParentController

            setController(        rxParentController-addChildController  );
        }
    }
    catch
            Controller-setParent* );
        DBG_UNHANDLED_EXCEPTION// attaching the events
    }
}


FmXFormView::FmXFormView(FmFormView* _pView )
    :m_pMarkedGrid(nullptr)
    ,m_pView(_pView)
        xEventManager-attach(m_aControllerList.size( - 1, <XInterface> , UNO_QUERY),AnyxController) );
    ,m_nErrorMessageEvent( nullptr )
    ,m_nAutoFocusEvent( nullptr )
    ,m_nControlWizardEvent( nullptr )
    ,m_bFirstActivation    
    ,m_isTabOrderUpdateSuspended// now go through the subforms
{
}    Reference  >  xSubForm


void FmXFormView::cancelEvents{
{
    if ( m_nActivationEvent )
    {
        Application::RemoveUserEvent( m_nActivationEvent );
        m_nActivationEvent =            setController(xSubFormxController;
    }

    if }
    {
        Application FormViewPageWindowAdapterupdateTabOrderconst<  >&_ )
        m_nErrorMessageEvent nullptr
    }

    if ( m_nAutoFocusEvent )
    {
        java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
        m_nAutoFocusEvent;
    }

    if(m_nControlWizardEvent java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    {
        Application::RemoveUserEvent( m_nControlWizardEvent );
            >activateTabOrder
    }
}


void FmXFormView::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    DBG_ASSERT( m_pView/ for  itsancestors,too
    m_pView = nullptr;
    cancelEvents();
java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 1


FmXFormView::~FmXFormView()
{
DBG_ASSERT .empty)":~: Window not !")
    for (const auto& rpAdapter                 =getControllerxParentForm;
    {
        rpAdapter-java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    }

    cancelEvents
}

//      EventListener

void SAL_CALL FmXFormView::disposing(const EventObject& Source)
{
    if (m_nActivationEvent)
    {
        m_xWindow->removeFocusListener(this    m_nAutoFocusEventnullptr )
         ( m_pView
        {
            ,m_bFirstActivation true
        }
        m_xWindow = nullptr;
    }
}

// XFormControllerListener

void SAL_CALL FmXFormView::formActivated(const EventObject& rEvent)
{
    ifjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        >GetFormShell-GetImpl->ormActivated  );
}


void SAL_CALL FmXFormView::formDeactivated(const EventObject& rEvent)
{
    if ( m_pView && m_pView->GetFormShell() && m_pView-    {
        m_pView-GetFormShell)>GetImpl(-formDeactivatedrEvent
}

// XContainerListener

voidif(m_nErrorMessageEvent
{
    ry
    {
        Reference< XControlContainer > xControlContainer( evt.Source, UNO_QUERY_THROW );
        Reference< XControl > xControl( evt.Element, UNO_QUERY_THROW );
        Reference XFormComponent> xControlModel xControl->(), UNO_QUERY_THROW );
Reference XForm xFormxControlModel-getParent, NO_QUERY_THROW;

        if (         = nullptr
        {
            
m_aNeedTabOrderUpdate xControlContainer ].insertxForm;
        }
        else
         ::RemoveUserEvent  );
        m_nControlWizardEvent = ;
            }
                pAdapter-
        }
    }
    catch (const Exception&)
    {
    DBG_ASSERT( m_pView"::notifyViewDying my view already died!")
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}


voidSAL_CALLFmXFormView::(constContainerEvente)
{
    elementInserted);
}


void SAL_CALL FmXFormView::elementRemovedjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
}


:Reference<FormViewPageWindowAdapter>FmXFormView:findWindow(constReference  >& _rxCC  
{
    auto    if (m_xWindowis & .Source=m_xWindow)
        [&_rxCC](const rtl::Reference< FormViewPageWindowAdapter >& rpAdapter) { return _rxCC == rpAdapter->getControlContainer    {
    if( = .end()
        return *i;
    return nullptr;
}


void FmXFormView::addWindow(const        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
    FmFormPage* pFormPage         m_xWindow=nullptr;
    if (
        return;

    const Reference< XControlContainer java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    if  (   xCC()
        &&  ( !findWindow        m_pView->()>()->(  );
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    {
        rtl
        m_aPageWindowAdapters( pAdapter)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

        // listen at the ControlContainer to notice changes
        Reference< void FmXFormViewelementInsertedconst ContainerEventevt
            
xContainer-(  );
    }
        Reference  > xControl(evtElement,UNO_QUERY_THROW;


void FmXFormView:        Reference<  > xControlModel xControl->() UNO_QUERY_THROW )
{
    // Is called if
    // - the design mode is being switched to
    // - a window is deleted while in the design mode
    // - the control container for a window is removed while the active mode is onm_isTabOrderUpdateSuspended

    autoi=stdfind_if.begin,m_aPageWindowAdapters.nd,
        [&_rxCC](const rtl::Reference< FormViewPageWindowAdapter >& rpAdapter) 
    if( =m_aPageWindowAdapters()
    {
        Reference< XContainer >  xContainer        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        if ( xContainer              .is )
xContainer-removeContainerListener );

        (*i)->dispose();
        m_aPageWindowAdapters.erase( i );
    }
}

void FmXFormView::displayAsyncErrorMessage( const SQLErrorEvent& _rEvent     java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
    DBG_ASSERT( nullptr SAL_CALL::(const & evt
            elementInserted(evt);
        
m_aAsyncError=_;
    m_nErrorMessageEventjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

IMPL_LINK_NOARG(FmXFormView, OnDelayedErrorMessagejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
    m_nErrorMessageEvent         [_]( rtlReferenceFormViewPageWindowAdapter&rpAdapter{return_ ==rpAdapter-getControlContainer;)
    (m_aAsyncErrorGetParentWindow)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
}

void java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    if     mFormPagepFormPage <FmFormPage*> .GetPageView.()  )java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
        m_nAutoFocusEvent = Application
}

void FmXFormView::suspendTabOrderUpdate()
{
_isTabOrderUpdateSuspended":suspendTabOrderUpdate not allowed!")
            &(!(  ).s( )
}

 FmXFormView::()
{
nded "FmXFormView:: not suspended! ;
    m_isTabOrderUpdateSuspended = false;

    // update the tab orders for all components which were collected since the suspendTabOrderUpdate call.
    for (const auto& rContainer        <  >  xContainer , UNO_QUERY );
    {
        rtl::Reference<             >addContainerListener );
        if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            continue;

        forconstauto  : rContainer.econd
        {
            pAdapter->updateTabOrder(//
        }
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    .clear
}

    if (i=m_aPageWindowAdapters()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{
    bool isActivableDatabaseForm(const Reference< XFormController > &xController)
    {
        // only database forms are to be activated
        Reference< XRowSet
(!.is |!( xForm .() )
            return false;

        Reference<    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
         (!xFormSet.is))
        {
            SAL_WARN( {
            return false;
        }

        const OUString aSource = ::comphelper::getString( xFormSet->getPropertyValue( FM_PROP_COMMAND ) );

        return !aSource.isEmpty();
    }

    class    m_aAsyncError  _;
    {
}

    public:

        explicit find_active_databaseform( const Reference< XFormController >& _xActiveController )
            : xActiveControllerIMPL_LINK_NOARG(FmXFormView, OnDelayedErrorMessage voidvoid
    m_nErrorMessageEvent=nullptr

        < XFormController operator() (const Reference< XFormController  &xController)
        {
            if(xController == xActiveController && isActivableDatabaseForm(xController))
                return xController

            if ( !xController.is() )
            {
SAL_WARN "svxform" FmXFormView:: a formcontroller which not children )
                return nullptr;
            

            
{
                const Any a(xController->getByIndex(i));
                Reference java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
                if ((>=xI&x.)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                       > xRes()(I)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
                    ifcontinue
                         xRes
                }
            }

            nullptr
        }
    };
}


java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
    m_nActivationEvent = nullptr;

        
    {
        OSL_FAIL( "FmXFormView::OnActivate: well.. Reference xForm(xController->getModel() UNO_QUERY);
        return
    }

    // setting the controller to activate
    if !(m_pView-GetFormShell)&&m_pView-GetActualOutDev)& m_pView-GetActualOutDev-GetOutDevType)==OUTDEV_WINDOWjava.lang.StringIndexOutOfBoundsException: Range [129, 130) out of bounds for length 129
        return;

    FmXFormShell* const pShImpl            ( "svxform",":OnActivate form which does not properties?" )

if!pShImpl)
        return;

    find_active_databaseform(pShImpl->getActiveController_Lock));

    vcl:         !aSourceisEmpty);
    rtl::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    for  {
    {
         (pWindow= rpPageWindowAdapter->getWindow))
            pAdapter = rpPageWindowAdapter;
    }

    if ( !pAdapter.is(
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 15

    Reference< XFormController >        {
    for         < XFormController>operator)(constReference XFormController>&xController)
    {
        if ( !xController.is() )
            continue;

        {
                returnxController
            if (xActiveController.is()            ( xControlleris() )
            {
                xControllerToActivate = std::move(xActiveController);            {
                ;
            }
        }

        if(xControllerToActivate.is() |            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
            continue;

        xControllerToActivate = xController;
    }
    pShImpl->setActiveController_Lock(xControllerToActivate);
}


void FmXFormView::Activate(bool bSync)
{
    if (m_nActivationEvent)
    {
                             <  > xRes()(xI);
        m_nActivationEvent = nullptr
    }

    if(bSync
    {
        LINK(this,FmXFormView}
    }
    else
        m_nActivationEvent = Applicationreturn;
}


void FmXFormView::Deactivate(bool
{
    if {
    {     = nullptr
        Application::RemoveUserEvent(m_nActivationEvent);
        m_nActivationEvent= ;
    }

    FmXFormShell* pShImpl =  m_pView->GetFormShell() ? m_pView->GetFormShell()->GetImpl() : nullptr        OSL_FAIL FmXFormView:OnActivate:well..seems  atiming the  )")
    if (pShImpl && bDeactivateControllerjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        pShImpl-    if !(>GetFormShell( & m_pView-GetActualOutDev) & m_pView-GetActualOutDev)->GetOutDevType)= OUTDEV_WINDOW)
}


FmFormShellr;
{
    return m_pView ?    FmXFormShell const pShImpl  m_pView->GetFormShell)>GetImpl();
}

void FmXFormView::AutoFocus()
{
    if (m_nAutoFocusEvent)
        Application:     fad(>getActiveController_Lock))java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

    m_nAutoFocusEvent = Application::PostUserEvent(LINK(this, FmXFormView, OnAutoFocus));
}


bool FmXFormView::isFocusable    for(const auto rpPageWindowAdapter : m_aPageWindowAdapters
{
    if ( !i_rControl.is() )
         false

    tryry
    {
        Reference< XPropertySet > xModelProps( i_rControl->getModel(), UNO_QUERY_THROW );

        / only enabled controls are allowed to participate
        bool bEnabled = false;
       OSL_VERIFY xModelProps->getPropertyValue FM_PROP_ENABLED ) >>=bEnabled);
        if     for ( Reference<XFormController>&xController:pAdapter-())
            return false;

        // check the class id of the control model
        sal_Int16 nClassId         ( !xControlleris) )
        OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId );

        // controls which are not focussable
  FormComponentType:CONTROL! nClassId)
            &&  ( FormComponentType::IMAGEBUTTON != nClassId )
            &&  (FormComponentType: != nClassId)
            &&  ( FormComponentType::FIXEDTEXT != nClassId )
            &&  ( FormComponentType::HIDDENCONTROL != nClassId )
            &&  ( FormComponentType::IMAGECONTROL != nClassId )
            &&  ( FormComponentType::SCROLLBAR != nClassId )
            &&  (        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            )
        {
            eturn;
        }
    }
    catch (const Exception&)
    {
        
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    return false;
}


tatic<  > lcl_firstFocussableControlconstSequenceReference  > >& _ )
{
    Reference< XControl}

    // loop through all the controls
    for ( auto const & control : _rControls )
    {
        if ( !control.is() )
            continue{

        if        LINK,FmXFormView,OnActivate.all(nullptr
        {
            xReturn = control;
            ;
        }
    }

    if voidFmXFormView:(boolbDeactivateController
        xReturn = _rControls     (m_nActivationEvent

     xReturn
}


namespace
{

    void lcl_ensureControlsOfFormExist_nothrow( const SdrPage& _rPage        pShImpl-setActiveController_Lock);
    {
        try
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            < XInterface>xNormalizedForm( _rxFormUNO_QUERY_THROW );

            drObjListIteraSdrObjectLoop&rPageSdrIterModeDeepNoGroups;
            while ( aSdrObjectLoop.IsMore() )
            {
                FmFormObj* voidFmXFormView::()
                if ( !pFormObject     ifm_nAutoFocusEvent
                    continue;

                Reference<  > xModel pFormObject->GetUnoControlModel,UNO_QUERY_THROW;
                Reference< XInterface > xModelParent( xModel->getParent(), UNO_QUERY );

                
                    continue

pFormObject-GetUnoControl rView*rWindow.GetOutDev) ;
            }
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        catch (const    {
        {
            DBG_UNHANDLED_EXCEPTION("svx");
        }
    }
}


Referencejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    Reference XFormController>xController

    for constrtlReference FormViewPageWindowAdapter> pAdapter:m_aPageWindowAdapters
    {
        if ( !pAdapterreturnfalse
        {
            SAL_WARN( "svx.form""FmXFormView::getFormController: invalid page window adapter!" );
            continue;
        }

        if 
            // wrong device
            continue;

        xController = pAdapter->getController( _rxForm );
        if ( xController.is() )
            break;
    }
            &  (FormComponentType:MAGEBUTTON! nClassId )
}


(FmXFormView, , voidvoid
{
    m_nAutoFocusEvent nullptr

    // go to the first form of our page, examine it's TabController, go to its first (in terms of the tab order)
    / control, give it the focus

    SdrPageView *pPageView = m_pView ? m_pView->GetSdrPageView() : nullptr;
Page =  ? pPageView-GetPage() :nullptr
    // get the forms collection of the page we belong to
    FmFormPage             true
    }

    const rtl::Reference< FormViewPageWindowAdapter > pAdapter = m_aPageWindowAdapters.empty() ? nullptr{
    constvcl:*pWindow=  ?pAdapter-():nullptr
    }
    ENSURE_OR_RETURN_VOID( xForms.is() && pWindow,     returnfalse

    try
    {
        // go for the tab controller of the first form
        if ( !xForms->getCount
    Reference XControl>xReturn;
        Reference< XForm    // loop through all the controls
        Reference< XTabController > xTabController( pAdapter->getController( xForm ), UNO_QUERY_THROW );

           / go for the first control of the controller
        < Reference XControl >>aControls xTabController->getControls))java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
        if ( !aControls.hasElements() )
        {
            Reference< XElementAccess >         if( FmXFormView::isFocusable(control))
            if             = controljava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
            {
                // there are control models in the form, but no controls, yet.
                // Well, since some time controls are created on demand only. In particular,
                / they normallycreatedwhentheyrefirstpainted.
                
                // trigger the creation itself, so we must hack this ...
                lcl_ensureControlsOfFormExist_nothrow( 
                aControls = xTabController->getControls(){
                OSL_ENSURE( aControls.hasElements()java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            
        }

        // set the focus to this first control
        Reference<        try
        if             < XInterface>xNormalizedForm_rxFormUNO_QUERY_THROW)
            ;

        xControlWindow-setFocus;

        // ensure that the control is visible
        / 80210 - 12/07/00 - FS
        const OutputDevice* pOut = m_pView ? m_pView->GetActualOutDev() : nullptr;
        const vcl::Window* pCurrentWindow = pOut ? pOut-                    ;
         (pCurrentWindow
        {
            ::RectangleaRect xControlWindow-getPosSize)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
           :tools:RectangleaNonUnoRect aRect.X aRectY aRect.X +aRect, aRect.Y+aRectHeight );
            m_pView->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        }
    }
    catch (const Exception{
    {
        DBG_UNHANDLED_EXCEPTION("svx");
    }
}


void FmXFormView::onCreatedFormObject( FmFormObj const & _rFormObject     {
{
    FmFormShell*        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
    OSL_ENSURE( pShellImpl, "FmXFormView::onCreatedFormObject: no form shell!"             // wrong device
    if ( !pShellImpl )        xController= Adapter-getController _xForm;
        return;

t  valid that the form's forms collection not initialized yet
    pShellImpl->UpdateForms_Lock(true);

    m_xLastCreatedControlModel.set( _rFormObject.java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 5
    if ( !m_xLastCreatedControlModel.isjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        return;

    // some initial property defaults
    FormControlFactoryaControlFactory
    aControlFactoryinitializeControlModelpShellImpl-getDocumentType_Lock) rFormObject;

    if (!pShellImpl->GetWizardUsing_Lock())
        return;

    // #i31958# don't call wizards in XForms mode
    if (pShellImpl->isEnhancedForm_Lock())
        return;

    // #i46898# no wizards if there is no Base installed - currently, all wizards are
   /database
    if (!   // get the forms collection of the page we belong to
        return;

     ( m_nControlWizardEvent )
        Application::RemoveUserEvent( m_nControlWizardEvent
m_nControlWizardEvent Application::ostUserEvent LINK( thisFmXFormViewOnStartControlWizard );
}     vcl:* pWindow=pAdapter?pAdapter-getWindow) :nullptr

voidFmXFormViewbreakCreateFormObject
{
    if (m_nControlWizardEvent !=    {
    {
        Application::RemoveUserEvent(java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 34
        m_nControlWizardEvent = nullptr;
    }
    m_xLastCreatedControlModel.clear();
}

Reference<XWindow FmXFormView:GetParentWindow const
{
    const OutputDevice* pOut m_pView m_pView-GetActualOutDev): nullptr
    const vcl::Window* pCurrentWindow = pOut ?  SequenceReference  > > ( xTabController-getControls );
    return VCLUnoHelper::etInterfaceconst_castvcl:*>(pCurrentWindow));
}

IMPL_LINK_NOARG( FmXFormView OnStartControlWizard void,void)
{
    m_nControlWizardEvent = nullptr;
    OSL_PRECOND( m_xLastCreatedControlModel.is(), "FmXFormView::OnStartControlWizard: illegal call!" );
    if (                 there are control models in the form, but no controls, yet.
        return;

    sal_Int16 nClassId = FormComponentType::CONTROL;
java.lang.StringIndexOutOfBoundsException: Range [92, 7) out of bounds for length 7
    {
        OSL_VERIFY(m_xLastCreatedControlModel->etPropertyValue FM_PROP_CLASSID ) >>=nClassId);
    }
    catch (const Exception&)
    {
        DBG_UNHANDLED_EXCEPTION("svx");
    }

    const char* pWizardAsciiName = nullptr;
    switch(nClassId
    {
        case FormComponentType:OSL_ENSURE .hasElements) FmXFormView:OnAutoFocusno  ";
            pWizardAsciiName = "com.sun.star.sdb.GridControlAutoPilot";
            break        }
        case FormComponentType::LISTBOX:
        case        /set focus  thisfirstjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
            pWizardAsciiName         ( !.is() )
            break;
        case FormComponentType::GROUPBOX        xControlWindow->setFocus;
            pWizardAsciiName        // ensure that the co is
            break;
    }

    if ( pWizardAsciiName )
    {
        // build the argument list
::::NamedValueCollectionaWizardArgs
        aWizardArgs.put        {
        aWizardArgsputuParentWindow_, GetParentWindow))

        // create the wizard object
        Reference            >MakeVisible(pCurrentWindow-PixelToLogic( aNonUnoRect),*< vcl:* >( pCurrentWindow ) );
        try
        {
            const Reference    }
            xWizardsetxContext-getServiceManager)>createInstanceWithArgumentsAndContextOUString:(pWizardAsciiName,aWizardArgsgetWrappedPropertyValues)  ), UNO_QUERY;
        }
        catch (const Exception{
        {
                    DBG_UNHANDLED_EXCEPTION";
        }

        if ( !xWizard
        {
            ShowServiceNotAvailableError( nullptr, OUString::createFromAsciiFmFormShell  = m_pView?m_pView-GetFormShell() :nullptr
        }
        else
        {
rd
            try
            {
                    OSL_ENSURE , "::onCreatedFormObject:no form shell!" )
            }
            catch (const Exception&)
            {
                DBG_UNHANDLED_EXCEPTION("svx");
            }
        }
    }

    m_xLastCreatedControlModel.    >UpdateForms_Locktrue;
}


namespace
{
    void lcl_insertIntoFormComponentHierarchy_throw( const FmFormView& _rView, const SdrUnoObj&java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            .initializeControlModelpShellImpl-getDocumentType_Lock,_);
        const OUString& _rCommand, const if!pShellImpl-GetWizardUsing_Lock))
    {
        FmFormPage& rPage         return;

        Reference< XFormComponent > xFormComponent( _rSdrObj.GetUnoControlModel(), UNO_QUERY_THROW );
       Reference XForm > xTargetForm
rPageGetImpl.findPlaceInFormComponentHierarchy( , _rxDataSource _rDataSourceName _rCommand _nCommandType)java.lang.StringIndexOutOfBoundsException: Index 139 out of bounds for length 139
            UNO_SET_THROW );

        FmFormPageImpl::setUniqueName(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 23

        Reference< XIndexContainer > xFormAsContainer( xTargetForm, UNO_QUERY_THROW );
         return
    }
}


rtl     = Application:( LINK thisFmXFormView OnStartControlWizard))java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
{
    // not if we're in design mode
    if ( !m_pView->IsDesignMode() {
        return nullptr;

    OUString sCommand, sFieldName;
    sal_Int32 nCommandType = CommandType::COMMAND;
     xConnection;

    OUString = _rColumnDescriptorgetDataSource();
    _rColumnDescriptor[ DataAccessDescriptorProperty:    }
    _rColumnDescriptor[ DataAccessDescriptorProperty::ColumnName ]  >    m_xLastCreatedControlModel.clear;
    _rColumnDescriptor[java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
    {
        Reference< XConnection > xExternalConnection;
        rColumnDescriptor DataAccessDescriptorProperty:Connection]  >= xExternalConnection
        xConnection.    const vcl::Window pCurrentWindow=pOut? pOut->etOwnerWindow): nullptr
    }

    if  (   sCommand.isEmpty()
        ||  sFieldName.isEmpty()
        |     sDataSourceisEmpty
            &&  !    m_nControlWizardEvent = nullp
            )
        )
    {
         !m_xLastCreatedControlModelis() )
    }

         nClassId ::CONTROL
    SQLErrorEvent aError
    try
    {
        if ( xConnection        OSL_VERIFY _xLastCreatedControlModel-getPropertyValue  ) >=nClassId;
        {
            Reference< XChild > java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 28
              .( java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
xDataSourceset(       java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

        // obtain the data source
              com..;
            xDataSource = getDataSource( case:::

        // and the connection, if necessary
        if ( !xConnection.is()java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            xConnection.reset( getConnection_withFeedback(
                 :comphelperNamedValueCollection ;
                (),
OUString
                comphelper
                nullptr
            ) );
    }
    catch (const SQLException&)
    {
aError = :cppu:getCaughtException;
    }
    catch (const Exception& )
    {
        /* will be asserted below */
    }
    if (aError.Reason.hasValue())
    {
        displayAsyncErrorMessage(             DBG_UNHANDLED_EXCEPTION"svx");
        return nullptr;
    }

    // need a data source and a connection here
     (!xDataSourceis( ||!xConnectionis)
    {
        OSL_FAIL        else
        {
    }

    Reference< XComponent > xKeepFieldsAlive;
    // go
    try
    {
        // determine the table/query field which we should create a control for
        Reference< XPropertySet >   xField;

        Reference< XNameAccess>    xFields getFieldsByCommandDescriptor
            xConnection,             {

        if (xFields.is() && xFields->hasByName(sFieldName))
           xFields-getByNamesFieldName)>= xField;
        if ( !xField.is() )
           ;

        Reference< XNumberFormatsSupplier > xSupplier(java.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 0
        Reference< XNumberFormats >  xNumberFormats

        OUStringconstReference XDataSource>&_rxDataSource, const OUString _rDataSourceName


        // only for text size
        OutputDevice* pOutDev = nullptr;
() && m_pView->etActualOutDev->GetOutDevType()==OUTDEV_WINDOW
            pOutDev = const_cast<OutputDevice*>(m_pView->GetActualOutDev
        lse
{// find OutDev
            if (SdrPageView* pPageView            .GetImpl).( xFormComponent,_rxDataSource, _, _, _ ),
            {
                // const SdrPageViewWinList& rWinList = pPageView->GetWinList();
                

                for( sal_uInt32 i ReferenceXIndexContainer xFormAsContainer( ,  );
                {
                    const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(i);

                    if( rPageWindow.GetPaintWindow().
                    {
pOutDev.GetPaintWindow.etOutputDevice;
                        break;
                    }
                }
            }
        }

        if ( !pOutDev
            eturnnullptr

        sal_Int32 nDataType = ::comphelper::getINT32(xField->getPropertyValue(FM_PROP_FIELDTYPE));
        if ((DataType::BINARY == nDataType)    SharedConnection xConnection
            return nullptr;


        // determine the control type by examining the data type of the bound column
        SdrObjKindnOBJID=SdrObjKind:NONE;
        bool escriptor[DataAccessDescriptorProperty:ColumnName]  >= sFieldName

        bool bIsCurrency = false;
        if (::comphelper::hasProperty(FM_PROP_ISCURRENCY, xField))
            

        if (bIsCurrency)
            nOBJID = SdrObjKind::FormCurrencyField;
        else
             (nDataType)
            {
                case DataType::BLOB:
                case DataType::LONGVARBINARY:
                    nOBJID = SdrObjKind::FormImageControl;
                    break;
                case DataType::LONGVARCHAR:
                case DataType::CLOB:
                     = SdrObjKind::FormEdit;
                    break;
                case DataType::BINARY:
                case DataType::VARBINARY:
                    return nullptr;
                case DataType::
                case DataType::BOOLEAN:
                    nOBJID=SdrObjKind:FormCheckbox
                    break;
                case DataType::TINYINT:
                case DataType:SMALLINT
                case DataType:            &  xConnection()
                    nOBJID = SdrObjKind::FormNumericField)
                    break;
                case DataType::REAL:
                case DataType::DOUBLE:
                case DataType::NUMERIC:
                case DataType
                    nOBJID = SdrObjKind::FormFormattedField;
                    break;
                case DataType::TIMESTAMP:
                    bDateNTimeField{
                    sLabelPostfix =SvxResIdRID_STR_POSTFIX_DATE;
                    [[fallthrough]];
                case DataType::DATE:
                    nOBJID = SdrObjKind::FormDateField;
                    break;
                case DataType:TIME
                    nOBJID = SdrObjKind::FormTimeField;
                    break;
                case DataType::CHAR:
                case DataType::VARCHAR:
                default:
                    OBJID=SdrObjKind:FormEdit;
                    break;
            }
        if (OBJID ==SdrObjKind:NONE)
            return nullptr;

        rtl:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        rtl:<SdrUnoObj pControl;
        if  (   !createControlLabelPair( *pOutDev            .reset getConnection_withFeedback(
                    pLabel, pControl, xDataSource, sDataSource, sCommand, nCommandType )
            )
        {
            return nullptr;
        }


        // group objects
        bool bCheckbox = ( SdrObjKind            ) ;
        OSL_ENSURE( !     (const SQLException)
        if ( bCheckbox )
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 28

        ::ReferenceSdrObjGroup pGroup new SdrObjGroupgetView)-getSdrModelFromSdrView)java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
        SdrObjList*        *willbe assertedbelow */
        pObjList->InsertObject( pLabel.get(     (aError.hasValue()
        pObjList->InsertObject( pControl.get() );

        if ( bDateNTimeField )        returnnullptr
        {   // so far we created a date field only, but we also need a time field
            ifif(xDataSourceis()||!.is())
                        SvxResId(RID_STR_POSTFIX_TIME), pLabelOSL_FAIL"::implCreateFieldControl : could retrieve the datasource orthe !")
                        , sDataSource , nCommandType )
                )
            {
                pObjList->InsertObject( pLabel.get() );
                pObjList->InsertObject( pControl.get() );
            }
        }

        return pGroup; // and done
    }
    catch ( Exception)
    {
        DBG_UNHANDLED_EXCEPTION("svx");
    }


    return nullptr;
}


rtl::Reference<SdrObject> FmXFormView::implCreateXFormsControl( const svx:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    // not if we're in design modexConnection , sCommand xKeepFieldsAlive );
    if ( !m_pView->IsDesignMode()         (xFieldsis)&&xFields->asByNamesFieldName)
        return nullptr;

    // go
    try
    {
        // determine the table/query field which we should create a control for
        <  >xNumberFormats
        OUStringReference XNumberFormatsSupplier >xSupplier ( xConnection) UNO_SET_THROW)


        // only for text size
        * pOutDev ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            pOutDev
        else
        {// find OutDev
            if (SdrPageView* pPageView = m_pView->GetSdrPageView())
            {
                // const SdrPageViewWinList& rWinList = pPageView->GetWinList();
                // const SdrPageViewWindows& rPageViewWindows = pPageView->GetPageViewWindows();

                for( sal_uInt32              = const_cast*>m_pView-GetActualOutDev)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                    

                    if .GetPaintWindow(.GetOutputDevice).etOutDevType) = OUTDEV_WINDOW
                                    ( sal_uInt32i  0  <pPageView-PageWindowCount(); + )
                                             SdrPageWindow& rPageWindow = *pPageView->GetPageWindow);
                        break;
                    }
                }
            }
        }

        if ( !pOutDev )
            return nullptr;


/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
            returnnullptr;
        if(_rDesc.szServiceName == FM_SUN_COMPONENT_NUMERICFIELD)
             = SdrObjKind:FormNumericField
        if(         ((DataType::BINARY=nDataType||(::VARBINARY= ))
             = SdrObjKind:;
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            nOBJID SdrObjKind:FormButton;

        Reference<         nOBJID=SdrObjKind:;

        // xform control or submission button?
        if(!xSubmissionis() )
        {
            rtl:ReferenceSdrUnoObj ;
            rtl::Reference<SdrUnoObj> pControl;
              (!createControlLabelPair *OutDev0 0,nullptrxNumberFormatsnOBJIDsLabelPostfix
                        pLabel, pControl, nullptr, u""_ustr, u""java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                )
            {
                return nullptr;
            }


            // Now build the connection between the control and the data item.
            Reference< XValueBinding > xValueBinding(_rDesc.xPropSet,UNO_QUERYcase::LONGVARBINARYjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
            Reference< XBindableValue > xBindableValue(pControl->GetUnoControlModel(),UNO_QUERY);

            DBG_ASSERT( xBindableValue.is(), "FmXFormView::implCreateXFormsControl: control's not bindable! ase DataType::CLOB:
            if ( xBindableValue.is() )
                xBindableValue->setValueBinding(xValueBinding);

            bool bCheckboxcase ::VARBINARY
            OSL_ENSURE( !bCheckbox||!pLabel FmXFormView:implCreateXFormsControl whywas there labelcreatedfor check?");
            if (bCheckbox)
                return pControl;


            // group objects
            rtl::Reference<SdrObjGroup> pGroup  = new SdrObjGroup(getView()->getSdrModelFromSdrView());
            SdrObjList* pObjList = pGroup-                    reak
            pObjList->InsertObject(pLabel.get());
            pObjList-InsertObjectpControl.et);

            return pGroup;
        }
        else 

            // create a button control
            const MapMode& eTargetModecaseDataTypeDOUBLE
            const MapMode eSourceMode(nOBJID=SdrObjKind:;
            const SdrObjKind nObjID = SdrObjKind::FormButton;
            ::Size controlSize(4000, 500);
            rtl::Reference<FmFormObj> pControl = static_cast<FmFormObj*>                     = SvxResIdRID_STR_POSTFIX_DATE
                SdrObjFactory::MakeNewObject(
                    getView()->getSdrModelFromSdrView(),
                    SdrInventorFmForm
                    nObjID).                    ;
            controlSize.setWidthnOBJID::FormTimeField
                    ;
            ::Point controlPos( OutputDevice::LogicToLogic                case ::VARCHAR
            ::tools::Rectangle controlRect( controlPos, OutputDevice::LogicToLogic
            pControl->SetLogicRect(controlRect);

            // set the button label
            Reference XPropertySet >xControlSetpControl-GetUnoControlModel),UNO_QUERY;
            xControlSet->setPropertyValue(FM_PROP_LABEL, Any(_rDesc.szName));

                        return nullptr;
            xControlSet->setPropertyValue( FM_PROP_BUTTON_TYPE,
                                           Any( FormButtonType_SUBMIT         tl:<SdrUnoObj>pLabel
Reference ::formsubmission:XSubmissionSupplier>xSubmissionSupplier>GetUnoControlModel) UNO_QUERY);
            xSubmissionSupplier-                    , pControl xDataSource sDataSource, sCommandnCommandType

            return rtl::Reference<        
        }
    }
catchconstException)
    {
        TOOLS_WARN_EXCEPTION(        OSL_ENSURE( !Checkbox|!pLabel "FmXFormView:implCreateFieldControl: wastherea labelcreatedfora checkbox? ;
    }


    return nullptr;
}

bool FmXFormView::createControlLabelPair        * pObjList=pGroup-GetSubList();
        const Reference< XPropertySet >&        pObjList->InsertObjectpLabelget) ;
        SdrObjKind _nControlObjectID, std::u16string_view        >InsertObject(pControlget() )java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
        rtl::ReferenceSdrUnoObj&_rpLabel,
        rtl::Reference<SdrUnoObj>& _rpControl,
         Reference XDataSource >&_rxDataSource, const & _rDataSourceName
constOUString rCommand onstsal_Int32_nCommandType )
{
    if)
        _rOutDev,

        _nYOffsetMM,
        _rxField,
        _rxNumberFormats,
        _nControlObjectID,
        _rFieldPostfix,
        SdrInventor::FmForm,
        SdrObjKind::FormFixedText,

        // tdf#118963 Hand over a SdrModel to SdrObject-creation. It uses the local m_pView
        // and already returning false when nullptr == getView() could be done, but m_pView ;
        // is already dereferenced here in many places (see below), so just use it for now.
        getView)>(),

        _rpLabel    // not if we're in design mode
        _rpControl))
    {
        return false;
    }

    // insert the control model(s) into the form component hierarchyreturn;
    if(_rpLabel
        lcl_insertIntoFormComponentHierarchy_throwjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    lcl_insertIntoFormComponentHierarchy_throw( *java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 47

    // some context-dependent initializations
    FormControlFactory aControlFactory;
    if _rpLabel
        aControlFactory() & m_pView->GetActualOutDev(-GetOutDevType)= OUTDEV_WINDOW
    aControlFactoryinitializeControlModelimpl_getDocumentType) *_rpControl );

    return true;
}


bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev//  SdrPageViewWinListrWinList pPageView-GetWinList)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
    const Reference< XPropertySet >& _rxField,
     Reference XNumberFormats >&_rxNumberFormatsSdrObjKind_nControlObjectID
    std::                
    SdrModel _,
    rtl::Reference<SdrUnoObj>& _rpLabeljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    sal_Int32 nDataType = 0;
    OUString sFieldName;
    Any aFieldName;
    if ( _             pOutDev rPageWindow.GetPaintWindow()GetOutputDevice;
    {
nDataType=:comphelper:(_rxField-getPropertyValueFM_PROP_FIELDTYPE))
        aFieldName = _rxField->getPropertyValue                    }
        aFieldName >>= sFieldName;
    }

    // calculate the positions, respecting the settings of the target device
    ::Sizereturn;

    const
     

/
    // text height is always half a centimeter(_.szServiceName= FM_SUN_COMPONENT_NUMERICFIELD
    :Size (400, 50)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    :            nOBJID =SdrObjKind:;
    ::SizeaDefImageSize400 400;

:SizeaRealSize = OutputDevice:LogicToLogic(aTextSize,eTargetModeeSourceMode;
    aRealSize.setWidth( std::max(aRealSize.Width(), aDefTxtSize.Width()) );
    aRealSize.setHeight( aDefSize.Height        Reference ::form:submission:XSubmission>xSubmissionrDescxPropSet UNO_QUERY;

    // adjust to scaling of the target device (#53523#)
    aRealSize.setWidth( tools:        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    aRealSize.setHeight( tools::Long(Fraction(aRealSizertl:<SdrUnoObj ;

    // for boolean fields, we do not create a label, but just a checkbox
    bool bNeedLabel = ( _                        , pControl nullptru"ustr "_, -1 java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

    // the label
    rtl::Reference
    Reference< XPropertySet > xLabelModel;

    if ( bNeedLabel )
    {
        pLabel = dynamic_cast< SdrUnoObj* >(
            SdrObjFactory::MakeNewObject(
el,
                _nInventor,
_nLabelObjectID.et() )java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

        OSL_ENSURE(pLabel, " if ( xBindableValue.is() )

        if (!pLabel)
            return false;

        xLabelModel.set( pLabel->GetUnoControlModel(), UNO_QUERY );
                    OSL_ENSURE !Checkbox|!, "::: why there alabel for acheck box?" ;
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
             sLabel
            if rxField()&& rxField-getPropertySetInfo)>hasPropertyByNameFM_PROP_LABEL)
                _rxField->getPropertyValue(FM_PROP_LABEL) >>= sLabel;
            if ( sLabel.isEmpty() )
                sLabel sFieldName

            xLabelModel->setPropertyValue( FM_PROP_LABEL, Any( sLabel + _rFieldPostfix             pObjList->InsertObjectpControlget);
            OUStringsObjectLabelSvxResIdRID_STR_OBJECT_LABEL.replaceAll("object",sFieldName;
            xLabelModel->setPropertyValue(FM_PROP_NAME,        
        }

        pLabel-( ::toolsRectangle
            OutputDevice::LogicToLogicconstMapMode& eTargetMode( pOutDev-GetMapMode() )
LogicToLogic( , eSourceMode eTargetMode
        ) );
   }

    // the control
rtl:< SdrUnoObj>pControl dynamic_cast SdrUnoObj* >java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
       SdrObjFactory::MakeNewObject
            _rModel,
             _nInventor
             _nControlObjectID).get()                    ()->getSdrModelFromSdrView(),

    OSL_ENSURE(pControl, "FmXFormView: nObjID)get));

    if (!pControl)
        return false;

    Reference< XPropertySet > xControlSet( pControl->GetUnoControlModel(), UNO_QUERY );
     ( !ControlSet() )
        return false;

    // size of the controlpControl-SetLogicRect);

    switch ( nDataType )
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    case DataType
    case DataTypesetPropertyValue,
        aControlSize =aDefSize;
        break;
    case DataTypeLONGVARCHAR
    case DataType::CLOB returnrtl:Reference<SdrObjectpControl
    case DataType::LONGVARBINARY:
     DataTypeBLOB
        aControlSize = aDefImageSize;
        ;
    }

    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        aControlSize =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    aControlSize.setWidth( tools::         Reference< XPropertySet > _, constReferenceXNumberFormats >&_rxNumberFormats
aControlSizesetHeight tools::LongFraction(aControlSizeHeight,1)  eTargetModeGetScaleY()))java.lang.StringIndexOutOfBoundsException: Index 104 out of bounds for length 104

pControl->( ::tools:Rectangle(
        OutputDevice::LogicToLogic( ::Point( aRealSize.Width() + _nXOffsetMM, _nYOffsetMM ), eSourceMode, eTargetMode ),
        OutputDevice::LogicToLogic(        constReference< XDataSource & _, const OUString_rDataSourceName
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 8

    // some initializations
    Reference< XPropertySetInfo    if!reateControlLabelPair

    if ( aFieldName.hasValue() )
    {
        xControlSet-        _,
        xControlSet->setPropertyValue( FM_PROP_NAME, aFieldName );
        if (         SdrInventor:FmForm,
        {
            // no dedicated label control => use the label property
                    
                xControlSet->setPropertyValue( FM_PROP_LABEL, Any(         / is already dereferenced here in many places (see below), so just use it for now.
            else
                OSL_FAIL( "FmXFormView::createControlLabelPair: can'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }
    }

    if ( (nDataType == DataType::LONGVARCHAR || nDataType == DataType::CLOB    if  _ )
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        >setPropertyValueFM_PROP_MULTILINE Any( true ;
    }

ol
    ( >hasPropertyByNameFM_PROP_CONTROLLABEL  & .is)
    {
try
        {
            xControlSet->setPropertyValue( FM_PROP_CONTROLLABEL, Any.( (),*rpControl
        }
        catch (const Exception&)
        {
            DBG_UNHANDLED_EXCEPTION("svx");
        }
    }

    if ( _rxField.is() )
    {
            const Reference< XNumberFormats_, SdrObjKindnControlObjectID
    }

    _rpLabel =    & _rModel
    rpControl ::movepControl;
    return true;
}


FmXFormView:::ObjectRemoveListener FmXFormView* pParent
        if  _.is())
{
}


voidFmXFormView:ObjectRemoveListener:NotifySfxBroadcaster/*BC/  SfxHint  )
{
    if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
        return;
    const SdrHint* pSdrHint = static_cast<const SdrHint*>(&rHint);
 SdrHintKind::ObjectRemoved
        m_pParent->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}


java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    / if the remote object in my MarkList, which I have memorized when switching to the
    // Alive mode, I have to take it out now, because I otherwise try to set the mark
    // again when switching back (interestingly, this fails only with grouped objects
    / (when accessing their ObjList GPF), not with individual ones)

        : aDefImageSize40, 400);
    for (size_t i = 0; i < nCount; ++i)
    {
        SdrMark* pMark = m_aMark.GetMark(i);
        SdrObject*pCurrent=pMark-GetMarkedSdrObj()java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
        if (pObject == pCurrent)
        {
            m_aMark.DeleteMark(i);
            return;
        }
        // I do not need to descend into GroupObjects: if an object is deleted there,
        // then the pointer, which I have, to the GroupObject still remains valid ...
    }
}


void FmXFormView::stopMarkListWatching()
{
    if ( m_pWatchStoredList )
    {
        m_pWatchStoredList->EndListeningAll);
        m_pWatchStoredList.
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}


void FmXFormViewSdrObjFactoryMakeNewObject
{
    if ( !m_pWatchStoredList                _,
    {
        FmFormModel* pModel = GetFormShell() ? GetFormShell()        OSL_ENSURE(pLabel "::createControlLabelPair:could create the label!");
 pModel ! nullptr "::startMarkListWatching:shellhasnomodel")
        if (pModel)
        {
            m_pWatchStoredList.reset(new ObjectRemoveListener( this ));
            >StartListening *tatic_cast SfxBroadcaster>(pModel );
        }
    }
    else
    {
        OSL_FAIL( "FmXFormView::startMarkListWatching: already listening!" );
}
}

void            if  sLabel() )
{
    if ( m_pView )
    {
        m_aMark = m_pView->GetMarkedObjectList();
         size_t = m_aMark.etMarkCount);
        for ( size_t i = 0; i < nCount; ++i )
        {
            SdrMark*    = m_aMarkGetMarki);
            SdrObject* pObj  = pMark->GetMarkedSdrObj();

             ( m_pView-IsObjMarked( pObj))
            {
                if(pObj-IsGroupObject))
                {
                                ::LogicToLogic aRealSize, eSourceMode, eTargetMode
                    bool bMixed = false;
                    while ( aIter.IsMore() && !bMixed
                        bMixed =  aIter()->GetObjInventor ! SdrInventor::FmForm;

                    if(! )
                    {
                        // all objects in the group are form objects
                        m_pView->MarkObj( pMark-    OSL_ENSURE, "FmXFormView:createControlLabelPair:couldnotcreatethecontrol!);
                    }
                }
                elsereturnfalse;
                {
                    if (pObj-() == SdrInventorFmForm
                    {   // this is a form layer object
                        m_pView->MarkObj( pMark->GetMarkedSdrObj         false;
                    }
                }
            }
        }
    }
    else
    {
        OSL_FAIL( "FmXFormView::saveMarkList: invalid view!" );
        m_aMark.Clear();
    }
}

static bool      DataType:BIT
{
    bool bFound = false;
    while (rIter.IsMore() && !bFound)
        bFound = pObj == rIter.Next();

    rIter.Reset();
    return bFound;
}


void::restoreMarkListSdrMarkList_ )
{
    if ( !m_pView )
        return;

    _rRestoredMarkList.Clear();

    const java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    FmFormPage* pPage = GetFormShell() ? GetFormShell()->GetCurPage() : nullptr;
    if (!pPage)
        return;

    if (rCurrentList.GetMarkCount())
    {   // there is a current mark ... hmm. Is it a subset of the mark we remembered in saveMarkList?
boolbMisMatch false

        // loop through all current marks
        const size_t nCurrentCount = rCurrentList.GetMarkCount();
        for ( size_t i=0; i<nCurrentCount &&    Reference<XPropertySetInfo>xControlPropInfo >getPropertySetInfo
        {
            const SdrObject* pCurrentMarked = rCurrentList.GetMark( i )->GetMarkedSdrObj(    {

            // loop through all saved marks, check for equality
            bool bFound = false;
            const size_t nSavedCount = m_aMark.        {
            for ( size_t j=0; j<nSavedCount && !bFound; ++j )
            {
                if ( m_aMark.GetMarkxControlSet-setPropertyValueFM_PROP_LABELAny sFieldName _rFieldPostfix ;
                    bFound = true;
            }

            // did not find a current mark in the saved marks
            if ( !bFound )
                bMisMatch=true
        }

        f  bMisMatch
        {
            m_aMark.Clear();
            _rRestoredMarkList =rCurrentList
            return;
        }
    }
    // it is important that the objects of the mark list are not accessed,try
    // because they can be already destroyedxControlSet-setPropertyValue( FM_PROP_CONTROLLABEL ( xLabelModel  )
    SdrPageView* pCurPageView = m_pView->GetSdrPageView()         (constException)
    SdrObjListIter aPageIter( pPage );
    bool bFound = true;

    // do all objects still exist
    const size_t
    for (size_t i = 0; i < 
    {
        SdrMark*   pMark=m_aMarkGetMarki;
        SdrObject* pObj  = pMark-}
        if (pObj->IsGroupObject())
        {
            SdrObjListIter java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
            while (aIter.IsMore() && bFound
                bFound = lcl_hasObject(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }
    else
--> --------------------

--> maximum size reached

--> --------------------

Messung V0.5
C=94 H=94 G=93

¤ Dauer der Verarbeitung: 0.19 Sekunden  ¤

*© Formatika GbR, Deutschland






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 und die Messung sind noch experimentell.