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