-Werror,-Wvarargs
"passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]" just drop the variadic overload and use the one taking a WizardPath (i.e., a vector) Change-Id: I6e389f60f8b7cb0633bf173bde69af1c5af86048
This commit is contained in:
@@ -65,11 +65,10 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram
|
||||
this->setTitleBase(SCH_RESSTR(STR_DLG_CHART_WIZARD));
|
||||
|
||||
declarePath( PATH_FULL
|
||||
, STATE_CHARTTYPE
|
||||
, {STATE_CHARTTYPE
|
||||
, STATE_SIMPLE_RANGE
|
||||
, STATE_DATA_SERIES
|
||||
, STATE_OBJECTS
|
||||
, WZS_INVALID_STATE
|
||||
, STATE_OBJECTS}
|
||||
);
|
||||
this->SetRoadmapHelpId( HID_SCH_WIZARD_ROADMAP );
|
||||
this->SetRoadmapInteractive( true );
|
||||
|
@@ -135,7 +135,7 @@ namespace dbmm
|
||||
describeState( STATE_MIGRATE, sTitleMigrate, &ProgressPage::Create );
|
||||
describeState( STATE_SUMMARY, sTitleSummary, &ResultPage::Create );
|
||||
|
||||
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} );
|
||||
|
||||
SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MAP_APPFONT ) );
|
||||
SetRoadmapInteractive( true );
|
||||
|
@@ -64,32 +64,28 @@ namespace abp
|
||||
SetPageSizePixel(LogicToPixel(Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT));
|
||||
|
||||
declarePath( PATH_COMPLETE,
|
||||
STATE_SELECT_ABTYPE,
|
||||
{STATE_SELECT_ABTYPE,
|
||||
STATE_INVOKE_ADMIN_DIALOG,
|
||||
STATE_TABLE_SELECTION,
|
||||
STATE_MANUAL_FIELD_MAPPING,
|
||||
STATE_FINAL_CONFIRM,
|
||||
WZS_INVALID_STATE
|
||||
STATE_FINAL_CONFIRM}
|
||||
);
|
||||
declarePath( PATH_NO_SETTINGS,
|
||||
STATE_SELECT_ABTYPE,
|
||||
{STATE_SELECT_ABTYPE,
|
||||
STATE_TABLE_SELECTION,
|
||||
STATE_MANUAL_FIELD_MAPPING,
|
||||
STATE_FINAL_CONFIRM,
|
||||
WZS_INVALID_STATE
|
||||
STATE_FINAL_CONFIRM}
|
||||
);
|
||||
declarePath( PATH_NO_FIELDS,
|
||||
STATE_SELECT_ABTYPE,
|
||||
{STATE_SELECT_ABTYPE,
|
||||
STATE_INVOKE_ADMIN_DIALOG,
|
||||
STATE_TABLE_SELECTION,
|
||||
STATE_FINAL_CONFIRM,
|
||||
WZS_INVALID_STATE
|
||||
STATE_FINAL_CONFIRM}
|
||||
);
|
||||
declarePath( PATH_NO_SETTINGS_NO_FIELDS,
|
||||
STATE_SELECT_ABTYPE,
|
||||
{STATE_SELECT_ABTYPE,
|
||||
STATE_TABLE_SELECTION,
|
||||
STATE_FINAL_CONFIRM,
|
||||
WZS_INVALID_STATE
|
||||
STATE_FINAL_CONFIRM}
|
||||
);
|
||||
|
||||
m_pPrevPage->SetHelpId(HID_ABSPILOT_PREVIOUS);
|
||||
|
@@ -107,13 +107,7 @@ namespace svt
|
||||
@param _nId
|
||||
the unique id you wish to give this path. This id can later on be used
|
||||
to refer to the path which you just declared
|
||||
|
||||
@param _nFirstState
|
||||
the first state in this path. Must not be WZS_INVALID_STATE.<br/>
|
||||
Declare an arbitrary number of states after this one, and terminate the sequence
|
||||
with a WZS_INVALID_STATE.
|
||||
*/
|
||||
void declarePath( PathId _nPathId, WizardState _nFirstState, ... );
|
||||
void declarePath( PathId _nPathId, const WizardPath& _lWizardStates);
|
||||
|
||||
/** provides basic information about a state
|
||||
|
@@ -24,8 +24,6 @@
|
||||
#include <roadmap.hxx>
|
||||
#include <tools/debug.hxx>
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <set>
|
||||
@@ -182,35 +180,6 @@ namespace svt
|
||||
}
|
||||
|
||||
|
||||
void RoadmapWizard::declarePath( PathId _nPathId, WizardState _nFirstState, ... )
|
||||
{
|
||||
|
||||
DBG_ASSERT( _nFirstState != WZS_INVALID_STATE, "RoadmapWizard::declarePath: there should be at least one state in the path!" );
|
||||
if ( _nFirstState == WZS_INVALID_STATE )
|
||||
return;
|
||||
|
||||
WizardPath aNewPath;
|
||||
|
||||
// collect the elements of the path
|
||||
va_list aStateList;
|
||||
va_start( aStateList, _nFirstState );
|
||||
|
||||
WizardState nState = _nFirstState;
|
||||
while ( nState != WZS_INVALID_STATE )
|
||||
{
|
||||
aNewPath.push_back( nState );
|
||||
nState = sal::static_int_cast< WizardState >(
|
||||
va_arg( aStateList, int ));
|
||||
}
|
||||
va_end( aStateList );
|
||||
|
||||
DBG_ASSERT( _nFirstState == 0, "RoadmapWizard::declarePath: first state must be NULL." );
|
||||
// The WizardDialog (our very base class) always starts with a mnCurLevel == 0
|
||||
|
||||
declarePath( _nPathId, aNewPath );
|
||||
}
|
||||
|
||||
|
||||
void RoadmapWizard::describeState( WizardState _nState, const OUString& _rStateDisplayName, RoadmapPageFactory _pPageFactory )
|
||||
{
|
||||
OSL_ENSURE( m_pImpl->aStateDescriptors.find( _nState ) == m_pImpl->aStateDescriptors.end(),
|
||||
|
@@ -64,21 +64,19 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem
|
||||
if(rItem.IsMailAvailable())
|
||||
declarePath(
|
||||
0,
|
||||
MM_DOCUMENTSELECTPAGE,
|
||||
{MM_DOCUMENTSELECTPAGE,
|
||||
MM_OUTPUTTYPETPAGE,
|
||||
MM_ADDRESSBLOCKPAGE,
|
||||
MM_GREETINGSPAGE,
|
||||
MM_LAYOUTPAGE,
|
||||
WZS_INVALID_STATE
|
||||
MM_LAYOUTPAGE}
|
||||
);
|
||||
else
|
||||
declarePath(
|
||||
0,
|
||||
MM_DOCUMENTSELECTPAGE,
|
||||
{MM_DOCUMENTSELECTPAGE,
|
||||
MM_ADDRESSBLOCKPAGE,
|
||||
MM_GREETINGSPAGE,
|
||||
MM_LAYOUTPAGE,
|
||||
WZS_INVALID_STATE
|
||||
MM_LAYOUTPAGE}
|
||||
);
|
||||
|
||||
ActivatePage();
|
||||
|
Reference in New Issue
Block a user