summaryrefslogtreecommitdiff
path: root/svx/source/form/fmview.cxx
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2008-12-01 12:31:27 +0000
committerRelease Engineers <releng@openoffice.org>2008-12-01 12:31:27 +0000
commit7a5d79f2297a43d0a854e304b0792164272edfe0 (patch)
treef25e19c1ca477035aa7d38e62a409b00f218be5d /svx/source/form/fmview.cxx
parentade7966e844a6c54afe1faf27c439b6a2297382b (diff)
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
Diffstat (limited to 'svx/source/form/fmview.cxx')
-rw-r--r--svx/source/form/fmview.cxx139
1 files changed, 20 insertions, 119 deletions
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index af0bee21c9bf..2b5095473067 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -56,25 +56,15 @@
#include "svditer.hxx"
#include <svx/svdpagv.hxx>
#include <svx/svdogrp.hxx>
-#ifndef _FM_FMVIEW_HXX
#include <svx/fmview.hxx>
-#endif
-#ifndef _FM_FMMODEL_HXX
#include <svx/fmmodel.hxx>
-#endif
-#ifndef _FM_FMPAGE_HXX
#include <svx/fmpage.hxx>
-#endif
#include <svx/fmshell.hxx>
-#ifndef _SVX_FMPGEIMP_HXX
#include "fmpgeimp.hxx"
-#endif
#include "fmtools.hxx"
#include "fmshimp.hxx"
#include "fmservs.hxx"
-#ifndef _SVX_FMPROP_HRC
#include "fmprop.hrc"
-#endif
#include "fmundo.hxx"
#include <svx/dataaccessdescriptor.hxx>
#include <comphelper/processfactory.hxx>
@@ -85,6 +75,7 @@
#include <com/sun/star/form/FormComponentType.hpp>
#include <vcl/svapp.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/stdtext.hxx>
#include <svx/fmglob.hxx>
#include <svx/sdrpagewindow.hxx>
@@ -95,7 +86,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
-using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::form;
@@ -445,97 +435,6 @@ void FmFormView::DeactivateControls(SdrPageView* pPageView)
}
//------------------------------------------------------------------------
-void FmFormView::ObjectCreated(FmFormObj* pObj)
-{
- // it is valid that the form shell's forms collection is not initialized, yet
- if ( pFormShell && pFormShell->GetImpl() )
- pFormShell->GetImpl()->UpdateForms( sal_True );
-
- Reference< XPropertySet > xSet( pObj->GetUnoControlModel(), UNO_QUERY );
- if ( !xSet.is() )
- return;
-
- // some initial property defaults
- sal_Int16 nClassId = pImpl->implInitializeNewControlModel( xSet, pObj );
-
- if ( !pFormShell->GetImpl()->GetWizardUsing() )
- return;
-
- // #i31958# don't call wizards in XForms mode
- if ( pFormShell->GetImpl()->isEnhancedForm() )
- return;
-
- // #i46898# no wizards if there is no Base installed - currently, all wizards are
- // database related
- if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) )
- return;
-
- Reference< XChild > xChild(xSet, UNO_QUERY);
- Reference< XRowSet > xForm(xChild->getParent(), UNO_QUERY);
- String sWizardName;
- Any aObj;
-
- switch (nClassId)
- {
- case FormComponentType::GRIDCONTROL:
- sWizardName.AssignAscii("com.sun.star.sdb.GridControlAutoPilot");
- aObj <<= xChild;
- break;
- case FormComponentType::LISTBOX:
- case FormComponentType::COMBOBOX:
- sWizardName.AssignAscii("com.sun.star.sdb.ListComboBoxAutoPilot");
- aObj <<= xChild;
- break;
- case FormComponentType::GROUPBOX:
- sWizardName.AssignAscii("com.sun.star.sdb.GroupBoxAutoPilot");
- aObj <<= xChild;
- break;
- }
-
- if (sWizardName.Len() != 0)
- {
- // build the argument list
- Sequence< Any > aWizardArgs(1);
- // the object affected
- aWizardArgs[0] = makeAny(PropertyValue(
- ::rtl::OUString::createFromAscii("ObjectModel"),
- 0,
- makeAny(xChild),
- PropertyState_DIRECT_VALUE
- ));
-
- // create the wizard object
- Reference< XExecutableDialog > xWizard;
- try
- {
- Reference< XMultiServiceFactory > xORB = ::comphelper::getProcessServiceFactory();
- xWizard = Reference< XExecutableDialog >(
- ::comphelper::getProcessServiceFactory()->createInstanceWithArguments(sWizardName, aWizardArgs),
- UNO_QUERY);
- }
- catch(Exception&)
- {
- }
- if (!xWizard.is())
- {
- ShowServiceNotAvailableError(NULL, sWizardName, sal_True);
- return;
- }
-
- // execute the wizard
- try
- {
- xWizard->execute();
- }
- catch(Exception&)
- {
- DBG_ERROR("FmFormView::ObjectCreated: could not execute the AutoPilot!");
- // TODO: real error handling
- }
- }
-}
-
-//------------------------------------------------------------------------
SdrObject* FmFormView::CreateFieldControl( const ODataAccessDescriptor& _rColumnDescriptor )
{
return pImpl->implCreateFieldControl( _rColumnDescriptor );
@@ -643,7 +542,7 @@ BOOL FmFormView::KeyInput(const KeyEvent& rKEvt, Window* pWin)
}
}
}
- // Alt-RETURN alone enters shows the properties of the selection
+ // Alt-RETURN alone shows the properties of the selection
if ( pFormShell
&& pFormShell->GetImpl()
&& !rKeyCode.IsShift()
@@ -689,37 +588,39 @@ BOOL FmFormView::MouseButtonDown( const MouseEvent& _rMEvt, Window* _pWin )
// -----------------------------------------------------------------------------
FmFormObj* FmFormView::getMarkedGrid() const
{
- FmFormObj* pObj = NULL;
+ FmFormObj* pFormObject = NULL;
const SdrMarkList& rMarkList = GetMarkedObjectList();
if ( 1 == rMarkList.GetMarkCount() )
{
SdrMark* pMark = rMarkList.GetMark(0);
if ( pMark )
{
- pObj = PTR_CAST(FmFormObj,pMark->GetMarkedSdrObj());
- if ( pObj )
+ pFormObject = FmFormObj::GetFormObject( pMark->GetMarkedSdrObj() );
+ if ( pFormObject )
{
- Reference<XServiceInfo> xServInfo(pObj->GetUnoControlModel(),UNO_QUERY);
- if ( !xServInfo.is() || !xServInfo->supportsService(FM_SUN_COMPONENT_GRIDCONTROL) )
- pObj = NULL;
+ Reference< XServiceInfo > xServInfo( pFormObject->GetUnoControlModel(), UNO_QUERY );
+ if ( !xServInfo.is() || !xServInfo->supportsService( FM_SUN_COMPONENT_GRIDCONTROL ) )
+ pFormObject = NULL;
}
}
}
- return pObj;
+ return pFormObject;
}
// -----------------------------------------------------------------------------
-void FmFormView::createControlLabelPair(SdrView* _pView,OutputDevice* _pOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
+void FmFormView::createControlLabelPair( OutputDevice* _pOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
const Reference< XPropertySet >& _rxField, const Reference< XNumberFormats >& _rxNumberFormats,
- sal_uInt16 _nObjID, const ::rtl::OUString& _rFieldPostfix,UINT32 _nInventor,UINT16 _nIndent,
- SdrPage* _pLabelPage,SdrPage* _pPage,SdrModel* _pModel,
- SdrUnoObj*& _rpLabel, SdrUnoObj*& _rpControl)
+ sal_uInt16 _nControlObjectID, const ::rtl::OUString& _rFieldPostfix, UINT32 _nInventor, UINT16 _nLabelObjectID,
+ SdrPage* _pLabelPage, SdrPage* _pControlPage, SdrModel* _pModel, SdrUnoObj*& _rpLabel, SdrUnoObj*& _rpControl )
{
- FmXFormView::createControlLabelPair(_pView,_pOutDev,_nXOffsetMM, _nYOffsetMM,
- _rxField, _rxNumberFormats,
- _nObjID, _rFieldPostfix,_nInventor,_nIndent,
- _pLabelPage,_pPage,_pModel,
- _rpLabel, _rpControl);
+ FmXFormView::createControlLabelPair(
+ ::comphelper::getProcessServiceFactory(),
+ *_pOutDev, _nXOffsetMM, _nYOffsetMM,
+ _rxField, _rxNumberFormats,
+ _nControlObjectID, _rFieldPostfix, _nInventor, _nLabelObjectID,
+ _pLabelPage, _pControlPage, _pModel,
+ _rpLabel, _rpControl
+ );
}
// -----------------------------------------------------------------------------
Reference< XFormController > FmFormView::GetFormController( const Reference< XForm >& _rxForm, const OutputDevice& _rDevice ) const