Kaydet (Commit) 85cf4881 authored tarafından Caolán McNamara's avatar Caolán McNamara

drop FixedLines from wizards to be consistent with the rest of the ui

and two virtual methods don't need to exist after that

Change-Id: I50ea8eaa99fddfed7e0c61e99e76631aa595f2dc
üst 7de2366a
...@@ -69,7 +69,6 @@ CreationWizard::CreationWizard( Window* pParent, const uno::Reference< frame::XM ...@@ -69,7 +69,6 @@ CreationWizard::CreationWizard( Window* pParent, const uno::Reference< frame::XM
, m_bCanTravel( true ) , m_bCanTravel( true )
{ {
m_pDialogModel.reset( new DialogModel( m_xChartModel, m_xCC )); m_pDialogModel.reset( new DialogModel( m_xChartModel, m_xCC ));
ShowButtonFixedLine( true );
defaultButton( WZB_FINISH ); defaultButton( WZB_FINISH );
if( m_nOnePageOnlyIndex < 0 || m_nOnePageOnlyIndex >= nPageCount ) if( m_nOnePageOnlyIndex < 0 || m_nOnePageOnlyIndex >= nPageCount )
......
...@@ -144,7 +144,6 @@ namespace dbmm ...@@ -144,7 +144,6 @@ namespace dbmm
declarePath( PATH_DEFAULT, STATE_CLOSE_SUB_DOCS, STATE_BACKUP_DBDOC, STATE_MIGRATE, STATE_SUMMARY, WZS_INVALID_STATE ); declarePath( PATH_DEFAULT, STATE_CLOSE_SUB_DOCS, STATE_BACKUP_DBDOC, STATE_MIGRATE, STATE_SUMMARY, WZS_INVALID_STATE );
SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MAP_APPFONT ) ); SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MAP_APPFONT ) );
ShowButtonFixedLine( true );
SetRoadmapInteractive( true ); SetRoadmapInteractive( true );
enableAutomaticNextButtonState(); enableAutomaticNextButtonState();
defaultButton( WZB_NEXT ); defaultButton( WZB_NEXT );
......
...@@ -83,7 +83,6 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent ...@@ -83,7 +83,6 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent
m_eType = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(*m_pOutSet); m_eType = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(*m_pOutSet);
SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT)); SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT));
ShowButtonFixedLine(true);
defaultButton(WZB_NEXT); defaultButton(WZB_NEXT);
enableButtons(WZB_FINISH, false); enableButtons(WZB_FINISH, false);
enableAutomaticNextButtonState( true ); enableAutomaticNextButtonState( true );
......
...@@ -149,7 +149,6 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent ...@@ -149,7 +149,6 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent
m_pImpl->translateProperties(xDatasource, *m_pOutSet); m_pImpl->translateProperties(xDatasource, *m_pOutSet);
SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MAP_APPFONT)); SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MAP_APPFONT));
ShowButtonFixedLine(true);
defaultButton(WZB_NEXT); defaultButton(WZB_NEXT);
enableButtons(WZB_FINISH, true); enableButtons(WZB_FINISH, true);
enableAutomaticNextButtonState(); enableAutomaticNextButtonState();
......
...@@ -67,8 +67,6 @@ namespace abp ...@@ -67,8 +67,6 @@ namespace abp
{ {
SetPageSizePixel(LogicToPixel(Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT)); SetPageSizePixel(LogicToPixel(Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT));
ShowButtonFixedLine(true);
declarePath( PATH_COMPLETE, declarePath( PATH_COMPLETE,
STATE_SELECT_ABTYPE, STATE_SELECT_ABTYPE,
STATE_INVOKE_ADMIN_DIALOG, STATE_INVOKE_ADMIN_DIALOG,
......
...@@ -253,10 +253,6 @@ namespace dbp ...@@ -253,10 +253,6 @@ namespace dbp
OControlWizardPage_Base::initializePage(); OControlWizardPage_Base::initializePage();
} }
//= OControlWizard
OControlWizard::OControlWizard( Window* _pParent, OControlWizard::OControlWizard( Window* _pParent,
const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext ) const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext )
:OWizardMachine(_pParent, WZB_CANCEL | WZB_PREVIOUS | WZB_NEXT | WZB_FINISH) :OWizardMachine(_pParent, WZB_CANCEL | WZB_PREVIOUS | WZB_NEXT | WZB_FINISH)
...@@ -266,17 +262,14 @@ namespace dbp ...@@ -266,17 +262,14 @@ namespace dbp
initContext(); initContext();
SetPageSizePixel(LogicToPixel(::Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT)); SetPageSizePixel(LogicToPixel(::Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT));
ShowButtonFixedLine(true);
defaultButton(WZB_NEXT); defaultButton(WZB_NEXT);
enableButtons(WZB_FINISH, false); enableButtons(WZB_FINISH, false);
} }
OControlWizard::~OControlWizard() OControlWizard::~OControlWizard()
{ {
} }
short OControlWizard::Execute() short OControlWizard::Execute()
{ {
// get the class id of the control we're dealing with // get the class id of the control we're dealing with
......
...@@ -81,8 +81,6 @@ namespace svt ...@@ -81,8 +81,6 @@ namespace svt
void SetRoadmapHelpId( const OString& _rId ); void SetRoadmapHelpId( const OString& _rId );
void SetRoadmapInteractive( bool _bInteractive ); void SetRoadmapInteractive( bool _bInteractive );
virtual void Resize() SAL_OVERRIDE;
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
// returns whether a given state is enabled // returns whether a given state is enabled
bool isStateEnabled( WizardState _nState ) const; bool isStateEnabled( WizardState _nState ) const;
...@@ -223,8 +221,6 @@ protected: ...@@ -223,8 +221,6 @@ protected:
#endif #endif
private: private:
SVT_DLLPRIVATE void ResizeFixedLine();
DECL_DLLPRIVATE_LINK( OnRoadmapItemSelected, void* ); DECL_DLLPRIVATE_LINK( OnRoadmapItemSelected, void* );
/** updates the roadmap control to show the given path, as far as possible /** updates the roadmap control to show the given path, as far as possible
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
class TabPage; class TabPage;
class Button; class Button;
class PushButton; class PushButton;
class FixedLine;
struct ImplWizPageData; struct ImplWizPageData;
struct ImplWizButtonData; struct ImplWizButtonData;
...@@ -88,9 +87,6 @@ den Buttons bei allen Dialogen gleich ist, gibt es das Define ...@@ -88,9 +87,6 @@ den Buttons bei allen Dialogen gleich ist, gibt es das Define
WIZARDDIALOG_BUTTON_STDOFFSET_X, welches als Standard-Offset genommen WIZARDDIALOG_BUTTON_STDOFFSET_X, welches als Standard-Offset genommen
werden sollte. werden sollte.
Mit ShowButtonFixedLine() kann gesteuert werden, ob die zwischen den
Buttons und der TabPage eine Trennlinie angezeigt werden soll.
Mit SetViewWindow() und SetViewAlign() kann ein Control gesetzt werden, Mit SetViewWindow() und SetViewAlign() kann ein Control gesetzt werden,
welches als Preview-Window oder fuer die Anzeige von schoenen Bitmaps welches als Preview-Window oder fuer die Anzeige von schoenen Bitmaps
genutzt werden kann. genutzt werden kann.
...@@ -135,9 +131,6 @@ maNextBtn.SetClickHdl( LINK( this, MyWizardDlg, ImplNextHdl ) ); ...@@ -135,9 +131,6 @@ maNextBtn.SetClickHdl( LINK( this, MyWizardDlg, ImplNextHdl ) );
// Set PreviewWindow // Set PreviewWindow
SetViewWindow( &maPreview ); SetViewWindow( &maPreview );
// Show line between Buttons and Page
ShowButtonFixedLine( sal_True );
// Call ActivatePage, because the first page should be created an activated // Call ActivatePage, because the first page should be created an activated
ActivatePage(); ActivatePage();
...@@ -214,7 +207,6 @@ private: ...@@ -214,7 +207,6 @@ private:
Size maPageSize; Size maPageSize;
ImplWizPageData* mpFirstPage; ImplWizPageData* mpFirstPage;
ImplWizButtonData* mpFirstBtn; ImplWizButtonData* mpFirstBtn;
FixedLine* mpFixedLine;
TabPage* mpCurTabPage; TabPage* mpCurTabPage;
PushButton* mpPrevBtn; PushButton* mpPrevBtn;
PushButton* mpNextBtn; PushButton* mpNextBtn;
...@@ -284,8 +276,6 @@ public: ...@@ -284,8 +276,6 @@ public:
void SetNextButton( PushButton* pButton ) { mpNextBtn = pButton; } void SetNextButton( PushButton* pButton ) { mpNextBtn = pButton; }
PushButton* GetNextButton() const { return mpNextBtn; } PushButton* GetNextButton() const { return mpNextBtn; }
void ShowButtonFixedLine( bool bVisible );
void SetViewWindow( Window* pWindow ) { mpViewWindow = pWindow; } void SetViewWindow( Window* pWindow ) { mpViewWindow = pWindow; }
Window* GetViewWindow() const { return mpViewWindow; } Window* GetViewWindow() const { return mpViewWindow; }
void SetViewAlign( WindowAlign eAlign ) { meViewAlign = eAlign; } void SetViewAlign( WindowAlign eAlign ) { meViewAlign = eAlign; }
......
...@@ -61,20 +61,17 @@ namespace svt ...@@ -61,20 +61,17 @@ namespace svt
StateDescriptions aStateDescriptors; StateDescriptions aStateDescriptors;
StateSet aDisabledStates; StateSet aDisabledStates;
bool bActivePathIsDefinite; bool bActivePathIsDefinite;
FixedLine* pFixedLine;
RoadmapWizardImpl() RoadmapWizardImpl()
:pRoadmap( NULL ) :pRoadmap( NULL )
,nActivePath( -1 ) ,nActivePath( -1 )
,bActivePathIsDefinite( false ) ,bActivePathIsDefinite( false )
,pFixedLine(NULL)
{ {
} }
~RoadmapWizardImpl() ~RoadmapWizardImpl()
{ {
delete pRoadmap; delete pRoadmap;
delete pFixedLine;
} }
/// returns the index of the current state in given path, or -1 /// returns the index of the current state in given path, or -1
...@@ -193,11 +190,6 @@ namespace svt ...@@ -193,11 +190,6 @@ namespace svt
aRoadmapSize.Height() = GetSizePixel().Height(); aRoadmapSize.Height() = GetSizePixel().Height();
m_pImpl->pRoadmap->SetSizePixel( aRoadmapSize ); m_pImpl->pRoadmap->SetSizePixel( aRoadmapSize );
m_pImpl->pFixedLine = new FixedLine( this, WB_VERT );
m_pImpl->pFixedLine->Show();
m_pImpl->pFixedLine->SetPosPixel( Point( aRoadmapSize.Width() + 1, 0 ) );
m_pImpl->pFixedLine->SetSizePixel( Size( LogicToPixel( Size( 2, 0 ) ).Width(), aRoadmapSize.Height() ) );
SetViewWindow( m_pImpl->pRoadmap ); SetViewWindow( m_pImpl->pRoadmap );
SetViewAlign( WINDOWALIGN_LEFT ); SetViewAlign( WINDOWALIGN_LEFT );
m_pImpl->pRoadmap->Show(); m_pImpl->pRoadmap->Show();
...@@ -634,40 +626,11 @@ namespace svt ...@@ -634,40 +626,11 @@ namespace svt
return false; return false;
} }
bool RoadmapWizard::isStateEnabled( WizardState _nState ) const bool RoadmapWizard::isStateEnabled( WizardState _nState ) const
{ {
return m_pImpl->aDisabledStates.find( _nState ) == m_pImpl->aDisabledStates.end(); return m_pImpl->aDisabledStates.find( _nState ) == m_pImpl->aDisabledStates.end();
} }
void RoadmapWizard::Resize()
{
OWizardMachine::Resize();
if ( IsReallyShown() && !IsInInitShow() )
ResizeFixedLine();
}
void RoadmapWizard::StateChanged( StateChangedType nType )
{
WizardDialog::StateChanged( nType );
if ( nType == STATE_CHANGE_INITSHOW )
ResizeFixedLine();
}
void RoadmapWizard::ResizeFixedLine()
{
Size aSize( m_pImpl->pRoadmap->GetSizePixel() );
aSize.Width() = m_pImpl->pFixedLine->GetSizePixel().Width();
m_pImpl->pFixedLine->SetSizePixel( aSize );
}
void RoadmapWizard::updateRoadmapItemLabel( WizardState _nState ) void RoadmapWizard::updateRoadmapItemLabel( WizardState _nState )
{ {
const WizardPath& rActivePath( m_pImpl->aPaths[ m_pImpl->nActivePath ] ); const WizardPath& rActivePath( m_pImpl->aPaths[ m_pImpl->nActivePath ] );
......
...@@ -52,7 +52,6 @@ void WizardDialog::ImplInitData() ...@@ -52,7 +52,6 @@ void WizardDialog::ImplInitData()
{ {
mpFirstPage = NULL; mpFirstPage = NULL;
mpFirstBtn = NULL; mpFirstBtn = NULL;
mpFixedLine = NULL;
mpCurTabPage = NULL; mpCurTabPage = NULL;
mpPrevBtn = NULL; mpPrevBtn = NULL;
mpNextBtn = NULL; mpNextBtn = NULL;
...@@ -95,8 +94,6 @@ void WizardDialog::ImplCalcSize( Size& rSize ) ...@@ -95,8 +94,6 @@ void WizardDialog::ImplCalcSize( Size& rSize )
} }
if ( nMaxHeight ) if ( nMaxHeight )
nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2; nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2;
if ( mpFixedLine && mpFixedLine->IsVisible() )
nMaxHeight += mpFixedLine->GetSizePixel().Height();
rSize.Height() += nMaxHeight; rSize.Height() += nMaxHeight;
// View-Window-Groesse dazurechnen // View-Window-Groesse dazurechnen
...@@ -192,13 +189,6 @@ void WizardDialog::ImplPosCtrls() ...@@ -192,13 +189,6 @@ void WizardDialog::ImplPosCtrls()
nOffY -= WIZARDDIALOG_BUTTON_OFFSET_Y; nOffY -= WIZARDDIALOG_BUTTON_OFFSET_Y;
} }
if ( mpFixedLine && mpFixedLine->IsVisible() )
{
nOffY -= mpFixedLine->GetSizePixel().Height();
mpFixedLine->setPosSizePixel( 0, nOffY, aDlgSize.Width(), 0,
WINDOW_POSSIZE_POS | WINDOW_POSSIZE_WIDTH );
}
if ( mpViewWindow && mpViewWindow->IsVisible() ) if ( mpViewWindow && mpViewWindow->IsVisible() )
{ {
long nViewOffX = 0; long nViewOffX = 0;
...@@ -285,8 +275,6 @@ void WizardDialog::ImplPosTabPage() ...@@ -285,8 +275,6 @@ void WizardDialog::ImplPosTabPage()
} }
if ( nMaxHeight ) if ( nMaxHeight )
nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2; nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2;
if ( mpFixedLine && mpFixedLine->IsVisible() )
nMaxHeight += mpFixedLine->GetSizePixel().Height();
// TabPage positionieren // TabPage positionieren
Size aDlgSize = GetOutputSizePixel(); Size aDlgSize = GetOutputSizePixel();
...@@ -377,8 +365,6 @@ WizardDialog::~WizardDialog() ...@@ -377,8 +365,6 @@ WizardDialog::~WizardDialog()
{ {
maWizardLayoutTimer.Stop(); maWizardLayoutTimer.Stop();
delete mpFixedLine;
// Remove all buttons // Remove all buttons
while ( mpFirstBtn ) while ( mpFirstBtn )
RemoveButton( mpFirstBtn->mpButton ); RemoveButton( mpFirstBtn->mpButton );
...@@ -684,19 +670,4 @@ void WizardDialog::RemoveButton( Button* pButton ) ...@@ -684,19 +670,4 @@ void WizardDialog::RemoveButton( Button* pButton )
OSL_FAIL( "WizardDialog::RemoveButton() - Button not in list" ); OSL_FAIL( "WizardDialog::RemoveButton() - Button not in list" );
} }
void WizardDialog::ShowButtonFixedLine( bool bVisible )
{
if ( !mpFixedLine )
{
if ( !bVisible )
return;
mpFixedLine = new FixedLine( this );
}
mpFixedLine->Show( bVisible );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -85,7 +85,6 @@ namespace svt { namespace uno ...@@ -85,7 +85,6 @@ namespace svt { namespace uno
SetPageSizePixel( pStartPage->GetSizePixel() ); SetPageSizePixel( pStartPage->GetSizePixel() );
// some defaults // some defaults
ShowButtonFixedLine( true );
SetRoadmapInteractive( true ); SetRoadmapInteractive( true );
enableAutomaticNextButtonState(); enableAutomaticNextButtonState();
} }
......
...@@ -58,7 +58,6 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem ...@@ -58,7 +58,6 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem
m_sFinish( SW_RES( ST_FINISH )), m_sFinish( SW_RES( ST_FINISH )),
m_nRestartPage( MM_DOCUMENTSELECTPAGE ) m_nRestartPage( MM_DOCUMENTSELECTPAGE )
{ {
ShowButtonFixedLine(true);
defaultButton(WZB_NEXT); defaultButton(WZB_NEXT);
enableButtons(WZB_FINISH, false); enableButtons(WZB_FINISH, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment