Files
libreoffice/svx/source/form/fmshell.cxx

1414 lines
52 KiB
C++
Raw Normal View History

2000-09-18 16:07:07 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:07:07 +00:00
*
* Copyright 2008 by Sun Microsystems, Inc.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:07:07 +00:00
*
* $RCSfile: fmshell.cxx,v $
* $Revision: 1.81 $
2000-09-18 16:07:07 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 16:07:07 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 16:07:07 +00:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
2000-09-18 16:07:07 +00:00
#include "fmvwimp.hxx"
#include <svx/fmshell.hxx>
2000-09-18 16:07:07 +00:00
#include "fmtools.hxx"
#include "fmservs.hxx"
#ifndef _SVX_FMPROP_HRC
#include "fmprop.hrc"
#endif
#include "fmpgeimp.hxx"
#include "fmitems.hxx"
#include "fmundo.hxx"
#include <vcl/waitobj.hxx>
#include <com/sun/star/form/XLoadable.hpp>
#include <com/sun/star/container/XNamed.hpp>
2000-09-18 16:07:07 +00:00
#ifndef _COM_SUN_STAR_SDDB_PRIVILEGE_HPP_
#include <com/sun/star/sdbcx/Privilege.hpp>
#endif
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
2000-10-20 13:18:57 +00:00
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/awt/XTabControllerModel.hpp>
2000-09-18 16:07:07 +00:00
#include <sfx2/viewfrm.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/msgbox.hxx>
#include <svtools/whiter.hxx>
#include <sfx2/app.hxx>
#include <svtools/intitem.hxx>
#include <svtools/visitem.hxx>
#include <svtools/moduleoptions.hxx>
2000-09-18 16:07:07 +00:00
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
#include <svx/svdobj.hxx>
#include <svx/fmpage.hxx>
2000-09-18 16:07:07 +00:00
#include "svditer.hxx"
#include "fmobj.hxx"
#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
2000-09-18 16:07:07 +00:00
#endif
#ifndef _SVX_FMRESIDS_HRC
#include "fmresids.hrc"
#endif
#include "fmexch.hxx"
#include <svx/fmglob.hxx>
2000-09-18 16:07:07 +00:00
#include <svtools/eitem.hxx>
#include <tools/shl.hxx>
#include <svx/svdpage.hxx>
#include <svx/fmmodel.hxx>
#include <svx/dialmgr.hxx>
2000-09-18 16:07:07 +00:00
#include "fmshimp.hxx"
#include <svx/svdpagv.hxx>
2000-09-18 16:07:07 +00:00
#include <sfx2/objitem.hxx>
#include <sfx2/viewsh.hxx>
#include <vcl/sound.hxx>
#include "fmexpl.hxx"
#include "formcontrolling.hxx"
2000-09-18 16:07:07 +00:00
#include <svtools/numuno.hxx>
2000-10-20 13:18:57 +00:00
#include <connectivity/dbtools.hxx>
#include <comphelper/types.hxx>
2000-11-06 06:19:53 +00:00
#include <comphelper/processfactory.hxx>
#include "fmdocumentclassification.hxx"
#include "formtoolbars.hxx"
2000-09-18 16:07:07 +00:00
#include <svx/svxdlg.hxx> //CHINA001
#include <svx/dialogs.hrc> //CHINA001
2000-09-18 16:07:07 +00:00
#define HANDLE_SQL_ERRORS( action, successflag, context, message ) \
try \
{ \
successflag = sal_False; \
action; \
successflag = sal_True; \
} \
2000-11-06 06:19:53 +00:00
catch(::com::sun::star::sdbc::SQLException& e) \
2000-09-18 16:07:07 +00:00
{ \
::com::sun::star::sdb::SQLContext eExtendedInfo = \
GetImpl()->prependContextInfo(e, Reference< XInterface > (), context, ::rtl::OUString()); \
2000-09-18 16:07:07 +00:00
displayException(eExtendedInfo); \
} \
catch(Exception&) \
2000-09-18 16:07:07 +00:00
{ \
DBG_ERROR(message); \
} \
#define DO_SAFE_WITH_ERROR( action, message ) try { action; } catch(Exception&) { DBG_ERROR(message); }
2000-09-18 16:07:07 +00:00
#define FmFormShell
#include "svxslots.hxx"
2000-09-18 16:07:07 +00:00
#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
2000-09-18 16:07:07 +00:00
#endif
#include "tbxform.hxx"
2000-10-20 13:18:57 +00:00
#include <comphelper/property.hxx>
2002-03-04 11:49:36 +00:00
#include <com/sun/star/beans/PropertyValue.hpp>
2000-09-18 16:07:07 +00:00
// wird fuer Invalidate verwendet -> mitpflegen
// aufsteigend sortieren !!!!!!
sal_uInt16 ControllerSlotMap[] = // slots des Controllers
{
SID_FM_CONFIG,
SID_FM_PUSHBUTTON,
SID_FM_RADIOBUTTON,
SID_FM_CHECKBOX,
SID_FM_FIXEDTEXT,
SID_FM_GROUPBOX,
SID_FM_EDIT,
SID_FM_LISTBOX,
SID_FM_COMBOBOX,
SID_FM_DBGRID,
SID_FM_IMAGEBUTTON,
SID_FM_FILECONTROL,
SID_FM_NAVIGATIONBAR,
2000-09-18 16:07:07 +00:00
SID_FM_CTL_PROPERTIES,
SID_FM_PROPERTIES,
SID_FM_TAB_DIALOG,
SID_FM_ADD_FIELD,
2000-09-18 16:07:07 +00:00
SID_FM_DESIGN_MODE,
SID_FM_SHOW_FMEXPLORER,
SID_FM_SHOW_PROPERTIES,
2000-09-18 16:07:07 +00:00
SID_FM_FMEXPLORER_CONTROL,
SID_FM_DATEFIELD,
SID_FM_TIMEFIELD,
SID_FM_NUMERICFIELD,
SID_FM_CURRENCYFIELD,
SID_FM_PATTERNFIELD,
SID_FM_OPEN_READONLY,
SID_FM_IMAGECONTROL,
SID_FM_USE_WIZARDS,
SID_FM_FORMATTEDFIELD,
SID_FM_FILTER_NAVIGATOR,
SID_FM_AUTOCONTROLFOCUS,
SID_FM_SCROLLBAR,
SID_FM_SPINBUTTON,
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
SID_FM_SHOW_DATANAVIGATOR,
SID_FM_DATANAVIGATOR_CONTROL,
2000-09-18 16:07:07 +00:00
0
};
2000-11-16 14:57:09 +00:00
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
2002-03-04 11:49:36 +00:00
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::form;
using namespace ::com::sun::star::form::runtime;
using namespace ::com::sun::star::frame;
using namespace ::svxform;
2000-09-18 16:07:07 +00:00
//========================================================================
// class FmDesignModeChangedHint
//========================================================================
TYPEINIT1( FmDesignModeChangedHint, SfxHint );
//------------------------------------------------------------------------
FmDesignModeChangedHint::FmDesignModeChangedHint( sal_Bool bDesMode )
:m_bDesignMode( bDesMode )
{
}
//------------------------------------------------------------------------
FmDesignModeChangedHint::~FmDesignModeChangedHint()
{
}
//========================================================================
const sal_uInt32 FM_UI_FEATURE_SHOW_DATABASEBAR = 0x00000001;
const sal_uInt32 FM_UI_FEATURE_SHOW_FIELD = 0x00000002;
const sal_uInt32 FM_UI_FEATURE_SHOW_PROPERTIES = 0x00000004;
const sal_uInt32 FM_UI_FEATURE_SHOW_EXPLORER = 0x00000008;
const sal_uInt32 FM_UI_FEATURE_SHOW_FILTERBAR = 0x00000010;
const sal_uInt32 FM_UI_FEATURE_SHOW_FILTERNAVIGATOR = 0x00000020;
const sal_uInt32 FM_UI_FEATURE_SHOW_TEXT_CONTROL_BAR = 0x00000040;
const sal_uInt32 FM_UI_FEATURE_TB_CONTROLS = 0x00000080;
const sal_uInt32 FM_UI_FEATURE_TB_MORECONTROLS = 0x00000100;
const sal_uInt32 FM_UI_FEATURE_TB_FORMDESIGN = 0x00000200;
const sal_uInt32 FM_UI_FEATURE_SHOW_DATANAVIGATOR = 0x00000400;
2000-09-18 16:07:07 +00:00
SFX_IMPL_INTERFACE(FmFormShell, SfxShell, SVX_RES(RID_STR_FORMSHELL))
{
SFX_FEATURED_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_NAVIGATION|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_READONLYDOC,
SVX_RES(RID_SVXTBX_FORM_NAVIGATION),
FM_UI_FEATURE_SHOW_DATABASEBAR );
SFX_FEATURED_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_NAVIGATION|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_READONLYDOC,
SVX_RES(RID_SVXTBX_FORM_FILTER),
FM_UI_FEATURE_SHOW_FILTERBAR );
SFX_FEATURED_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_READONLYDOC,
SVX_RES( RID_SVXTBX_TEXT_CONTROL_ATTRIBUTES ),
FM_UI_FEATURE_SHOW_TEXT_CONTROL_BAR );
2000-09-18 16:07:07 +00:00
SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_FM_ADD_FIELD, FM_UI_FEATURE_SHOW_FIELD);
SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_FM_SHOW_PROPERTIES, FM_UI_FEATURE_SHOW_PROPERTIES);
SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_FM_SHOW_FMEXPLORER, FM_UI_FEATURE_SHOW_EXPLORER);
SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_FM_FILTER_NAVIGATOR, FM_UI_FEATURE_SHOW_FILTERNAVIGATOR);
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_FM_SHOW_DATANAVIGATOR, FM_UI_FEATURE_SHOW_DATANAVIGATOR);
SFX_FEATURED_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD,
SVX_RES( RID_SVXTBX_CONTROLS ),
FM_UI_FEATURE_TB_CONTROLS );
SFX_FEATURED_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD,
SVX_RES( RID_SVXTBX_MORECONTROLS ),
FM_UI_FEATURE_TB_MORECONTROLS );
SFX_FEATURED_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD,
SVX_RES( RID_SVXTBX_FORMDESIGN ),
FM_UI_FEATURE_TB_FORMDESIGN );
2000-09-18 16:07:07 +00:00
}
//========================================================================
TYPEINIT1(FmFormShell,SfxShell)
//------------------------------------------------------------------------
FmFormShell::FmFormShell( SfxViewShell* _pParent, FmFormView* pView )
:SfxShell(_pParent)
,m_pImpl(new FmXFormShell(*this, _pParent->GetViewFrame()))
2000-09-18 16:07:07 +00:00
,m_pFormView( pView )
,m_pFormModel( NULL )
,m_pParentShell(_pParent)
2000-09-18 16:07:07 +00:00
,m_nLastSlot( 0 )
,m_bDesignMode( sal_True )
,m_bHasForms(sal_False)
{
m_pImpl->acquire();
SetPool( &SFX_APP()->GetPool() );
SetName( String::CreateFromAscii( "Form" ) );
2000-09-18 16:07:07 +00:00
SetView(m_pFormView);
}
//------------------------------------------------------------------------
FmFormShell::~FmFormShell()
{
if ( m_pFormView )
SetView( NULL );
m_pImpl->dispose();
m_pImpl->release();
m_pImpl = NULL;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------
void FmFormShell::NotifyMarkListChanged(FmFormView* pWhichView)
{
FmNavViewMarksChanged aChangeNotification(pWhichView);
2000-09-18 16:07:07 +00:00
Broadcast(aChangeNotification);
}
//------------------------------------------------------------------------
sal_uInt16 FmFormShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing)
{
if ( GetImpl()->didPrepareClose() )
2002-11-12 10:28:01 +00:00
// we already did a PrepareClose for the current modifications of the current form
// 2002-11-12 #104702# - fs@openoffice.org
return sal_True;
sal_Bool bResult = sal_True;
2000-09-18 16:07:07 +00:00
// Save the data records, not in DesignMode and FilterMode
if (!m_bDesignMode && !GetImpl()->isInFilterMode() &&
m_pFormView && m_pFormView->GetActualOutDev() &&
m_pFormView->GetActualOutDev()->GetOutDevType() == OUTDEV_WINDOW)
{
if (GetImpl()->HasAnyPendingCursorAction())
GetImpl()->CancelAnyPendingCursorAction();
SdrPageView* pCurPageView = m_pFormView->GetSdrPageView();
// sal_uInt16 nPos = pCurPageView ? pCurPageView->GetWinList().Find((OutputDevice*)m_pFormView->GetActualOutDev()) : SDRPAGEVIEWWIN_NOTFOUND;
SdrPageWindow* pWindow = pCurPageView ? pCurPageView->FindPageWindow(*((OutputDevice*)m_pFormView->GetActualOutDev())) : 0L;
if(pWindow)
2000-09-18 16:07:07 +00:00
{
// Zunaechst werden die aktuellen Inhalte der Controls gespeichert
// Wenn alles glatt gelaufen ist, werden die modifizierten Datensaetze gespeichert
if ( GetImpl()->getActiveController().is() )
2000-09-18 16:07:07 +00:00
{
const ::svx::ControllerFeatures& rController = GetImpl()->getActiveControllerFeatures();
if ( rController->commitCurrentControl() )
{
sal_Bool bModified = rController->isModifiedRow();
2000-09-18 16:07:07 +00:00
2002-11-12 10:28:01 +00:00
if ( bModified && bUI )
2000-09-18 16:07:07 +00:00
{
QueryBox aQry(NULL, SVX_RES(RID_QRY_SAVEMODIFIED));
if (bForBrowsing)
aQry.AddButton(SVX_RES(RID_STR_NEW_TASK), RET_NEWTASK,
2000-09-18 16:07:07 +00:00
BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
switch (aQry.Execute())
{
case RET_NO:
bModified = sal_False;
GetImpl()->didPrepareClose( sal_True );
2000-09-18 16:07:07 +00:00
break;
2002-11-12 10:28:01 +00:00
2000-09-18 16:07:07 +00:00
case RET_CANCEL:
return sal_False;
2002-11-12 10:28:01 +00:00
2000-09-18 16:07:07 +00:00
case RET_NEWTASK:
return RET_NEWTASK;
}
if ( bModified )
bResult = rController->commitCurrentRecord( );
2000-09-18 16:07:07 +00:00
}
}
}
}
}
return bResult;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------
void FmFormShell::impl_setDesignMode(sal_Bool bDesign)
2000-09-18 16:07:07 +00:00
{
if (m_pFormView)
{
if (!bDesign)
m_nLastSlot = SID_FM_DESIGN_MODE;
GetImpl()->SetDesignMode(bDesign);
// mein m_bDesignMode wird auch von der Impl gesetzt ...
}
else
{
m_bHasForms = sal_False;
m_bDesignMode = bDesign;
UIFeatureChanged();
}
GetViewShell()->GetViewFrame()->GetBindings().Invalidate(ControllerSlotMap);
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------
sal_Bool FmFormShell::HasUIFeature( sal_uInt32 nFeature )
{
sal_Bool bResult = sal_False;
if ((nFeature & FM_UI_FEATURE_SHOW_DATABASEBAR) == FM_UI_FEATURE_SHOW_DATABASEBAR)
{
// nur wenn auch formulare verfuegbar
bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar() && !GetImpl()->isInFilterMode();
}
else if ((nFeature & FM_UI_FEATURE_SHOW_FILTERBAR) == FM_UI_FEATURE_SHOW_FILTERBAR)
{
// nur wenn auch formulare verfuegbar
bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar() && GetImpl()->isInFilterMode();
}
else if ((nFeature & FM_UI_FEATURE_SHOW_FILTERNAVIGATOR) == FM_UI_FEATURE_SHOW_FILTERNAVIGATOR)
{
bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar() && GetImpl()->isInFilterMode();
}
else if ((nFeature & FM_UI_FEATURE_SHOW_FIELD) == FM_UI_FEATURE_SHOW_FIELD)
{
bResult = m_bDesignMode && m_pFormView && m_bHasForms;
}
else if ((nFeature & FM_UI_FEATURE_SHOW_PROPERTIES) == FM_UI_FEATURE_SHOW_PROPERTIES)
{
bResult = m_bDesignMode && m_pFormView && m_bHasForms;
}
else if ((nFeature & FM_UI_FEATURE_SHOW_EXPLORER) == FM_UI_FEATURE_SHOW_EXPLORER)
{
bResult = m_bDesignMode; // OJ #101593# && m_pFormView && m_bHasForms;
2000-09-18 16:07:07 +00:00
}
else if ( ( nFeature & FM_UI_FEATURE_SHOW_TEXT_CONTROL_BAR ) == FM_UI_FEATURE_SHOW_TEXT_CONTROL_BAR )
{
bResult = !GetImpl()->IsReadonlyDoc() && m_pImpl->IsActiveControl( true );
}
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
else if ((nFeature & FM_UI_FEATURE_SHOW_DATANAVIGATOR) == FM_UI_FEATURE_SHOW_DATANAVIGATOR)
{
bResult = GetImpl()->isEnhancedForm();
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
}
else if ( ( ( nFeature & FM_UI_FEATURE_TB_CONTROLS ) == FM_UI_FEATURE_TB_CONTROLS )
|| ( ( nFeature & FM_UI_FEATURE_TB_MORECONTROLS ) == FM_UI_FEATURE_TB_MORECONTROLS )
|| ( ( nFeature & FM_UI_FEATURE_TB_FORMDESIGN ) == FM_UI_FEATURE_TB_FORMDESIGN )
)
{
bResult = sal_True;
}
2000-09-18 16:07:07 +00:00
return bResult;
}
//------------------------------------------------------------------------
void FmFormShell::Execute(SfxRequest &rReq)
{
sal_uInt16 nSlot = rReq.GetSlot();
//////////////////////////////////////////////////////////////////////
// MasterSlot setzen
switch( nSlot )
{
case SID_FM_PUSHBUTTON:
case SID_FM_RADIOBUTTON:
case SID_FM_CHECKBOX:
case SID_FM_FIXEDTEXT:
case SID_FM_GROUPBOX:
case SID_FM_LISTBOX:
case SID_FM_COMBOBOX:
case SID_FM_NAVIGATIONBAR:
2000-09-18 16:07:07 +00:00
case SID_FM_EDIT:
case SID_FM_DBGRID:
case SID_FM_IMAGEBUTTON:
case SID_FM_IMAGECONTROL:
case SID_FM_FILECONTROL:
case SID_FM_DATEFIELD:
case SID_FM_TIMEFIELD:
case SID_FM_NUMERICFIELD:
case SID_FM_CURRENCYFIELD:
case SID_FM_PATTERNFIELD:
case SID_FM_FORMATTEDFIELD:
case SID_FM_SCROLLBAR:
case SID_FM_SPINBUTTON:
2000-09-18 16:07:07 +00:00
m_nLastSlot = nSlot;
GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_FM_CONFIG );
2000-09-18 16:07:07 +00:00
break;
}
//////////////////////////////////////////////////////////////////////
// Identifier und Inventor des Uno-Controls setzen
sal_uInt16 nIdentifier = 0;
switch( nSlot )
{
case SID_FM_CHECKBOX:
nIdentifier = OBJ_FM_CHECKBOX;
break;
case SID_FM_PUSHBUTTON:
nIdentifier = OBJ_FM_BUTTON;
break;
case SID_FM_FIXEDTEXT:
nIdentifier = OBJ_FM_FIXEDTEXT;
break;
case SID_FM_LISTBOX:
nIdentifier = OBJ_FM_LISTBOX;
break;
case SID_FM_EDIT:
nIdentifier = OBJ_FM_EDIT;
break;
case SID_FM_RADIOBUTTON:
nIdentifier = OBJ_FM_RADIOBUTTON;
break;
case SID_FM_GROUPBOX:
nIdentifier = OBJ_FM_GROUPBOX;
break;
case SID_FM_COMBOBOX:
nIdentifier = OBJ_FM_COMBOBOX;
break;
case SID_FM_NAVIGATIONBAR:
nIdentifier = OBJ_FM_NAVIGATIONBAR;
break;
2000-09-18 16:07:07 +00:00
case SID_FM_DBGRID:
nIdentifier = OBJ_FM_GRID;
break;
case SID_FM_IMAGEBUTTON:
nIdentifier = OBJ_FM_IMAGEBUTTON;
break;
case SID_FM_IMAGECONTROL:
nIdentifier = OBJ_FM_IMAGECONTROL;
break;
case SID_FM_FILECONTROL:
nIdentifier = OBJ_FM_FILECONTROL;
break;
case SID_FM_DATEFIELD:
nIdentifier = OBJ_FM_DATEFIELD;
break;
case SID_FM_TIMEFIELD:
nIdentifier = OBJ_FM_TIMEFIELD;
break;
case SID_FM_NUMERICFIELD:
nIdentifier = OBJ_FM_NUMERICFIELD;
break;
case SID_FM_CURRENCYFIELD:
nIdentifier = OBJ_FM_CURRENCYFIELD;
break;
case SID_FM_PATTERNFIELD:
nIdentifier = OBJ_FM_PATTERNFIELD;
break;
case SID_FM_FORMATTEDFIELD:
nIdentifier = OBJ_FM_FORMATTEDFIELD;
break;
case SID_FM_SCROLLBAR:
nIdentifier = OBJ_FM_SCROLLBAR;
break;
case SID_FM_SPINBUTTON:
nIdentifier = OBJ_FM_SPINBUTTON;
break;
2000-09-18 16:07:07 +00:00
}
switch ( nSlot )
{
case SID_FM_CHECKBOX:
case SID_FM_PUSHBUTTON:
case SID_FM_FIXEDTEXT:
case SID_FM_LISTBOX:
case SID_FM_EDIT:
case SID_FM_RADIOBUTTON:
case SID_FM_COMBOBOX:
case SID_FM_NAVIGATIONBAR:
2000-09-18 16:07:07 +00:00
case SID_FM_GROUPBOX:
case SID_FM_DBGRID:
case SID_FM_IMAGEBUTTON:
case SID_FM_IMAGECONTROL:
case SID_FM_FILECONTROL:
case SID_FM_DATEFIELD:
case SID_FM_TIMEFIELD:
case SID_FM_NUMERICFIELD:
case SID_FM_CURRENCYFIELD:
case SID_FM_PATTERNFIELD:
case SID_FM_FORMATTEDFIELD:
case SID_FM_SCROLLBAR:
case SID_FM_SPINBUTTON:
2000-09-18 16:07:07 +00:00
{
SFX_REQUEST_ARG( rReq, pGrabFocusItem, SfxBoolItem, SID_FM_GRABCONTROLFOCUS, sal_False );
if ( pGrabFocusItem && pGrabFocusItem->GetValue() )
{ // see below
SfxViewShell* pShell = GetViewShell();
Window* pShellWnd = pShell ? pShell->GetWindow() : NULL;
if ( pShellWnd )
pShellWnd->GrabFocus();
break;
}
2000-09-18 16:07:07 +00:00
SfxUInt16Item aIdentifierItem( SID_FM_CONTROL_IDENTIFIER, nIdentifier );
SfxUInt32Item aInventorItem( SID_FM_CONTROL_INVENTOR, FmFormInventor );
const SfxPoolItem* pArgs[] =
{
&aIdentifierItem, &aInventorItem, NULL
};
const SfxPoolItem* pInternalArgs[] =
{
NULL
};
GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( SID_FM_CREATE_CONTROL, SFX_CALLMODE_ASYNCHRON,
pArgs, rReq.GetModifier(), pInternalArgs );
if ( rReq.GetModifier() & KEY_MOD1 )
{
// #99013# if selected with control key, return focus to current view
// do this asynchron, so that the creation can be finished first
// reusing the SID_FM_GRABCONTROLFOCUS is somewhat hacky ... which it wouldn't if it would have another
// name, so I do not really have a big problem with this ....
SfxBoolItem aGrabFocusIndicatorItem( SID_FM_GRABCONTROLFOCUS, sal_True );
GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_ASYNCHRON,
&aGrabFocusIndicatorItem, NULL );
}
2000-09-18 16:07:07 +00:00
rReq.Done();
} break;
}
// Individuelle Aktionen
switch( nSlot )
{
case SID_FM_MORE_CONTROLS:
case SID_FM_FORM_DESIGN_TOOLS:
{
FormToolboxes aToolboxAccess( GetImpl()->getHostFrame() );
aToolboxAccess.toggleToolbox( nSlot );
rReq.Done();
}
break;
2002-05-22 17:03:18 +00:00
case SID_FM_GRABCONTROLFOCUS:
{
FmFormView* pFormView = GetFormView();
if ( pFormView )
pFormView->GrabFirstControlFocus( );
}
break;
2000-09-18 16:07:07 +00:00
case SID_FM_VIEW_AS_GRID:
GetImpl()->CreateExternalView();
break;
case SID_FM_CONVERTTO_EDIT :
case SID_FM_CONVERTTO_BUTTON :
case SID_FM_CONVERTTO_FIXEDTEXT :
case SID_FM_CONVERTTO_LISTBOX :
case SID_FM_CONVERTTO_CHECKBOX :
case SID_FM_CONVERTTO_RADIOBUTTON :
case SID_FM_CONVERTTO_GROUPBOX :
case SID_FM_CONVERTTO_COMBOBOX :
case SID_FM_CONVERTTO_IMAGEBUTTON :
case SID_FM_CONVERTTO_FILECONTROL :
case SID_FM_CONVERTTO_DATE :
case SID_FM_CONVERTTO_TIME :
case SID_FM_CONVERTTO_NUMERIC :
case SID_FM_CONVERTTO_CURRENCY :
case SID_FM_CONVERTTO_PATTERN :
case SID_FM_CONVERTTO_IMAGECONTROL :
case SID_FM_CONVERTTO_FORMATTED :
case SID_FM_CONVERTTO_SCROLLBAR :
case SID_FM_CONVERTTO_SPINBUTTON :
case SID_FM_CONVERTTO_NAVIGATIONBAR :
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
GetImpl()->executeControlConversionSlot( nSlot );
2000-09-18 16:07:07 +00:00
// nach dem Konvertieren die Selektion neu bestimmern, da sich ja das selektierte Objekt
// geaendert hat
GetImpl()->SetSelection(GetFormView()->GetMarkedObjectList());
2000-09-18 16:07:07 +00:00
break;
case SID_FM_LEAVE_CREATE:
m_nLastSlot = 0;
GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_FM_CONFIG );
2000-09-18 16:07:07 +00:00
rReq.Done();
break;
case SID_FM_SHOW_PROPERTY_BROWSER:
{
SFX_REQUEST_ARG( rReq, pShowItem, SfxBoolItem, SID_FM_SHOW_PROPERTIES, sal_False );
sal_Bool bShow = sal_True;
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
if ( pShowItem )
2000-09-18 16:07:07 +00:00
bShow = pShowItem->GetValue();
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
GetImpl()->ShowSelectionProperties( bShow );
2000-09-18 16:07:07 +00:00
rReq.Done();
} break;
case SID_FM_PROPERTIES:
{
// PropertyBrowser anzeigen
SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSlot, sal_False);
sal_Bool bShow = pShowItem ? pShowItem->GetValue() : sal_True;
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
InterfaceBag aOnlyTheForm;
aOnlyTheForm.insert( Reference< XInterface >( GetImpl()->getCurrentForm(), UNO_QUERY ) );
GetImpl()->setCurrentSelection( aOnlyTheForm );
GetImpl()->ShowSelectionProperties( bShow );
2000-09-18 16:07:07 +00:00
rReq.Done();
} break;
case SID_FM_CTL_PROPERTIES:
{
SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSlot, sal_False);
sal_Bool bShow = pShowItem ? pShowItem->GetValue() : sal_True;
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
OSL_ENSURE( GetImpl()->onlyControlsAreMarked(), "FmFormShell::Execute: ControlProperties should be disabled!" );
if ( bShow )
GetImpl()->selectLastMarkedControls();
GetImpl()->ShowSelectionProperties( bShow );
2000-09-18 16:07:07 +00:00
rReq.Done();
} break;
case SID_FM_SHOW_PROPERTIES:
case SID_FM_ADD_FIELD:
case SID_FM_FILTER_NAVIGATOR:
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
case SID_FM_SHOW_DATANAVIGATOR :
2000-09-18 16:07:07 +00:00
{
GetViewShell()->GetViewFrame()->ChildWindowExecute(rReq);
2000-09-18 16:07:07 +00:00
rReq.Done();
} break;
case SID_FM_SHOW_FMEXPLORER:
{
if (!m_pFormView) // setzen der ::com::sun::star::sdbcx::View Forcieren
GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(SID_CREATE_SW_DRAWVIEW);
2000-09-18 16:07:07 +00:00
GetViewShell()->GetViewFrame()->ChildWindowExecute(rReq);
2000-09-18 16:07:07 +00:00
rReq.Done();
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
}
break;
2000-09-18 16:07:07 +00:00
case SID_FM_TAB_DIALOG:
{
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
GetImpl()->ExecuteTabOrderDialog( Reference< XTabControllerModel >( GetImpl()->getCurrentForm(), UNO_QUERY ) );
rReq.Done();
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
}
break;
2000-09-18 16:07:07 +00:00
case SID_FM_DESIGN_MODE:
{
SFX_REQUEST_ARG(rReq, pDesignItem, SfxBoolItem, nSlot, sal_False);
sal_Bool bDesignMode = pDesignItem ? pDesignItem->GetValue() : !m_bDesignMode;
SetDesignMode( bDesignMode );
if ( m_bDesignMode == bDesignMode )
rReq.Done();
m_nLastSlot = SID_FM_DESIGN_MODE;
GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_FM_CONFIG );
}
break;
2000-09-18 16:07:07 +00:00
case SID_FM_AUTOCONTROLFOCUS:
{
FmFormModel* pModel = GetFormModel();
DBG_ASSERT(pModel, "FmFormShell::Execute : invalid call !");
// should have been disabled in GetState if we don't have a FormModel
pModel->SetAutoControlFocus( !pModel->GetAutoControlFocus() );
GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_AUTOCONTROLFOCUS);
}
break;
2000-09-18 16:07:07 +00:00
case SID_FM_OPEN_READONLY:
{
FmFormModel* pModel = GetFormModel();
DBG_ASSERT(pModel, "FmFormShell::Execute : invalid call !");
// should have been disabled in GetState if we don't have a FormModel
2000-09-18 16:07:07 +00:00
pModel->SetOpenInDesignMode( !pModel->GetOpenInDesignMode() );
GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_OPEN_READONLY);
2000-09-18 16:07:07 +00:00
}
break;
case SID_FM_USE_WIZARDS:
{
GetImpl()->SetWizardUsing(!GetImpl()->GetWizardUsing());
GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_USE_WIZARDS);
2000-09-18 16:07:07 +00:00
}
break;
case SID_FM_SEARCH:
{
const ::svx::ControllerFeatures& rController = GetImpl()->getActiveControllerFeatures();
if ( rController->commitCurrentControl() && rController->commitCurrentRecord() )
2000-09-18 16:07:07 +00:00
GetImpl()->ExecuteSearch();
rReq.Done();
}
break;
2000-09-18 16:07:07 +00:00
case SID_FM_RECORD_FIRST:
case SID_FM_RECORD_PREV:
case SID_FM_RECORD_NEXT:
2000-09-18 16:07:07 +00:00
case SID_FM_RECORD_LAST:
case SID_FM_RECORD_NEW:
case SID_FM_REFRESH:
case SID_FM_REFRESH_FORM_CONTROL:
case SID_FM_RECORD_DELETE:
case SID_FM_RECORD_UNDO:
case SID_FM_RECORD_SAVE:
case SID_FM_REMOVE_FILTER_SORT:
case SID_FM_SORTDOWN:
case SID_FM_SORTUP:
case SID_FM_AUTOFILTER:
case SID_FM_ORDERCRIT:
case SID_FM_FORM_FILTERED:
{
GetImpl()->ExecuteFormSlot( nSlot );
2000-09-18 16:07:07 +00:00
rReq.Done();
}
break;
2000-09-18 16:07:07 +00:00
case SID_FM_RECORD_ABSOLUTE:
{
const ::svx::ControllerFeatures& rController = GetImpl()->getNavControllerFeatures();
2000-09-18 16:07:07 +00:00
sal_Int32 nRecord = -1;
const SfxItemSet* pArgs = rReq.GetArgs();
2000-09-18 16:07:07 +00:00
if ( pArgs )
{
const SfxPoolItem* pItem;
if ( ( pArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) ) == SFX_ITEM_SET )
2000-09-18 16:07:07 +00:00
{
const SfxInt32Item* pTypedItem = PTR_CAST( SfxInt32Item, pItem );
if ( pTypedItem )
nRecord = Max( pTypedItem->GetValue(), sal_Int32(0) );
2000-09-18 16:07:07 +00:00
}
}
else
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT( pFact, "no dialog factory!" );
if ( pFact )
{
::std::auto_ptr< AbstractFmInputRecordNoDialog > dlg( pFact->CreateFmInputRecordNoDialog( NULL, RID_SVX_DLG_INPUTRECORDNO ) );
DBG_ASSERT( dlg.get(), "Dialogdiet fail!" );
dlg->SetValue( rController->getCursor()->getRow() );
if ( dlg->Execute() == RET_OK )
nRecord = dlg->GetValue();
rReq.AppendItem( SfxInt32Item( FN_PARAM_1, nRecord ) );
2000-09-18 16:07:07 +00:00
}
}
if ( nRecord != -1 )
rController->execute( nSlot, ::rtl::OUString::createFromAscii( "Position" ), makeAny( (sal_Int32)nRecord ) );
2000-09-18 16:07:07 +00:00
rReq.Done();
} break;
case SID_FM_FILTER_EXECUTE:
case SID_FM_FILTER_EXIT:
2000-09-18 16:07:07 +00:00
{
sal_Bool bCancelled = ( SID_FM_FILTER_EXIT == nSlot );
sal_Bool bReopenNavigator = sal_False;
if ( !bCancelled )
2000-09-18 16:07:07 +00:00
{
// if the filter navigator is still open, we need to close it, so it can possibly
// commit it's most recent changes
if ( GetViewShell() && GetViewShell()->GetViewFrame() )
if ( GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_FILTER_NAVIGATOR ) )
{
GetViewShell()->GetViewFrame()->ToggleChildWindow( SID_FM_FILTER_NAVIGATOR );
bReopenNavigator = sal_True;
}
Reference< XFormController > xController( GetImpl()->getActiveController() );
if ( GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_FILTER_NAVIGATOR )
// closing the window was denied, for instance because of a invalid criterion
|| ( xController.is()
&& !GetImpl()->getActiveControllerFeatures()->commitCurrentControl( )
)
// committing the controller was denied
)
{
rReq.Done();
break;
}
2000-09-18 16:07:07 +00:00
}
GetImpl()->stopFiltering( !bCancelled );
2000-09-18 16:07:07 +00:00
rReq.Done();
if ( bReopenNavigator )
// we closed the navigator only to implicitly commit it (as we do not have another
// direct wire to it), but to the user, it should look it it was always open
GetViewShell()->GetViewFrame()->ToggleChildWindow( SID_FM_FILTER_NAVIGATOR );
}
break;
2000-09-18 16:07:07 +00:00
case SID_FM_FILTER_START:
{
GetImpl()->startFiltering();
rReq.Done();
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
} break;
2000-09-18 16:07:07 +00:00
}
}
//------------------------------------------------------------------------
void FmFormShell::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch( nWhich )
{
case SID_FM_MORE_CONTROLS:
case SID_FM_FORM_DESIGN_TOOLS:
{
FormToolboxes aToolboxAccess( GetImpl()->getHostFrame() );
rSet.Put( SfxBoolItem( nWhich, aToolboxAccess.isToolboxVisible( nWhich ) ) );
}
break;
case SID_FM_FILTER_EXECUTE:
case SID_FM_FILTER_EXIT:
if (!GetImpl()->isInFilterMode())
rSet.DisableItem( nWhich );
break;
2000-09-18 16:07:07 +00:00
case SID_FM_USE_WIZARDS:
if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) )
rSet.Put( SfxVisibilityItem( nWhich, sal_False ) );
else if (!m_bDesignMode || !GetFormModel())
2000-09-18 16:07:07 +00:00
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, GetImpl()->GetWizardUsing() ) );
break;
case SID_FM_AUTOCONTROLFOCUS:
if (!m_bDesignMode || !GetFormModel())
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, GetFormModel()->GetAutoControlFocus() ) );
break;
2000-09-18 16:07:07 +00:00
case SID_FM_OPEN_READONLY:
if (!m_bDesignMode || !GetFormModel())
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, GetFormModel()->GetOpenInDesignMode() ) );
break;
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
case SID_FM_NAVIGATIONBAR:
case SID_FM_DBGRID:
if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) )
{
rSet.Put( SfxVisibilityItem( nWhich, sal_False ) );
break;
}
// NO break!
case SID_FM_SCROLLBAR:
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
case SID_FM_IMAGECONTROL:
case SID_FM_FILECONTROL:
case SID_FM_CURRENCYFIELD:
case SID_FM_PATTERNFIELD:
case SID_FM_IMAGEBUTTON:
2000-09-18 16:07:07 +00:00
case SID_FM_RADIOBUTTON:
case SID_FM_COMBOBOX:
case SID_FM_GROUPBOX:
case SID_FM_CHECKBOX:
case SID_FM_PUSHBUTTON:
case SID_FM_FIXEDTEXT:
case SID_FM_LISTBOX:
case SID_FM_EDIT:
case SID_FM_DATEFIELD:
case SID_FM_TIMEFIELD:
case SID_FM_NUMERICFIELD:
case SID_FM_FORMATTEDFIELD:
case SID_FM_SPINBUTTON:
2000-09-18 16:07:07 +00:00
if (!m_bDesignMode)
rSet.DisableItem( nWhich );
else
{
sal_Bool bLayerLocked = sal_False;
if (m_pFormView)
{
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
// Ist der ::com::sun::star::drawing::Layer gelocked, so m???ssen die Slots disabled werden. #36897
SdrPageView* pPV = m_pFormView->GetSdrPageView();
if (pPV != NULL)
bLayerLocked = pPV->IsLayerLocked(m_pFormView->GetActiveLayer());
2000-09-18 16:07:07 +00:00
}
if (bLayerLocked)
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, (nWhich==m_nLastSlot)) );
}
break;
case SID_FM_FILTER_NAVIGATOR_CONTROL:
{
if (GetImpl()->isInFilterMode())
rSet.Put(SfxObjectItem(nWhich, this));
else
rSet.Put(SfxObjectItem(nWhich));
} break;
case SID_FM_FIELDS_CONTROL:
case SID_FM_PROPERTY_CONTROL:
{
if (!m_bDesignMode || !m_pFormView || !m_bHasForms)
rSet.Put(SfxObjectItem(nWhich));
else
rSet.Put(SfxObjectItem(nWhich, this));
} break;
case SID_FM_FMEXPLORER_CONTROL:
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
case SID_FM_DATANAVIGATOR_CONTROL :
2000-09-18 16:07:07 +00:00
{
if (!m_bDesignMode || !m_pFormView)
rSet.Put(SfxObjectItem(nWhich));
else
rSet.Put(SfxObjectItem(nWhich, this));
} break;
case SID_FM_ADD_FIELD:
case SID_FM_SHOW_FMEXPLORER:
case SID_FM_SHOW_PROPERTIES:
case SID_FM_FILTER_NAVIGATOR:
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
case SID_FM_SHOW_DATANAVIGATOR:
2000-09-18 16:07:07 +00:00
{
if ( GetViewShell()->GetViewFrame()->KnowsChildWindow(nWhich) )
rSet.Put( SfxBoolItem( nWhich, GetViewShell()->GetViewFrame()->HasChildWindow(nWhich)) );
else
rSet.DisableItem(nWhich);
} break;
case SID_FM_SHOW_PROPERTY_BROWSER:
{
rSet.Put(SfxBoolItem(GetImpl()->IsPropBrwOpen()));
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
}
break;
2000-09-18 16:07:07 +00:00
case SID_FM_CTL_PROPERTIES:
{
// der Impl eventuell die Moeglichjkeit geben, ihre an der aktuellen MarkList ausgerichteten Objekte
// auf den neuesten Stand zu bringen
if (GetImpl()->IsSelectionUpdatePending())
GetImpl()->ForceUpdateSelection(sal_False);
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
if ( !m_pFormView || !m_bDesignMode || !GetImpl()->onlyControlsAreMarked() )
2000-09-18 16:07:07 +00:00
rSet.DisableItem( nWhich );
else
{
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
sal_Bool bChecked = GetImpl()->IsPropBrwOpen() && !GetImpl()->isSolelySelected( GetImpl()->getCurrentForm() );
// if the property browser is open, and only controls are marked, and the current selection
// does not consist of only the current form, then the current selection is the (composition of)
// the currently marked controls
rSet.Put( SfxBoolItem( nWhich, bChecked ) );
2000-09-18 16:07:07 +00:00
}
} break;
case SID_FM_PROPERTIES:
{
// der Impl eventuell die Moeglichjkeit geben, ihre an der aktuellen MarkList ausgerichteten Objekte
// auf den neuesten Stand zu bringen
if (GetImpl()->IsSelectionUpdatePending())
GetImpl()->ForceUpdateSelection(sal_False);
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
if ( !m_pFormView || !m_bDesignMode || !GetImpl()->getCurrentForm().is() )
2000-09-18 16:07:07 +00:00
rSet.DisableItem( nWhich );
else
{
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
sal_Bool bChecked = GetImpl()->IsPropBrwOpen() && GetImpl()->isSolelySelected( GetImpl()->getCurrentForm() );
2000-09-18 16:07:07 +00:00
rSet.Put(SfxBoolItem(nWhich, bChecked));
}
} break;
case SID_FM_TAB_DIALOG:
// der Impl eventuell die Moeglichjkeit geben, ihre an der aktuellen MarkList ausgerichteten Objekte
// auf den neuesten Stand zu bringen
if (GetImpl()->IsSelectionUpdatePending())
GetImpl()->ForceUpdateSelection(sal_False);
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
if (!m_pFormView || !m_bDesignMode || !GetImpl()->getCurrentForm().is() )
2000-09-18 16:07:07 +00:00
rSet.DisableItem( nWhich );
break;
case SID_FM_CONFIG:
rSet.Put(SfxUInt16Item(nWhich, m_nLastSlot));
break;
case SID_FM_DESIGN_MODE:
if (!m_pFormView || GetImpl()->IsReadonlyDoc() )
2000-09-18 16:07:07 +00:00
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, m_bDesignMode) );
break;
case SID_FM_SEARCH:
case SID_FM_RECORD_FIRST:
case SID_FM_RECORD_NEXT:
case SID_FM_RECORD_PREV:
case SID_FM_RECORD_LAST:
case SID_FM_RECORD_NEW:
case SID_FM_RECORD_DELETE:
case SID_FM_RECORD_ABSOLUTE:
case SID_FM_RECORD_TOTAL:
case SID_FM_RECORD_SAVE:
case SID_FM_RECORD_UNDO:
case SID_FM_FORM_FILTERED:
case SID_FM_REMOVE_FILTER_SORT:
case SID_FM_SORTUP:
case SID_FM_SORTDOWN:
case SID_FM_ORDERCRIT:
case SID_FM_FILTER_START:
case SID_FM_AUTOFILTER:
case SID_FM_REFRESH:
case SID_FM_REFRESH_FORM_CONTROL:
2000-09-18 16:07:07 +00:00
case SID_FM_VIEW_AS_GRID:
GetFormState(rSet,nWhich);
break;
case SID_FM_CHANGECONTROLTYPE:
{
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
if ( !m_pFormView || !m_bDesignMode )
2000-09-18 16:07:07 +00:00
rSet.DisableItem( nWhich );
else
{
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
if ( !GetImpl()->canConvertCurrentSelectionToControl( OBJ_FM_FIXEDTEXT ) )
// if it cannot be converted to a fixed text, it is no single control
2000-09-18 16:07:07 +00:00
rSet.DisableItem( nWhich );
}
} break;
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
case SID_FM_CONVERTTO_FILECONTROL :
case SID_FM_CONVERTTO_CURRENCY :
case SID_FM_CONVERTTO_PATTERN :
case SID_FM_CONVERTTO_IMAGECONTROL :
case SID_FM_CONVERTTO_SCROLLBAR :
case SID_FM_CONVERTTO_NAVIGATIONBAR :
case SID_FM_CONVERTTO_IMAGEBUTTON :
2000-09-18 16:07:07 +00:00
case SID_FM_CONVERTTO_EDIT :
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
case SID_FM_CONVERTTO_BUTTON :
2000-09-18 16:07:07 +00:00
case SID_FM_CONVERTTO_FIXEDTEXT :
case SID_FM_CONVERTTO_LISTBOX :
case SID_FM_CONVERTTO_CHECKBOX :
case SID_FM_CONVERTTO_RADIOBUTTON :
case SID_FM_CONVERTTO_GROUPBOX :
case SID_FM_CONVERTTO_COMBOBOX :
case SID_FM_CONVERTTO_DATE :
case SID_FM_CONVERTTO_TIME :
case SID_FM_CONVERTTO_NUMERIC :
case SID_FM_CONVERTTO_FORMATTED :
case SID_FM_CONVERTTO_SPINBUTTON :
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
if ( !m_pFormView || !m_bDesignMode || !GetImpl()->canConvertCurrentSelectionToControl( nWhich ) )
2000-09-18 16:07:07 +00:00
rSet.DisableItem( nWhich );
else
{
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
rSet.Put( SfxBoolItem( nWhich, sal_False ) );
// just to have a defined state (available and not checked)
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED 2004/11/08 15:18:30 fs 1.48.52.16: #i10000# post-resync 2004/11/07 02:50:38 dvo 1.48.52.15: RESYNC: (1.53-1.54); FILE MERGED 2004/11/05 16:28:27 fs 1.48.52.14: #i36484# no form properties in XML form documents 2004/11/03 13:28:15 fs 1.48.52.13: DataNavigator only for eForms 2004/10/26 15:41:51 fs 1.48.52.12: #i33866# m_bXFormsMode superseded by m_eDocumentType (which is available now that we resynced) / don't allow conversion into unavailable controls in XForms mode 2004/10/14 10:32:17 dvo 1.48.52.11: resolve merge conflicts 2004/10/08 17:31:30 dvo 1.48.52.10: RESYNC: (1.52-1.53); FILE MERGED 2004/09/20 11:32:42 dvo 1.48.52.9: #i33874# disable non-XForms design-mode-switch in XForms mode (will become irrelevant when new form toolbar is in) 2004/08/11 18:04:46 dvo 1.48.52.8: #i31958# enable (old) design mode switch, because it is used by the XForms design mode switch 2004/08/05 09:51:24 dvo 1.48.52.7: #i31958# enable/disable certain form slots in XForms mode 2004/07/27 13:40:58 fs 1.48.52.6: RESYNC: (1.51-1.52); FILE MERGED 2004/07/22 09:58:02 fs 1.48.52.5: #i31762# #i11287# refined the selection handling 2004/07/21 15:20:15 fs 1.48.52.4: #i31762# no current object/control/form anymore, but a current selection 2004/07/08 10:03:00 fs 1.48.52.3: #i10000# corrected wrong post-resync conflict resolving 2004/06/25 14:26:55 dvo 1.48.52.2: RESYNC: (1.48-1.51); FILE MERGED 2004/06/09 13:34:33 pb 1.48.52.1: fix: #114856# the new xforms data navigator
2004-11-16 10:24:21 +00:00
}
break;
2000-09-18 16:07:07 +00:00
}
nWhich = aIter.NextWhich();
}
}
//------------------------------------------------------------------------
void FmFormShell::GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich)
{
if ( !GetImpl()->getNavController().is()
|| !isRowSetAlive(GetImpl()->getNavController()->getModel())
|| !m_pFormView
|| m_bDesignMode
|| !GetImpl()->getActiveForm().is()
|| GetImpl()->isInFilterMode()
|| ( GetImpl()->HasPendingCursorAction(GetImpl()->getNavController())
&& (SID_FM_RECORD_TOTAL != nWhich)
)
)
rSet.DisableItem(nWhich);
else
{
sal_Bool bEnable = sal_False;
try
2000-09-18 16:07:07 +00:00
{
switch (nWhich)
{
2000-09-18 16:07:07 +00:00
case SID_FM_VIEW_AS_GRID:
if (GetImpl()->getHostFrame().is() && GetImpl()->getNavController().is())
2000-09-18 16:07:07 +00:00
{
bEnable = sal_True;
sal_Bool bDisplayingCurrent =
GetImpl()->getInternalForm(
Reference< XForm >( GetImpl()->getNavController()->getModel(), UNO_QUERY )
) == GetImpl()->getExternallyDisplayedForm();
2000-09-18 16:07:07 +00:00
rSet.Put(SfxBoolItem(nWhich, bDisplayingCurrent));
}
break;
case SID_FM_SEARCH:
{
Reference< ::com::sun::star::beans::XPropertySet > xNavSet(GetImpl()->getActiveForm(), UNO_QUERY);
2000-10-20 13:18:57 +00:00
sal_Int32 nCount = ::comphelper::getINT32(xNavSet->getPropertyValue(FM_PROP_ROWCOUNT));
2000-09-18 16:07:07 +00:00
bEnable = nCount != 0;
} break;
case SID_FM_RECORD_ABSOLUTE:
case SID_FM_RECORD_TOTAL:
{
FeatureState aState;
GetImpl()->getNavControllerFeatures()->getState( nWhich, aState );
if ( SID_FM_RECORD_ABSOLUTE == nWhich )
2000-09-18 16:07:07 +00:00
{
sal_Int32 nPosition = 0;
aState.State >>= nPosition;
rSet.Put( SfxInt32Item( nWhich, nPosition ) );
2000-09-18 16:07:07 +00:00
}
else if ( SID_FM_RECORD_TOTAL == nWhich )
2000-09-18 16:07:07 +00:00
{
::rtl::OUString sTotalCount;
aState.State >>= sTotalCount;
rSet.Put( SfxStringItem( nWhich, sTotalCount ) );
}
bEnable = aState.Enabled;
}
break;
2000-09-18 16:07:07 +00:00
// first, prev, next, last, and absolute affect the nav controller, not the
// active controller
case SID_FM_RECORD_FIRST:
case SID_FM_RECORD_PREV:
case SID_FM_RECORD_NEXT:
case SID_FM_RECORD_LAST:
case SID_FM_RECORD_NEW:
case SID_FM_RECORD_SAVE:
case SID_FM_RECORD_UNDO:
case SID_FM_RECORD_DELETE:
case SID_FM_REFRESH:
case SID_FM_REFRESH_FORM_CONTROL:
2000-09-18 16:07:07 +00:00
case SID_FM_REMOVE_FILTER_SORT:
case SID_FM_SORTUP:
case SID_FM_SORTDOWN:
case SID_FM_AUTOFILTER:
case SID_FM_ORDERCRIT:
bEnable = GetImpl()->IsFormSlotEnabled( nWhich );
2000-09-18 16:07:07 +00:00
break;
2000-09-18 16:07:07 +00:00
case SID_FM_FORM_FILTERED:
{
FeatureState aState;
bEnable = GetImpl()->IsFormSlotEnabled( nWhich, &aState );
rSet.Put( SfxBoolItem( nWhich, ::comphelper::getBOOL( aState.State ) ) );
}
break;
case SID_FM_FILTER_START:
bEnable = GetImpl()->getActiveControllerFeatures()->canDoFormFilter();
break;
}
}
catch( const Exception& )
{
DBG_ERROR( "FmFormShell::GetFormState: caught an exception while determining the state!" );
2000-09-18 16:07:07 +00:00
}
if (!bEnable)
rSet.DisableItem(nWhich);
}
}
//------------------------------------------------------------------------
FmFormPage* FmFormShell::GetCurPage() const
{
FmFormPage* pP = NULL;
if (m_pFormView && m_pFormView->GetSdrPageView())
pP = PTR_CAST(FmFormPage,m_pFormView->GetSdrPageView()->GetPage());
2000-09-18 16:07:07 +00:00
return pP;
}
//------------------------------------------------------------------------
void FmFormShell::SetView( FmFormView* _pView )
2000-09-18 16:07:07 +00:00
{
if ( m_pFormView )
2000-09-18 16:07:07 +00:00
{
if ( IsActive() )
GetImpl()->viewDeactivated( *m_pFormView );
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
m_pFormView->SetFormShell( NULL, FmFormView::FormShellAccess() );
2000-09-18 16:07:07 +00:00
m_pFormView = NULL;
m_pFormModel = NULL;
2000-09-18 16:07:07 +00:00
}
if ( !_pView )
return;
m_pFormView = _pView;
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
m_pFormView->SetFormShell( this, FmFormView::FormShellAccess() );
m_pFormModel = (FmFormModel*)m_pFormView->GetModel();
impl_setDesignMode( m_pFormView->IsDesignMode() );
// We activate our view if we are activated ourself, but sometimes the Activate precedes the SetView.
// But here we know both the view and our activation state so we at least are able to pass the latter
// to the former.
// FS - 30.06.99 - 67308
if ( IsActive() )
GetImpl()->viewActivated( *m_pFormView );
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------
void FmFormShell::DetermineForms(sal_Bool bInvalidate)
{
// Existieren Formulare auf der aktuellen Page
sal_Bool bForms = GetImpl()->hasForms();
if (bForms != m_bHasForms)
{
m_bHasForms = bForms;
if (bInvalidate)
UIFeatureChanged();
}
}
//------------------------------------------------------------------------
sal_Bool FmFormShell::GetY2KState(sal_uInt16& nReturn)
{
return GetImpl()->GetY2KState(nReturn);
}
//------------------------------------------------------------------------
void FmFormShell::SetY2KState(sal_uInt16 n)
{
GetImpl()->SetY2KState(n);
}
//------------------------------------------------------------------------
void FmFormShell::Activate(sal_Bool bMDI)
{
SfxShell::Activate(bMDI);
if ( m_pFormView )
GetImpl()->viewActivated( *m_pFormView, sal_True );
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------
void FmFormShell::Deactivate(sal_Bool bMDI)
{
SfxShell::Deactivate(bMDI);
if ( m_pFormView )
GetImpl()->viewDeactivated( *m_pFormView, sal_False );
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------
void FmFormShell::ExecuteTextAttribute( SfxRequest& _rReq )
{
m_pImpl->ExecuteTextAttribute( _rReq );
}
//------------------------------------------------------------------------
void FmFormShell::GetTextAttributeState( SfxItemSet& _rSet )
{
m_pImpl->GetTextAttributeState( _rSet );
}
//------------------------------------------------------------------------
bool FmFormShell::IsActiveControl() const
{
return m_pImpl->IsActiveControl();
}
//------------------------------------------------------------------------
void FmFormShell::ForgetActiveControl()
{
m_pImpl->ForgetActiveControl();
}
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------
void FmFormShell::SetControlActivationHandler( const Link& _rHdl )
{
m_pImpl->SetControlActivationHandler( _rHdl );
}
//------------------------------------------------------------------------
SdrUnoObj* FmFormShell::GetFormControl( const Reference< XControlModel >& _rxModel, const SdrView& _rView, const OutputDevice& _rDevice, Reference< XControl >& _out_rxControl ) const
{
if ( !_rxModel.is() )
return NULL;
FmFormModel* pModel = GetFormModel();
OSL_ENSURE( pModel, "FmFormShell::GetFormControl: no model!" );
if ( !pModel )
return NULL;
sal_uInt16 pageCount = pModel->GetPageCount();
for ( sal_uInt16 page = 0; page < pageCount; ++page )
{
SdrPage* pPage = pModel->GetPage( page );
OSL_ENSURE( pPage, "FmFormShell::GetFormControl: NULL page encountered!" );
if ( !pPage )
continue;
SdrObjListIter aIter( *pPage );
while ( aIter.IsMore() )
{
SdrObject* pObject = aIter.Next();
SdrUnoObj* pUnoObject = pObject ? PTR_CAST( SdrUnoObj, pObject ) : NULL;
if ( !pUnoObject )
continue;
Reference< XControlModel > xControlModel = pUnoObject->GetUnoControlModel();
if ( !xControlModel.is() )
continue;
if ( _rxModel == xControlModel )
{
_out_rxControl = pUnoObject->GetUnoControl( _rView, _rDevice );
return pUnoObject;
}
}
}
return NULL;
}
//------------------------------------------------------------------------
Reference< XFormController > FmFormShell::GetFormController( const Reference< XForm >& _rxForm, const SdrView& _rView, const OutputDevice& _rDevice ) const
{
const FmFormView* pFormView = dynamic_cast< const FmFormView* >( &_rView );
if ( !pFormView )
return NULL;
return pFormView->GetFormController( _rxForm, _rDevice );
}
//------------------------------------------------------------------------
void FmFormShell::SetDesignMode( sal_Bool _bDesignMode )
{
if ( _bDesignMode == m_bDesignMode )
return;
// if we are moving our data source cursor currently ....
if ( GetImpl()->HasAnyPendingCursorAction() )
// ... cancel this
GetImpl()->CancelAnyPendingCursorAction();
FmFormModel* pModel = GetFormModel();
if (pModel)
// fuer die Zeit des Uebergangs das Undo-Environment ausschalten, das sichert, dass man dort auch nicht-transiente
// Properties mal eben aendern kann (sollte allerdings mit Vorsicht genossen und beim Rueckschalten des Modes
// auch immer wieder rueckgaegig gemacht werden. Ein Beispiel ist das Setzen der maximalen Text-Laenge durch das
// OEditModel an seinem Control.)
pModel->GetUndoEnv().Lock();
// dann die eigentliche Umschaltung
if ( m_bDesignMode || PrepareClose( sal_True ) )
impl_setDesignMode(!m_bDesignMode );
// und mein Undo-Environment wieder an
if ( pModel )
pModel->GetUndoEnv().UnLock();
}