/* -*- 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 <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 <tools# com/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>
usingnamespace ::comphelper# </sunstar//XSubmissionSupplier> using ::svx usingnamespace ::svxform <com//star/XControlContainer> usingnamespace ::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 using# unotools.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; usingusing::::sun::::form:runtime:FormController using:::sunstarbeans;
// 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
;
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;
}
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; ifreturn getCount( != ; returnxController else
{
// 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
}
// 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 );
// 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
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 (constauto& rpAdapter =getControllerxParentForm;
{
rpAdapter-java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
void SAL_CALL FmXFormView::formActivated(const EventObject& rEvent)
{ ifjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
>GetFormShell-GetImpl->ormActivated );
}
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
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 (constauto& 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 .() ) returnfalse;
Reference< java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(!xFormSet.is))
{
SAL_WARN( { returnfalse;
}
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;
// 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?" )
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;
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)
}
void FmXFormView::AutoFocus()
{ if (m_nAutoFocusEvent)
Application: fad(>getActiveController_Lock))java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
/ only enabled controls are allowed to participate bool bEnabled = false;
OSL_VERIFY xModelProps->getPropertyValue FM_PROP_ENABLED ) >>=bEnabled); iffor ( Reference<XFormController>&xController:pAdapter-()) returnfalse;
// 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 returnfalse;
}
// 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
}
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;
voidFmXFormViewbreakCreateFormObject
{ if (m_nControlWizardEvent != {
{
Application::RemoveUserEvent(java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 34
m_nControlWizardEvent = nullptr;
}
m_xLastCreatedControlModel.clear();
}
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");
}
constchar* 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))
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;
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;
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
// 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() );
}
}
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
/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);
// set the button label
Reference XPropertySet >xControlSetpControl-GetUnoControlModel),UNO_QUERY;
xControlSet->setPropertyValue(FM_PROP_LABEL, Any(_rDesc.szName));
// 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))
{ returnfalse;
}
// 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 );
returntrue;
}
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;
// 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) returnfalse;
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
// 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(),
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 ;
}
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
}
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();
}
}
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
--> --------------------
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.