CWS-TOOLING: integrate CWS unoawt

This commit is contained in:
obo
2010-06-15 10:58:34 +02:00
19 changed files with 77 additions and 70 deletions

View File

@@ -141,12 +141,12 @@ namespace abp
}
//---------------------------------------------------------------------
sal_Bool FinalPage::commitPage( CommitPageReason _eReason )
sal_Bool FinalPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;
if ( ( eTravelBackward != _eReason )
if ( ( ::svt::WizardTypes::eTravelBackward != _eReason )
&& ( !m_aLocationController.prepareCommit() )
)
return sal_False;

View File

@@ -66,7 +66,7 @@ namespace abp
protected:
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// TabDialog overridables
virtual void ActivatePage();

View File

@@ -213,14 +213,11 @@ namespace abp
}
//---------------------------------------------------------------------
sal_Bool OAddessBookSourcePilot::onFinish(sal_Int32 _nResult)
sal_Bool OAddessBookSourcePilot::onFinish()
{
if (!OAddessBookSourcePilot_Base::onFinish(_nResult))
if ( !OAddessBookSourcePilot_Base::onFinish() )
return sal_False;
if (RET_OK != _nResult)
return sal_True;
implCommitAll();
addressconfig::markPilotSuccess( getORB() );
@@ -283,9 +280,7 @@ namespace abp
if ( aTables.empty() )
{
if ( ( _eReason == eValidateNoUI )
|| ( RET_YES != QueryBox( this, ModuleRes( RID_QRY_NOTABLES ) ).Execute() )
)
if ( RET_YES != QueryBox( this, ModuleRes( RID_QRY_NOTABLES ) ).Execute() )
{
// cannot ask the user, or the user chose to use this data source, though there are no tables
bAllow = sal_False;

View File

@@ -79,7 +79,7 @@ namespace abp
virtual ::svt::OWizardPage* createPage( WizardState _nState );
virtual void enterState( WizardState _nState );
virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
virtual sal_Bool onFinish( sal_Int32 _nResult );
virtual sal_Bool onFinish();
// RoadmapWizard
virtual String getStateDisplayName( WizardState _nState ) const;

View File

@@ -109,7 +109,7 @@ namespace abp
}
//---------------------------------------------------------------------
sal_Bool TableSelectionPage::commitPage( CommitPageReason _eReason )
sal_Bool TableSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;

View File

@@ -51,7 +51,7 @@ namespace abp
protected:
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// TabDialog overridables
virtual void ActivatePage();

View File

@@ -207,18 +207,15 @@ namespace abp
}
//---------------------------------------------------------------------
sal_Bool TypeSelectionPage::commitPage( CommitPageReason _eReason )
sal_Bool TypeSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;
if (AST_INVALID == getSelectedType( ))
{
if ( _eReason != eValidateNoUI )
{
ErrorBox aError(this, ModuleRes(RID_ERR_NEEDTYPESELECTION));
aError.Execute();
}
ErrorBox aError(this, ModuleRes(RID_ERR_NEEDTYPESELECTION));
aError.Execute();
return sal_False;
}

View File

@@ -83,7 +83,7 @@ namespace abp
protected:
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// TabDialog overridables
virtual void ActivatePage();

View File

@@ -164,7 +164,7 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OTableSelectionPage::commitPage( CommitPageReason _eReason )
sal_Bool OTableSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OControlWizardPage::commitPage(_eReason))
return sal_False;
@@ -493,7 +493,7 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool ODBFieldPage::commitPage( CommitPageReason _eReason )
sal_Bool ODBFieldPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OMaybeListSelectionPage::commitPage(_eReason))
return sal_False;

View File

@@ -64,7 +64,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
protected:
DECL_LINK( OnListboxSelection, ListBox* );
@@ -131,7 +131,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// own overridables
virtual String& getDBFieldSetting() = 0;

View File

@@ -156,7 +156,7 @@ namespace dbp
_rList.Clear();
const ::rtl::OUString* pItems = _rItems.getConstArray();
const ::rtl::OUString* pEnd = pItems + _rItems.getLength();
WizardState nPos;
::svt::WizardTypes::WizardState nPos;
sal_Int32 nIndex = 0;
for (;pItems < pEnd; ++pItems, ++nIndex)
{
@@ -172,7 +172,7 @@ namespace dbp
_rList.Clear();
const ::rtl::OUString* pItems = _rItems.getConstArray();
const ::rtl::OUString* pEnd = pItems + _rItems.getLength();
WizardState nPos;
::svt::WizardTypes::WizardState nPos;
sal_Int32 nIndex = 0;
for (;pItems < pEnd; ++pItems)
{
@@ -254,7 +254,7 @@ namespace dbp
m_pFormDatasource->SetText(sDataSource);
m_pFormTable->SetText(sCommand);
WizardState nCommandTypeResourceId = 0;
::svt::WizardTypes::WizardState nCommandTypeResourceId = 0;
switch (nCommandType)
{
case CommandType::TABLE:

View File

@@ -289,9 +289,9 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OGridWizard::onFinish(sal_Int32 _nResult)
sal_Bool OGridWizard::onFinish()
{
if (!OControlWizard::onFinish(_nResult))
if ( !OControlWizard::onFinish() )
return sal_False;
implApplySettings();
@@ -366,7 +366,7 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OGridFieldsSelection::commitPage( CommitPageReason _eReason )
sal_Bool OGridFieldsSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGridPage::commitPage(_eReason))
return sal_False;

View File

@@ -68,8 +68,7 @@ namespace dbp
virtual WizardState determineNextState( WizardState _nCurrentState ) const;
virtual void enterState( WizardState _nState );
virtual sal_Bool leaveState( WizardState _nState );
virtual sal_Bool onFinish(sal_Int32 _nResult);
virtual sal_Bool onFinish();
virtual sal_Bool approveControl(sal_Int16 _nClassId);
@@ -114,7 +113,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
protected:

View File

@@ -79,7 +79,7 @@ namespace dbp
}
//---------------------------------------------------------------------
OWizardPage* OGroupBoxWizard::createPage(WizardState _nState)
OWizardPage* OGroupBoxWizard::createPage(::svt::WizardTypes::WizardState _nState)
{
switch (_nState)
{
@@ -106,7 +106,7 @@ namespace dbp
}
//---------------------------------------------------------------------
WizardTypes::WizardState OGroupBoxWizard::determineNextState( WizardState _nCurrentState ) const
WizardTypes::WizardState OGroupBoxWizard::determineNextState( ::svt::WizardTypes::WizardState _nCurrentState ) const
{
switch (_nCurrentState)
{
@@ -133,7 +133,7 @@ namespace dbp
}
//---------------------------------------------------------------------
void OGroupBoxWizard::enterState(WizardState _nState)
void OGroupBoxWizard::enterState(::svt::WizardTypes::WizardState _nState)
{
// some stuff to do before calling the base class (modifying our settings)
switch (_nState)
@@ -187,18 +187,15 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OGroupBoxWizard::onFinish(sal_Int32 _nResult)
sal_Bool OGroupBoxWizard::onFinish()
{
if (RET_OK != _nResult)
return OControlWizard::onFinish(_nResult);
// commit the basic control setttings
commitControlSettings(&m_aSettings);
// create the radio buttons
createRadios();
return OControlWizard::onFinish(_nResult);
return OControlWizard::onFinish();
}
//=====================================================================
@@ -265,7 +262,7 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool ORadioSelectionPage::commitPage( CommitPageReason _eReason )
sal_Bool ORadioSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGBWPage::commitPage(_eReason))
return sal_False;
@@ -277,7 +274,7 @@ namespace dbp
rSettings.aValues.clear();
rSettings.aLabels.reserve(m_aExistingRadios.GetEntryCount());
rSettings.aValues.reserve(m_aExistingRadios.GetEntryCount());
for (WizardState i=0; i<m_aExistingRadios.GetEntryCount(); ++i)
for (::svt::WizardTypes::WizardState i=0; i<m_aExistingRadios.GetEntryCount(); ++i)
{
rSettings.aLabels.push_back(m_aExistingRadios.GetEntry(i));
rSettings.aValues.push_back(String::CreateFromInt32((sal_Int32)(i + 1)));
@@ -393,7 +390,7 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool ODefaultFieldSelectionPage::commitPage( CommitPageReason _eReason )
sal_Bool ODefaultFieldSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OMaybeListSelectionPage::commitPage(_eReason))
return sal_False;
@@ -416,7 +413,7 @@ namespace dbp
,m_aValue (this, ModuleRes(ET_OPTIONVALUE))
,m_aOptionsLabel (this, ModuleRes(FT_RADIOBUTTONS))
,m_aOptions (this, ModuleRes(LB_RADIOBUTTONS))
,m_nLastSelection((WizardState)-1)
,m_nLastSelection((::svt::WizardTypes::WizardState)-1)
{
FreeResource();
@@ -440,7 +437,7 @@ namespace dbp
//---------------------------------------------------------------------
void OOptionValuesPage::implTraveledOptions()
{
if ((WizardState)-1 != m_nLastSelection)
if ((::svt::WizardTypes::WizardState)-1 != m_nLastSelection)
{
// save the value for the last option
DBG_ASSERT((size_t)m_nLastSelection < m_aUncommittedValues.size(), "OOptionValuesPage::implTraveledOptions: invalid previous selection index!");
@@ -480,7 +477,7 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OOptionValuesPage::commitPage( CommitPageReason _eReason )
sal_Bool OOptionValuesPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGBWPage::commitPage(_eReason))
return sal_False;
@@ -548,7 +545,7 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OFinalizeGBWPage::commitPage( CommitPageReason _eReason )
sal_Bool OFinalizeGBWPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGBWPage::commitPage(_eReason))
return sal_False;

View File

@@ -73,8 +73,7 @@ namespace dbp
virtual ::svt::OWizardPage* createPage( WizardState _nState );
virtual WizardState determineNextState( WizardState _nCurrentState ) const;
virtual void enterState( WizardState _nState );
virtual sal_Bool onFinish(sal_Int32 _nResult);
virtual sal_Bool onFinish();
virtual sal_Bool approveControl(sal_Int16 _nClassId);
@@ -117,7 +116,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
DECL_LINK( OnMoveEntry, PushButton* );
@@ -145,7 +144,7 @@ namespace dbp
protected:
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
};
@@ -164,7 +163,8 @@ namespace dbp
ListBox m_aOptions;
StringArray m_aUncommittedValues;
WizardState m_nLastSelection;
::svt::WizardTypes::WizardState
m_nLastSelection;
public:
OOptionValuesPage( OControlWizard* _pParent );
@@ -175,7 +175,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
void implTraveledOptions();
@@ -217,7 +217,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
};

View File

@@ -226,14 +226,11 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OListComboWizard::onFinish(sal_Int32 _nResult)
sal_Bool OListComboWizard::onFinish()
{
if (!OControlWizard::onFinish(_nResult))
if ( !OControlWizard::onFinish() )
return sal_False;
if (RET_OK != _nResult)
return sal_True;
implApplySettings();
return sal_True;
}
@@ -362,14 +359,14 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OContentTableSelection::commitPage( CommitPageReason _eReason )
sal_Bool OContentTableSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OLCPage::commitPage(_eReason))
return sal_False;
OListComboSettings& rSettings = getSettings();
rSettings.sListContentTable = m_aSelectTable.GetSelectEntry();
if (!rSettings.sListContentTable.Len() && (eTravelBackward != _eReason))
if (!rSettings.sListContentTable.Len() && (::svt::WizardTypes::eTravelBackward != _eReason))
// need to select a table
return sal_False;
@@ -440,7 +437,7 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OContentFieldSelection::commitPage( CommitPageReason _eReason )
sal_Bool OContentFieldSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OLCPage::commitPage(_eReason))
return sal_False;
@@ -518,7 +515,7 @@ namespace dbp
}
//---------------------------------------------------------------------
sal_Bool OLinkFieldsPage::commitPage( CommitPageReason _eReason )
sal_Bool OLinkFieldsPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OLCPage::commitPage(_eReason))
return sal_False;

View File

@@ -80,8 +80,7 @@ namespace dbp
virtual WizardState determineNextState( WizardState _nCurrentState ) const;
virtual void enterState( WizardState _nState );
virtual sal_Bool leaveState( WizardState _nState );
virtual sal_Bool onFinish(sal_Int32 _nResult);
virtual sal_Bool onFinish();
virtual sal_Bool approveControl(sal_Int16 _nClassId);
@@ -129,7 +128,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
protected:
@@ -163,7 +162,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
};
@@ -190,7 +189,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
virtual sal_Bool commitPage( CommitPageReason _eReason );
virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
private:

View File

@@ -174,6 +174,8 @@ namespace frm
m_eListSourceType = ListSourceType_VALUELIST;
m_aBoundColumn <<= (sal_Int16)1;
initValueProperty( PROPERTY_SELECT_SEQ, PROPERTY_ID_SELECT_SEQ);
startAggregatePropertyListening( PROPERTY_STRINGITEMLIST );
}
//------------------------------------------------------------------
@@ -191,6 +193,8 @@ namespace frm
,m_nBoundColumnType( DataType::SQLNULL )
{
DBG_CTOR(OListBoxModel,NULL);
startAggregatePropertyListening( PROPERTY_STRINGITEMLIST );
}
//------------------------------------------------------------------
@@ -452,6 +456,22 @@ namespace frm
END_DESCRIBE_PROPERTIES();
}
//------------------------------------------------------------------------------
void OListBoxModel::_propertyChanged( const PropertyChangeEvent& i_rEvent ) throw ( RuntimeException )
{
if ( i_rEvent.PropertyName == PROPERTY_STRINGITEMLIST )
{
ControlModelLock aLock( *this );
// SYNCHRONIZED ----->
// our aggregate internally changed its StringItemList property - reflect this in our "overridden"
// version of the property
setNewStringItemList( i_rEvent.NewValue, aLock );
// <----- SYNCHRONIZED
return;
}
OBoundControlModel::_propertyChanged( i_rEvent );
}
//------------------------------------------------------------------------------
void OListBoxModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{

View File

@@ -134,6 +134,9 @@ protected:
// XEventListener
virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw (::com::sun::star::uno::RuntimeException);
// OPropertyChangeListener
virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& _rEvt ) throw ( ::com::sun::star::uno::RuntimeException );
// prevent method hiding
using OBoundControlModel::getFastPropertyValue;
using OBoundControlModel::setPropertyValues;