Converted pivot table layout dlg to .ui

pimped up dialog a bit, added mnemonics

Change-Id: I4585d9a3a1c96b45c7eedea8a5be41ec717139dd
This commit is contained in:
Katarina Behrens
2014-02-04 11:40:48 +01:00
committed by Caolán McNamara
parent 89cc3438ed
commit cfa4f622ca
6 changed files with 1065 additions and 262 deletions

View File

@@ -123,6 +123,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/paradialog \ sc/uiconfig/scalc/ui/paradialog \
sc/uiconfig/scalc/ui/paratemplatedialog \ sc/uiconfig/scalc/ui/paratemplatedialog \
sc/uiconfig/scalc/ui/pivotfielddialog \ sc/uiconfig/scalc/ui/pivotfielddialog \
sc/uiconfig/scalc/ui/pivottablelayout \
sc/uiconfig/scalc/ui/printareasdialog \ sc/uiconfig/scalc/ui/printareasdialog \
sc/uiconfig/scalc/ui/printeroptions \ sc/uiconfig/scalc/ui/printeroptions \
sc/uiconfig/scalc/ui/protectsheetdlg \ sc/uiconfig/scalc/ui/protectsheetdlg \

View File

@@ -118,7 +118,7 @@ ScAccessibleDataPilotControl *ScDPFieldControlBase::AccessRef::operator -> () co
ScDPFieldControlBase::ScDPFieldControlBase( ScDPFieldControlBase::ScDPFieldControlBase(
ScPivotLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption, const char* pcHelpId) : ScPivotLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption, const char* pcHelpId) :
Control(pParent, rResId), Control(pParent),
mpDlg(pParent), mpDlg(pParent),
mpCaption(pCaption), mpCaption(pCaption),
mnFieldSelected(0) mnFieldSelected(0)
@@ -129,6 +129,21 @@ ScDPFieldControlBase::ScDPFieldControlBase(
maName = MnemonicGenerator::EraseAllMnemonicChars( pCaption->GetText() ); maName = MnemonicGenerator::EraseAllMnemonicChars( pCaption->GetText() );
} }
ScDPFieldControlBase::ScDPFieldControlBase( Window* pParent ) :
Control (pParent),
mnFieldSelected(0)
{
}
void ScDPFieldControlBase::Init( ScPivotLayoutDlg* pDlg, FixedText* pCaption )
{
mpDlg = pDlg;
mpCaption = pCaption;
if (pCaption)
maName = MnemonicGenerator::EraseAllMnemonicChars( pCaption->GetText() );
}
ScDPFieldControlBase::~ScDPFieldControlBase() ScDPFieldControlBase::~ScDPFieldControlBase()
{ {
AccessRef aRef( mxAccessible ); AccessRef aRef( mxAccessible );
@@ -897,6 +912,19 @@ ScDPHorFieldControl::ScDPHorFieldControl(
AppendPaintable(&maScroll); AppendPaintable(&maScroll);
} }
ScDPHorFieldControl::ScDPHorFieldControl ( Window* pParent ) :
ScDPFieldControlBase( pParent ),
maScroll(this, WB_HORZ | WB_DRAG),
mnFieldBtnRowCount(0),
mnFieldBtnColCount(0)
{
maScroll.SetScrollHdl( LINK(this, ScDPHorFieldControl, ScrollHdl) );
maScroll.SetEndScrollHdl( LINK(this, ScDPHorFieldControl, EndScrollHdl) );
maScroll.Hide();
AppendPaintable(&maScroll);
}
ScDPHorFieldControl::~ScDPHorFieldControl() ScDPHorFieldControl::~ScDPHorFieldControl()
{ {
} }
@@ -1149,6 +1177,17 @@ ScDPPageFieldControl::ScDPPageFieldControl(
{ {
} }
ScDPPageFieldControl::ScDPPageFieldControl ( Window* pParent ) :
ScDPHorFieldControl( pParent )
{
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScDPPageFieldControl( Window *pParent, VclBuilder::stringmap & )
{
return new ScDPPageFieldControl( pParent );
}
ScDPPageFieldControl::~ScDPPageFieldControl() ScDPPageFieldControl::~ScDPPageFieldControl()
{ {
} }
@@ -1171,6 +1210,16 @@ ScDPColFieldControl::ScDPColFieldControl(
{ {
} }
ScDPColFieldControl::ScDPColFieldControl ( Window* pParent ) :
ScDPHorFieldControl( pParent )
{
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScDPColFieldControl( Window *pParent, VclBuilder::stringmap & )
{
return new ScDPColFieldControl( pParent );
}
ScDPColFieldControl::~ScDPColFieldControl() ScDPColFieldControl::~ScDPColFieldControl()
{ {
} }
@@ -1200,6 +1249,24 @@ ScDPRowFieldControl::ScDPRowFieldControl(
AppendPaintable(&maScroll); AppendPaintable(&maScroll);
} }
ScDPRowFieldControl::ScDPRowFieldControl ( Window* pParent ) :
ScDPFieldControlBase( pParent ),
maScroll(this, WB_VERT | WB_DRAG),
mnColumnBtnCount(0)
{
maScroll.SetScrollHdl( LINK(this, ScDPRowFieldControl, ScrollHdl) );
maScroll.SetEndScrollHdl( LINK(this, ScDPRowFieldControl, EndScrollHdl) );
maScroll.Show(false);
AppendPaintable(&maScroll);
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScDPRowFieldControl( Window *pParent, VclBuilder::stringmap & )
{
return new ScDPRowFieldControl( pParent );
}
ScDPRowFieldControl::~ScDPRowFieldControl() ScDPRowFieldControl::~ScDPRowFieldControl()
{ {
} }
@@ -1424,6 +1491,17 @@ ScDPSelectFieldControl::ScDPSelectFieldControl(
SetName(OUString(ScResId(STR_SELECT))); SetName(OUString(ScResId(STR_SELECT)));
} }
ScDPSelectFieldControl::ScDPSelectFieldControl( Window* pParent ):
ScDPHorFieldControl( pParent )
{
//SetName(OUString(ScResId(STR_SELECT)));
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScDPSelectFieldControl( Window *pParent, VclBuilder::stringmap & )
{
return new ScDPSelectFieldControl( pParent );
}
ScDPSelectFieldControl::~ScDPSelectFieldControl() ScDPSelectFieldControl::~ScDPSelectFieldControl()
{ {
} }
@@ -1446,6 +1524,16 @@ ScDPDataFieldControl::ScDPDataFieldControl(
{ {
} }
ScDPDataFieldControl::ScDPDataFieldControl( Window* pParent ):
ScDPHorFieldControl( pParent )
{
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScDPDataFieldControl( Window *pParent, VclBuilder::stringmap & )
{
return new ScDPDataFieldControl( pParent );
}
ScDPDataFieldControl::~ScDPDataFieldControl() ScDPDataFieldControl::~ScDPDataFieldControl()
{ {
} }

View File

@@ -45,6 +45,7 @@
#include <sfx2/dispatch.hxx> #include <sfx2/dispatch.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <vcl/layout.hxx>
#include "dbdocfun.hxx" #include "dbdocfun.hxx"
#include "uiitems.hxx" #include "uiitems.hxx"
@@ -84,50 +85,33 @@ Point DlgPos2WndPos( const Point& rPt, const Window& rWnd )
return aWndPt; return aWndPt;
} }
static const OString* getFuncNames()
{
static const OString gFuncNames[ PIVOT_MAXFUNC ] =
{
OString("sum") ,
OString("count") ,
OString("mean") ,
OString("max") ,
OString("min") ,
OString("product"),
OString("count2"),
OString("stdev") ,
OString("stdevp") ,
OString("var") ,
OString("varp") ,
};
return &gFuncNames[0];
}
} // namespace } // namespace
ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, const ScDPObject& rDPObject, bool bNewOutput ) : ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, const ScDPObject& rDPObject, bool bNewOutput ) :
ScAnyRefDlg( pB, pCW, pParent, RID_SCDLG_PIVOT_LAYOUT ), ScAnyRefDlg( pB, pCW, pParent, "PivotTableLayout", "modules/scalc/ui/pivottablelayout.ui" ),
maFlLayout( this, ScResId( FL_LAYOUT ) ),
maFtPage( this, ScResId( FT_PAGE ) ),
maWndPage( this, ScResId( WND_PAGE ), &maFtPage, HID_SC_DPLAY_PAGE ),
maFtCol( this, ScResId( FT_COL ) ),
maWndCol( this, ScResId( WND_COL ), &maFtCol, HID_SC_DPLAY_COLUMN ),
maFtRow( this, ScResId( FT_ROW ) ),
maWndRow( this, ScResId( WND_ROW ), &maFtRow, HID_SC_DPLAY_ROW ),
maFtData( this, ScResId( FT_DATA ) ),
maWndData( this, ScResId( WND_DATA ), &maFtData, HID_SC_DPLAY_DATA ),
maWndSelect( this, ScResId( WND_SELECT ), NULL, HID_SC_DPLAY_SELECT ),
maFtInfo( this, ScResId( FT_INFO ) ),
maFlAreas( this, ScResId( FL_OUTPUT ) ),
maFtInArea( this, ScResId( FT_INAREA) ),
maEdInPos( this, this, &maFtInArea, ScResId( ED_INAREA) ),
maRbInPos( this, ScResId( RB_INAREA ), &maEdInPos, this ),
maLbOutPos( this, ScResId( LB_OUTAREA ) ),
maFtOutArea( this, ScResId( FT_OUTAREA ) ),
maEdOutPos( this, this, &maFtOutArea, ScResId( ED_OUTAREA ) ),
maRbOutPos( this, ScResId( RB_OUTAREA ), &maEdOutPos, this ),
maBtnIgnEmptyRows( this, ScResId( BTN_IGNEMPTYROWS ) ),
maBtnDetectCat( this, ScResId( BTN_DETECTCAT ) ),
maBtnTotalCol( this, ScResId( BTN_TOTALCOL ) ),
maBtnTotalRow( this, ScResId( BTN_TOTALROW ) ),
maBtnFilter( this, ScResId( BTN_FILTER ) ),
maBtnDrillDown( this, ScResId( BTN_DRILLDOWN ) ),
maBtnOk( this, ScResId( BTN_OK ) ),
maBtnCancel( this, ScResId( BTN_CANCEL ) ),
maBtnHelp( this, ScResId( BTN_HELP ) ),
maBtnRemove( this, ScResId( BTN_REMOVE ) ),
maBtnOptions( this, ScResId( BTN_OPTIONS ) ),
maBtnMore( this, ScResId( BTN_MORE ) ),
mxDlgDPObject( new ScDPObject( rDPObject ) ), mxDlgDPObject( new ScDPObject( rDPObject ) ),
mpViewData( ((ScTabViewShell*)SfxViewShell::Current())->GetViewData() ), mpViewData( ((ScTabViewShell*)SfxViewShell::Current())->GetViewData() ),
mpDoc( ((ScTabViewShell*)SfxViewShell::Current())->GetViewData()->GetDocument() ), mpDoc( ((ScTabViewShell*)SfxViewShell::Current())->GetViewData()->GetDocument() ),
mpRefInputEdit(NULL), mpRefInputEdit(NULL),
maStrUndefined(SC_RESSTR(SCSTR_UNDEFINED)), maStrUndefined(SC_RESSTR(SCSTR_UNDEFINED)),
maStrNewTable(SC_RESSTR(SCSTR_NEWTABLE)), maStrNewTable(SC_RESSTR(SCSTR_NEWTABLE)),
mbIsDrag(false), mbIsDrag(false),
@@ -135,76 +119,103 @@ ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window
mnOffset(0), mnOffset(0),
mbRefInputMode( false ) mbRefInputMode( false )
{ {
get( mpFtPage, "page_text" );
get( mpWndPage, "pagefield" );
get( mpFtCol, "column_text" );
get( mpWndCol, "columnfield" );
get( mpFtRow, "row_text" );
get( mpWndRow, "rowfield" );
get( mpFtData, "data_text" );
get( mpWndData, "datafield" );
get( mpWndSelect, "buttonfield" );
get( mpFtInfo, "info" );
mpWndPage->Init( this, mpFtPage );
mpWndCol->Init( this, mpFtCol );
mpWndRow->Init( this, mpFtRow );
mpWndData->Init( this, mpFtData );
mpWndSelect->Init( this, NULL );
mpWndSelect->SetName( get<FixedText>("select_text")->GetText());
get( mpFtInArea, "select_from" );
get( mpEdInPos, "rangesel1" );
get( mpRbInPos, "changebutton1" );
get( mpLbOutPos, "target_area" );
get( mpFtOutArea, "results_to" );
get( mpEdOutPos, "rangesel2" );
get( mpRbOutPos, "changebutton2" );
get( mpBtnIgnEmptyRows, "ignore_empty" );
get( mpBtnDetectCat, "detect_category" );
get( mpBtnTotalCol, "total_cols" );
get( mpBtnTotalRow, "total_rows" );
get( mpBtnFilter, "add_filter" );
get( mpBtnDrillDown, "drill_down" );
get( mpBtnOk, "ok" );
get( mpBtnCancel, "cancel" );
get( mpBtnRemove, "remove" );
get( mpBtnOptions, "options" );
get( mpExpander, "more" );
mpExpander->SetExpandedHdl( LINK( this, ScPivotLayoutDlg, ExpandHdl ) );
mxDlgDPObject->FillOldParam( maPivotData ); mxDlgDPObject->FillOldParam( maPivotData );
mxDlgDPObject->FillLabelData( maPivotData ); mxDlgDPObject->FillLabelData( maPivotData );
maBtnRemove.SetClickHdl( LINK( this, ScPivotLayoutDlg, ClickHdl ) ); mpBtnRemove->SetClickHdl( LINK( this, ScPivotLayoutDlg, ClickHdl ) );
maBtnOptions.SetClickHdl( LINK( this, ScPivotLayoutDlg, ClickHdl ) ); mpBtnOptions->SetClickHdl( LINK( this, ScPivotLayoutDlg, ClickHdl ) );
maFuncNames.reserve( PIVOT_MAXFUNC ); maFuncNames.reserve( PIVOT_MAXFUNC );
for ( sal_uInt16 i = 1; i <= PIVOT_MAXFUNC; ++i ) const OString* pFuncNames = getFuncNames();
maFuncNames.push_back(ScResId(i).toString()); for ( sal_uInt16 i = 0; i < PIVOT_MAXFUNC; ++i )
{
maBtnMore.AddWindow( &maFlAreas ); OUString tmpText = get<FixedText>(pFuncNames[i])->GetText();
maBtnMore.AddWindow( &maFtInArea ); maFuncNames.push_back(tmpText);
maBtnMore.AddWindow( &maEdInPos ); }
maBtnMore.AddWindow( &maRbInPos );
maBtnMore.AddWindow( &maFtOutArea );
maBtnMore.AddWindow( &maLbOutPos );
maBtnMore.AddWindow( &maEdOutPos );
maBtnMore.AddWindow( &maRbOutPos );
maBtnMore.AddWindow( &maBtnIgnEmptyRows );
maBtnMore.AddWindow( &maBtnDetectCat );
maBtnMore.AddWindow( &maBtnTotalCol );
maBtnMore.AddWindow( &maBtnTotalRow );
maBtnMore.AddWindow( &maBtnFilter );
maBtnMore.AddWindow( &maBtnDrillDown );
maBtnMore.SetClickHdl( LINK( this, ScPivotLayoutDlg, MoreClickHdl ) );
maFieldCtrls.reserve(5); maFieldCtrls.reserve(5);
maFieldCtrls.push_back(&maWndPage); maFieldCtrls.push_back(mpWndPage);
maFieldCtrls.push_back(&maWndCol); maFieldCtrls.push_back(mpWndCol);
maFieldCtrls.push_back(&maWndRow); maFieldCtrls.push_back(mpWndRow);
maFieldCtrls.push_back(&maWndData); maFieldCtrls.push_back(mpWndData);
maFieldCtrls.push_back(&maWndSelect); maFieldCtrls.push_back(mpWndSelect);
InitControlAndDlgSizes(); InitControlAndDlgSizes();
if (mxDlgDPObject->GetSheetDesc()) if (mxDlgDPObject->GetSheetDesc())
{ {
maEdInPos.Enable(); mpEdInPos->Enable();
maRbInPos.Enable(); mpRbInPos->Enable();
const ScSheetSourceDesc* p = mxDlgDPObject->GetSheetDesc(); const ScSheetSourceDesc* p = mxDlgDPObject->GetSheetDesc();
OUString aRangeName = p->GetRangeName(); OUString aRangeName = p->GetRangeName();
if (!aRangeName.isEmpty()) if (!aRangeName.isEmpty())
maEdInPos.SetText(aRangeName); mpEdInPos->SetText(aRangeName);
else else
{ {
maOldRange = p->GetSourceRange(); maOldRange = p->GetSourceRange();
OUString aStr(maOldRange.Format(SCR_ABS_3D, mpDoc, mpDoc->GetAddressConvention())); OUString aStr(maOldRange.Format(SCR_ABS_3D, mpDoc, mpDoc->GetAddressConvention()));
maEdInPos.SetText(aStr); mpEdInPos->SetText(aStr);
} }
} }
else else
{ {
// data is not reachable, so could be a remote database // data is not reachable, so could be a remote database
maEdInPos.Disable(); mpEdInPos->Disable();
maRbInPos.Disable(); mpRbInPos->Disable();
} }
InitFieldWindows(); InitFieldWindows();
maLbOutPos.SetSelectHdl( LINK( this, ScPivotLayoutDlg, SelAreaHdl ) ); mpLbOutPos->SetSelectHdl( LINK( this, ScPivotLayoutDlg, SelAreaHdl ) );
maEdOutPos.SetModifyHdl( LINK( this, ScPivotLayoutDlg, EdOutModifyHdl ) ); mpEdOutPos->SetModifyHdl( LINK( this, ScPivotLayoutDlg, EdOutModifyHdl ) );
maEdInPos.SetModifyHdl( LINK( this, ScPivotLayoutDlg, EdInModifyHdl ) ); mpEdInPos->SetModifyHdl( LINK( this, ScPivotLayoutDlg, EdInModifyHdl ) );
maBtnOk.SetClickHdl( LINK( this, ScPivotLayoutDlg, OkHdl ) ); mpBtnOk->SetClickHdl( LINK( this, ScPivotLayoutDlg, OkHdl ) );
maBtnCancel.SetClickHdl( LINK( this, ScPivotLayoutDlg, CancelHdl ) ); mpBtnCancel->SetClickHdl( LINK( this, ScPivotLayoutDlg, CancelHdl ) );
// Set focus handler for the reference edit text boxes. // Set focus handler for the reference edit text boxes.
Link aGetFocusLink = LINK(this, ScPivotLayoutDlg, GetRefEditFocusHdl); Link aGetFocusLink = LINK(this, ScPivotLayoutDlg, GetRefEditFocusHdl);
if (maEdInPos.IsEnabled()) if (mpEdInPos->IsEnabled())
maEdInPos.SetGetFocusHdl(aGetFocusLink); mpEdInPos->SetGetFocusHdl(aGetFocusLink);
maEdOutPos.SetGetFocusHdl(aGetFocusLink); mpEdOutPos->SetGetFocusHdl(aGetFocusLink);
if ( mpViewData && mpDoc ) if ( mpViewData && mpDoc )
{ {
@@ -214,9 +225,9 @@ ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window
* um sinnvolle Bereiche handelt * um sinnvolle Bereiche handelt
*/ */
maLbOutPos.Clear(); mpLbOutPos->Clear();
maLbOutPos.InsertEntry( maStrUndefined, 0 ); mpLbOutPos->InsertEntry( maStrUndefined, 0 );
maLbOutPos.InsertEntry( maStrNewTable, 1 ); mpLbOutPos->InsertEntry( maStrNewTable, 1 );
ScAreaNameIterator aIter( mpDoc ); ScAreaNameIterator aIter( mpDoc );
OUString aName; OUString aName;
@@ -225,11 +236,11 @@ ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window
{ {
if ( !aIter.WasDBName() ) // hier keine DB-Bereiche ! if ( !aIter.WasDBName() ) // hier keine DB-Bereiche !
{ {
sal_uInt16 nInsert = maLbOutPos.InsertEntry( aName ); sal_uInt16 nInsert = mpLbOutPos->InsertEntry( aName );
OUString aRefStr(aRange.aStart.Format(SCA_ABS_3D, mpDoc, mpDoc->GetAddressConvention())); OUString aRefStr(aRange.aStart.Format(SCA_ABS_3D, mpDoc, mpDoc->GetAddressConvention()));
maRefStrs.push_back(new OUString(aRefStr)); maRefStrs.push_back(new OUString(aRefStr));
maLbOutPos.SetEntryData(nInsert, &maRefStrs.back()); mpLbOutPos->SetEntryData(nInsert, &maRefStrs.back());
} }
} }
} }
@@ -237,9 +248,9 @@ ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window
if (bNewOutput) if (bNewOutput)
{ {
// Output to a new sheet by default for a brand-new output. // Output to a new sheet by default for a brand-new output.
maLbOutPos.SelectEntryPos(1); mpLbOutPos->SelectEntryPos(1);
maEdOutPos.Disable(); mpEdOutPos->Disable();
maRbOutPos.Disable(); mpRbOutPos->Disable();
} }
else else
{ {
@@ -251,29 +262,27 @@ ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window
ScAddress( maPivotData.nCol, ScAddress( maPivotData.nCol,
maPivotData.nRow, maPivotData.nRow,
maPivotData.nTab ).Format(STD_FORMAT, mpDoc, mpDoc->GetAddressConvention()); maPivotData.nTab ).Format(STD_FORMAT, mpDoc, mpDoc->GetAddressConvention());
maEdOutPos.SetText( aStr ); mpEdOutPos->SetText( aStr );
maOutputRefStr = aStr; maOutputRefStr = aStr;
EdOutModifyHdl(0); EdOutModifyHdl(0);
} }
else else
{ {
maLbOutPos.SelectEntryPos( maLbOutPos.GetEntryCount()-1 ); mpLbOutPos->SelectEntryPos( mpLbOutPos->GetEntryCount()-1 );
SelAreaHdl(NULL); SelAreaHdl(NULL);
} }
} }
maBtnIgnEmptyRows.Check( maPivotData.bIgnoreEmptyRows ); mpBtnIgnEmptyRows->Check( maPivotData.bIgnoreEmptyRows );
maBtnDetectCat .Check( maPivotData.bDetectCategories ); mpBtnDetectCat->Check( maPivotData.bDetectCategories );
maBtnTotalCol .Check( maPivotData.bMakeTotalCol ); mpBtnTotalCol->Check( maPivotData.bMakeTotalCol );
maBtnTotalRow .Check( maPivotData.bMakeTotalRow ); mpBtnTotalRow->Check( maPivotData.bMakeTotalRow );
const ScDPSaveData* pSaveData = mxDlgDPObject->GetSaveData(); const ScDPSaveData* pSaveData = mxDlgDPObject->GetSaveData();
maBtnFilter.Check( !pSaveData || pSaveData->GetFilterButton() ); mpBtnFilter->Check( !pSaveData || pSaveData->GetFilterButton() );
maBtnDrillDown.Check( !pSaveData || pSaveData->GetDrillDown() ); mpBtnDrillDown->Check( !pSaveData || pSaveData->GetDrillDown() );
GrabFieldFocus( maWndSelect ); GrabFieldFocus( mpWndSelect );
FreeResource();
} }
ScPivotLayoutDlg::~ScPivotLayoutDlg() ScPivotLayoutDlg::~ScPivotLayoutDlg()
@@ -302,11 +311,11 @@ void ScPivotLayoutDlg::InitWndSelect(const ScDPLabelDataVector& rLabels)
// original dimension if available. Be aware that duplicate // original dimension if available. Be aware that duplicate
// dimensions may have different layout names. // dimensions may have different layout names.
ScPivotFuncData aFunc(maLabelData[i].mnCol, maLabelData[i].mnFuncMask); ScPivotFuncData aFunc(maLabelData[i].mnCol, maLabelData[i].mnFuncMask);
maWndSelect.AppendField(maLabelData[i].getDisplayName(), aFunc); mpWndSelect->AppendField(maLabelData[i].getDisplayName(), aFunc);
} }
} }
maWndSelect.ResetScrollBar(); mpWndSelect->ResetScrollBar();
maWndSelect.Paint(Rectangle()); mpWndSelect->Paint(Rectangle());
} }
void ScPivotLayoutDlg::InitWndData(const vector<ScPivotField>& rFields) void ScPivotLayoutDlg::InitWndData(const vector<ScPivotField>& rFields)
@@ -332,11 +341,11 @@ void ScPivotLayoutDlg::InitWndData(const vector<ScPivotField>& rFields)
aStr += pData->maName; aStr += pData->maName;
} }
maWndData.AppendField(aStr, aFunc); mpWndData->AppendField(aStr, aFunc);
pData->mnFuncMask = nMask; pData->mnFuncMask = nMask;
} }
} }
maWndData.ResetScrollBar(); mpWndData->ResetScrollBar();
} }
void ScPivotLayoutDlg::InitFieldWindow( const vector<ScPivotField>& rFields, ScPivotFieldType eType ) void ScPivotLayoutDlg::InitFieldWindow( const vector<ScPivotField>& rFields, ScPivotFieldType eType )
@@ -370,22 +379,22 @@ void ScPivotLayoutDlg::InitFieldWindows()
InitWndData(maPivotData.maDataFields); InitWndData(maPivotData.maDataFields);
} }
void ScPivotLayoutDlg::GrabFieldFocus( ScDPFieldControlBase& rFieldWindow ) void ScPivotLayoutDlg::GrabFieldFocus( ScDPFieldControlBase* rFieldWindow )
{ {
if( rFieldWindow.IsEmpty() ) if( rFieldWindow->IsEmpty() )
{ {
if( maWndSelect.IsEmpty() ) if( mpWndSelect->IsEmpty() )
maBtnOk.GrabFocus(); mpBtnOk->GrabFocus();
else else
maWndSelect.GrabFocus(); mpWndSelect->GrabFocus();
} }
else else
rFieldWindow.GrabFocus(); rFieldWindow->GrabFocus();
} }
void ScPivotLayoutDlg::AddField( size_t nFromIndex, ScPivotFieldType eToType, const Point& rAtPos ) void ScPivotLayoutDlg::AddField( size_t nFromIndex, ScPivotFieldType eToType, const Point& rAtPos )
{ {
ScPivotFuncData aFunc = maWndSelect.GetFuncData(nFromIndex); // local copy ScPivotFuncData aFunc = mpWndSelect->GetFuncData(nFromIndex); // local copy
bool bAllowed = IsOrientationAllowed(aFunc.mnCol, eToType); bool bAllowed = IsOrientationAllowed(aFunc.mnCol, eToType);
if (!bAllowed) if (!bAllowed)
@@ -444,7 +453,7 @@ void ScPivotLayoutDlg::AddField( size_t nFromIndex, ScPivotFieldType eToType, co
void ScPivotLayoutDlg::AppendField(size_t nFromIndex, ScPivotFieldType eToType) void ScPivotLayoutDlg::AppendField(size_t nFromIndex, ScPivotFieldType eToType)
{ {
ScPivotFuncData aFunc = maWndSelect.GetFuncData(nFromIndex); // local copy ScPivotFuncData aFunc = mpWndSelect->GetFuncData(nFromIndex); // local copy
size_t nAt = 0; size_t nAt = 0;
ScDPFieldControlBase* toWnd = GetFieldWindow(eToType); ScDPFieldControlBase* toWnd = GetFieldWindow(eToType);
@@ -707,7 +716,7 @@ void ScPivotLayoutDlg::RemoveField( ScPivotFieldType eFromType, size_t nIndex )
pWnd->DeleteFieldByIndex(nIndex); pWnd->DeleteFieldByIndex(nIndex);
if (pWnd->IsEmpty()) if (pWnd->IsEmpty())
GrabFieldFocus(maWndSelect); GrabFieldFocus(mpWndSelect);
} }
PointerStyle ScPivotLayoutDlg::NotifyMouseButtonDown( ScPivotFieldType eType, size_t nFieldIndex ) PointerStyle ScPivotLayoutDlg::NotifyMouseButtonDown( ScPivotFieldType eType, size_t nFieldIndex )
@@ -763,7 +772,7 @@ void ScPivotLayoutDlg::NotifyDoubleClick( ScPivotFieldType eType, size_t nFieldI
// list of names of all data fields // list of names of all data fields
vector<ScDPName> aDataFieldNames; vector<ScDPName> aDataFieldNames;
vector<ScDPFieldControlBase::FuncItem> aFuncItems; vector<ScDPFieldControlBase::FuncItem> aFuncItems;
maWndData.GetAllFuncItems(aFuncItems); mpWndData->GetAllFuncItems(aFuncItems);
vector<ScDPFieldControlBase::FuncItem>::const_iterator it = aFuncItems.begin(), itEnd = aFuncItems.end(); vector<ScDPFieldControlBase::FuncItem>::const_iterator it = aFuncItems.begin(), itEnd = aFuncItems.end();
for (; it != itEnd; ++it) for (; it != itEnd; ++it)
{ {
@@ -803,7 +812,7 @@ void ScPivotLayoutDlg::NotifyDoubleClick( ScPivotFieldType eType, size_t nFieldI
case PIVOTFIELDTYPE_DATA: case PIVOTFIELDTYPE_DATA:
{ {
ScPivotFuncData& rFuncData = maWndData.GetFuncData(nFieldIndex); ScPivotFuncData& rFuncData = mpWndData->GetFuncData(nFieldIndex);
boost::scoped_ptr<AbstractScDPFunctionDlg> pDlg( boost::scoped_ptr<AbstractScDPFunctionDlg> pDlg(
pFact->CreateScDPFunctionDlg( pFact->CreateScDPFunctionDlg(
this, maLabelData, *pData, rFuncData)); this, maLabelData, *pData, rFuncData));
@@ -816,7 +825,7 @@ void ScPivotLayoutDlg::NotifyDoubleClick( ScPivotFieldType eType, size_t nFieldI
if (bFuncChanged) if (bFuncChanged)
// Get the new duplicate count since the function has changed. // Get the new duplicate count since the function has changed.
rFuncData.mnDupCount = maWndData.GetNextDupCount(rFuncData, nFieldIndex); rFuncData.mnDupCount = mpWndData->GetNextDupCount(rFuncData, nFieldIndex);
ScDPLabelData* p = GetLabelData(rFuncData.mnCol); ScDPLabelData* p = GetLabelData(rFuncData.mnCol);
OUString aStr = p->maLayoutName; OUString aStr = p->maLayoutName;
@@ -826,7 +835,7 @@ void ScPivotLayoutDlg::NotifyDoubleClick( ScPivotFieldType eType, size_t nFieldI
aStr = GetFuncString (rFuncData.mnFuncMask); aStr = GetFuncString (rFuncData.mnFuncMask);
aStr += p->maName; aStr += p->maName;
} }
maWndData.SetFieldText(aStr, nFieldIndex, rFuncData.mnDupCount); mpWndData->SetFieldText(aStr, nFieldIndex, rFuncData.mnDupCount);
} }
} }
break; break;
@@ -852,8 +861,8 @@ void ScPivotLayoutDlg::NotifyFieldFocus( ScPivotFieldType eType, bool bGotFocus
if ( bEnable && bGotFocus && pWnd && pWnd->IsEmpty() ) if ( bEnable && bGotFocus && pWnd && pWnd->IsEmpty() )
bEnable = false; bEnable = false;
maBtnRemove.Enable( bEnable ); mpBtnRemove->Enable( bEnable );
maBtnOptions.Enable( bEnable ); mpBtnOptions->Enable( bEnable );
if( bGotFocus ) if( bGotFocus )
meLastActiveType = eType; meLastActiveType = eType;
} }
@@ -871,10 +880,10 @@ void ScPivotLayoutDlg::NotifyMoveFieldToEnd( ScPivotFieldType eToType )
else else
pWnd->GrabFocus(); pWnd->GrabFocus();
if( meLastActiveType == PIVOTFIELDTYPE_SELECT ) if( meLastActiveType == PIVOTFIELDTYPE_SELECT )
maWndSelect.SelectNext(); mpWndSelect->SelectNext();
} }
else else
GrabFieldFocus( maWndSelect ); GrabFieldFocus( mpWndSelect );
} }
void ScPivotLayoutDlg::NotifyRemoveField( ScPivotFieldType eType, size_t nFieldIndex ) void ScPivotLayoutDlg::NotifyRemoveField( ScPivotFieldType eType, size_t nFieldIndex )
@@ -887,7 +896,7 @@ Size ScPivotLayoutDlg::GetStdFieldBtnSize() const
{ {
// This size is static but is platform dependent. The field button size // This size is static but is platform dependent. The field button size
// is calculated relative to the size of the OK button. // is calculated relative to the size of the OK button.
double w = static_cast<double>(maBtnOk.GetSizePixel().Width()) * 0.70; double w = static_cast<double>(mpBtnOk->GetSizePixel().Width()) * 0.70;
return Size(static_cast<long>(w), FIELD_BTN_HEIGHT); return Size(static_cast<long>(w), FIELD_BTN_HEIGHT);
} }
@@ -1087,39 +1096,39 @@ void ScPivotLayoutDlg::InitControlAndDlgSizes()
long nFldW = GetStdFieldBtnSize().Width(); long nFldW = GetStdFieldBtnSize().Width();
long nFldH = GetStdFieldBtnSize().Height(); long nFldH = GetStdFieldBtnSize().Height();
maWndData.SetSizePixel( mpWndData->SetSizePixel(
Size(maWndSelect.GetPosPixel().X() - maWndData.GetPosPixel().X() - FIELD_AREA_GAP*4, Size(mpWndSelect->GetPosPixel().X() - mpWndData->GetPosPixel().X() - FIELD_AREA_GAP*4,
185)); 185));
maWndPage.SetSizePixel( mpWndPage->SetSizePixel(
Size(maWndData.GetSizePixel().Width() + 85, Size(mpWndData->GetSizePixel().Width() + 85,
maWndCol.GetPosPixel().Y() - maWndPage.GetPosPixel().Y() - FIELD_AREA_GAP)); mpWndCol->GetPosPixel().Y() - mpWndPage->GetPosPixel().Y() - FIELD_AREA_GAP));
maWndRow.SetSizePixel( mpWndRow->SetSizePixel(
Size(maWndData.GetPosPixel().X()-maWndRow.GetPosPixel().X() - FIELD_AREA_GAP, Size(mpWndData->GetPosPixel().X()-mpWndRow->GetPosPixel().X() - FIELD_AREA_GAP,
maWndData.GetSizePixel().Height())); mpWndData->GetSizePixel().Height()));
maWndCol.SetSizePixel( mpWndCol->SetSizePixel(
Size(maWndData.GetPosPixel().X() - maWndCol.GetPosPixel().X() + maWndData.GetSizePixel().Width(), Size(mpWndData->GetPosPixel().X() - mpWndCol->GetPosPixel().X() + mpWndData->GetSizePixel().Width(),
maWndData.GetPosPixel().Y() - maWndCol.GetPosPixel().Y() - FIELD_AREA_GAP)); mpWndData->GetPosPixel().Y() - mpWndCol->GetPosPixel().Y() - FIELD_AREA_GAP));
// #i29203# align right border of page window with data window // #i29203# align right border of page window with data window
long nDataPosX = maWndData.GetPosPixel().X() + maWndData.GetSizePixel().Width(); long nDataPosX = mpWndData->GetPosPixel().X() + mpWndData->GetSizePixel().Width();
maWndPage.SetPosPixel( mpWndPage->SetPosPixel(
Point(nDataPosX - maWndPage.GetSizePixel().Width(), Point(nDataPosX - mpWndPage->GetSizePixel().Width(),
maWndPage.GetPosPixel().Y())); mpWndPage->GetPosPixel().Y()));
// selection area // selection area
long nLineSize = 10; // number of fields per column. long nLineSize = 10; // number of fields per column.
long nH = OUTER_MARGIN_VER + nLineSize* nFldH + nLineSize * ROW_FIELD_BTN_GAP; long nH = OUTER_MARGIN_VER + nLineSize* nFldH + nLineSize * ROW_FIELD_BTN_GAP;
nH += ROW_FIELD_BTN_GAP; nH += ROW_FIELD_BTN_GAP;
nH += GetSettings().GetStyleSettings().GetScrollBarSize() + OUTER_MARGIN_VER; nH += GetSettings().GetStyleSettings().GetScrollBarSize() + OUTER_MARGIN_VER;
maWndSelect.SetSizePixel( mpWndSelect->SetSizePixel(
Size(2 * nFldW + ROW_FIELD_BTN_GAP + 10, nH)); Size(2 * nFldW + ROW_FIELD_BTN_GAP + 10, nH));
maWndPage.CalcSize(); mpWndPage->CalcSize();
maWndRow.CalcSize(); mpWndRow->CalcSize();
maWndCol.CalcSize(); mpWndCol->CalcSize();
maWndData.CalcSize(); mpWndData->CalcSize();
maWndSelect.CalcSize(); mpWndSelect->CalcSize();
AdjustDlgSize(); AdjustDlgSize();
} }
@@ -1148,9 +1157,9 @@ void ScPivotLayoutDlg::AdjustDlgSize()
// if it overlaps, and if it does, make the dialog size larger. // if it overlaps, and if it does, make the dialog size larger.
Size aWndSize = GetSizePixel(); Size aWndSize = GetSizePixel();
Point aPosText = maFtInfo.GetPosPixel(); Point aPosText = mpFtInfo->GetPosPixel();
Size aSizeText = maFtInfo.GetSizePixel(); Size aSizeText = mpFtInfo->GetSizePixel();
long nYRef = maWndData.GetPosPixel().Y() + maWndData.GetSizePixel().Height(); long nYRef = mpWndData->GetPosPixel().Y() + mpWndData->GetSizePixel().Height();
if (aPosText.Y() > nYRef) if (aPosText.Y() > nYRef)
// This text is visible. No need to adjust. // This text is visible. No need to adjust.
return; return;
@@ -1170,22 +1179,21 @@ void ScPivotLayoutDlg::AdjustDlgSize()
// Move the relevant controls downward. // Move the relevant controls downward.
std::vector<Window*> aWndToMove; std::vector<Window*> aWndToMove;
aWndToMove.reserve(16); aWndToMove.reserve(16);
aWndToMove.push_back(&maFtInfo); aWndToMove.push_back(mpFtInfo);
aWndToMove.push_back(&maBtnMore); //aWndToMove.push_back(mpBtnMore);
aWndToMove.push_back(&maFlAreas); aWndToMove.push_back(mpFtInArea);
aWndToMove.push_back(&maFtInArea); aWndToMove.push_back(mpEdInPos);
aWndToMove.push_back(&maEdInPos); aWndToMove.push_back(mpRbInPos);
aWndToMove.push_back(&maRbInPos); aWndToMove.push_back(mpFtOutArea);
aWndToMove.push_back(&maFtOutArea); aWndToMove.push_back(mpLbOutPos);
aWndToMove.push_back(&maLbOutPos); aWndToMove.push_back(mpEdOutPos);
aWndToMove.push_back(&maEdOutPos); aWndToMove.push_back(mpRbOutPos);
aWndToMove.push_back(&maRbOutPos); aWndToMove.push_back(mpBtnIgnEmptyRows);
aWndToMove.push_back(&maBtnIgnEmptyRows); aWndToMove.push_back(mpBtnDetectCat);
aWndToMove.push_back(&maBtnDetectCat); aWndToMove.push_back(mpBtnTotalCol);
aWndToMove.push_back(&maBtnTotalCol); aWndToMove.push_back(mpBtnTotalRow);
aWndToMove.push_back(&maBtnTotalRow); aWndToMove.push_back(mpBtnFilter);
aWndToMove.push_back(&maBtnFilter); aWndToMove.push_back(mpBtnDrillDown);
aWndToMove.push_back(&maBtnDrillDown);
std::for_each(aWndToMove.begin(), aWndToMove.end(), MoveWndDown(nDelta)); std::for_each(aWndToMove.begin(), aWndToMove.end(), MoveWndDown(nDelta));
} }
@@ -1194,16 +1202,16 @@ bool ScPivotLayoutDlg::GetPivotArrays(
vector<ScPivotField>& rRowFields, vector<ScPivotField>& rDataFields ) vector<ScPivotField>& rRowFields, vector<ScPivotField>& rDataFields )
{ {
vector<ScPivotField> aPageFields; vector<ScPivotField> aPageFields;
maWndPage.ConvertToPivotArray(aPageFields); mpWndPage->ConvertToPivotArray(aPageFields);
vector<ScPivotField> aColFields; vector<ScPivotField> aColFields;
maWndCol.ConvertToPivotArray(aColFields); mpWndCol->ConvertToPivotArray(aColFields);
vector<ScPivotField> aRowFields; vector<ScPivotField> aRowFields;
maWndRow.ConvertToPivotArray(aRowFields); mpWndRow->ConvertToPivotArray(aRowFields);
vector<ScPivotField> aDataFields; vector<ScPivotField> aDataFields;
maWndData.ConvertToPivotArray(aDataFields); mpWndData->ConvertToPivotArray(aDataFields);
sheet::DataPilotFieldOrientation eOrientDataLayout = sheet::DataPilotFieldOrientation_ROW; sheet::DataPilotFieldOrientation eOrientDataLayout = sheet::DataPilotFieldOrientation_ROW;
ScDPSaveData* pSaveData = mxDlgDPObject->GetSaveData(); ScDPSaveData* pSaveData = mxDlgDPObject->GetSaveData();
@@ -1234,7 +1242,7 @@ bool ScPivotLayoutDlg::GetPivotArrays(
void ScPivotLayoutDlg::UpdateSrcRange() void ScPivotLayoutDlg::UpdateSrcRange()
{ {
OUString aSrcStr = maEdInPos.GetText(); OUString aSrcStr = mpEdInPos->GetText();
sal_uInt16 nResult = ScRange().Parse(aSrcStr, mpDoc, mpDoc->GetAddressConvention()); sal_uInt16 nResult = ScRange().Parse(aSrcStr, mpDoc, mpDoc->GetAddressConvention());
DataSrcType eSrcType = SRC_INVALID; DataSrcType eSrcType = SRC_INVALID;
ScRange aNewRange; ScRange aNewRange;
@@ -1246,7 +1254,7 @@ void ScPivotLayoutDlg::UpdateSrcRange()
ConvertDoubleRef(mpDoc, aSrcStr, 1, start, end, mpDoc->GetAddressConvention()); ConvertDoubleRef(mpDoc, aSrcStr, 1, start, end, mpDoc->GetAddressConvention());
aNewRange.aStart = start.GetAddress(); aNewRange.aStart = start.GetAddress();
aNewRange.aEnd = end.GetAddress(); aNewRange.aEnd = end.GetAddress();
maEdInPos.SetRefValid(true); mpEdInPos->SetRefValid(true);
eSrcType = SRC_REF; eSrcType = SRC_REF;
} }
else else
@@ -1265,18 +1273,18 @@ void ScPivotLayoutDlg::UpdateSrcRange()
} }
} }
maEdInPos.SetRefValid(bValid); mpEdInPos->SetRefValid(bValid);
if (!bValid) if (!bValid)
{ {
// All attempts have failed. Give up. // All attempts have failed. Give up.
maBtnOk.Disable(); mpBtnOk->Disable();
return; return;
} }
eSrcType = SRC_NAME; eSrcType = SRC_NAME;
} }
maBtnOk.Enable(); mpBtnOk->Enable();
// Now update the data src range or range name with the dp object. // Now update the data src range or range name with the dp object.
ScSheetSourceDesc inSheet = *mxDlgDPObject->GetSheetDesc(); ScSheetSourceDesc inSheet = *mxDlgDPObject->GetSheetDesc();
@@ -1297,8 +1305,8 @@ void ScPivotLayoutDlg::UpdateSrcRange()
// message. In the future we should display the error message // message. In the future we should display the error message
// somewhere in the dialog to let the user know of the reason // somewhere in the dialog to let the user know of the reason
// for error. // for error.
maEdInPos.SetRefValid(false); mpEdInPos->SetRefValid(false);
maBtnOk.Disable(); mpBtnOk->Disable();
return; return;
} }
} }
@@ -1317,11 +1325,11 @@ void ScPivotLayoutDlg::UpdateSrcRange()
mxDlgDPObject->FillLabelData(maPivotData); mxDlgDPObject->FillLabelData(maPivotData);
maLabelData.clear(); maLabelData.clear();
maWndSelect.ClearFields(); mpWndSelect->ClearFields();
maWndData.ClearFields(); mpWndData->ClearFields();
maWndRow.ClearFields(); mpWndRow->ClearFields();
maWndCol.ClearFields(); mpWndCol->ClearFields();
maWndPage.ClearFields(); mpWndPage->ClearFields();
InitFieldWindows(); InitFieldWindows();
RepaintFieldWindows(); RepaintFieldWindows();
@@ -1329,45 +1337,45 @@ void ScPivotLayoutDlg::UpdateSrcRange()
void ScPivotLayoutDlg::UpdateOutputPos() void ScPivotLayoutDlg::UpdateOutputPos()
{ {
sal_uInt16 nSelPos = maLbOutPos.GetSelectEntryPos(); sal_uInt16 nSelPos = mpLbOutPos->GetSelectEntryPos();
OUString aEntryStr = maLbOutPos.GetEntry(nSelPos); OUString aEntryStr = mpLbOutPos->GetEntry(nSelPos);
if (aEntryStr == maStrNewTable) if (aEntryStr == maStrNewTable)
{ {
// New sheet as output. // New sheet as output.
maEdOutPos.Disable(); mpEdOutPos->Disable();
maRbOutPos.Disable(); mpRbOutPos->Disable();
maEdOutPos.SetText(OUString()); // Clear the reference text. mpEdOutPos->SetText(OUString()); // Clear the reference text.
} }
else if (aEntryStr == maStrUndefined) else if (aEntryStr == maStrUndefined)
{ {
maEdOutPos.Enable(); mpEdOutPos->Enable();
maRbOutPos.Enable(); mpRbOutPos->Enable();
maEdOutPos.SetText(maOutputRefStr); mpEdOutPos->SetText(maOutputRefStr);
OutputPosUpdated(); OutputPosUpdated();
} }
else else
{ {
// Named range as output. Get its corresponding reference string. // Named range as output. Get its corresponding reference string.
const OUString* p = (const OUString*)maLbOutPos.GetEntryData(nSelPos); const OUString* p = (const OUString*)mpLbOutPos->GetEntryData(nSelPos);
if (p) if (p)
maEdOutPos.SetText(*p); mpEdOutPos->SetText(*p);
} }
} }
void ScPivotLayoutDlg::OutputPosUpdated() void ScPivotLayoutDlg::OutputPosUpdated()
{ {
OUString aOutPosStr = maEdOutPos.GetText(); OUString aOutPosStr = mpEdOutPos->GetText();
sal_uInt16 nResult = ScAddress().Parse(aOutPosStr, mpDoc, mpDoc->GetAddressConvention()); sal_uInt16 nResult = ScAddress().Parse(aOutPosStr, mpDoc, mpDoc->GetAddressConvention());
if (!(nResult & SCA_VALID)) if (!(nResult & SCA_VALID))
{ {
// Not a valid reference. // Not a valid reference.
maEdOutPos.SetRefValid(false); mpEdOutPos->SetRefValid(false);
return; return;
} }
maEdOutPos.SetRefValid(true); mpEdOutPos->SetRefValid(true);
boost::ptr_vector<OUString>::const_iterator it = boost::ptr_vector<OUString>::const_iterator it =
std::find(maRefStrs.begin(), maRefStrs.end(), aOutPosStr); std::find(maRefStrs.begin(), maRefStrs.end(), aOutPosStr);
@@ -1375,7 +1383,7 @@ void ScPivotLayoutDlg::OutputPosUpdated()
if (it == maRefStrs.end()) if (it == maRefStrs.end())
{ {
// This is NOT one of the named ranges. // This is NOT one of the named ranges.
maLbOutPos.SelectEntryPos(0); mpLbOutPos->SelectEntryPos(0);
return; return;
} }
@@ -1383,7 +1391,7 @@ void ScPivotLayoutDlg::OutputPosUpdated()
// offset for the top two entries which are reserved for something else. // offset for the top two entries which are reserved for something else.
boost::ptr_vector<OUString>::const_iterator itBeg = maRefStrs.begin(); boost::ptr_vector<OUString>::const_iterator itBeg = maRefStrs.begin();
size_t nPos = std::distance(itBeg, it); size_t nPos = std::distance(itBeg, it);
maLbOutPos.SelectEntryPos(nPos+2); mpLbOutPos->SelectEntryPos(nPos+2);
} }
namespace { namespace {
@@ -1397,23 +1405,23 @@ void EnableAndGrabFocus(formula::RefEdit& rEdit)
} }
void ScPivotLayoutDlg::MoreBtnClicked() void ScPivotLayoutDlg::ExpanderClicked()
{ {
mbRefInputMode = maBtnMore.GetState(); mbRefInputMode = mpExpander->get_expanded();
if (!maBtnMore.GetState()) if (!mpExpander->get_expanded())
return; return;
formula::RefEdit* p = maEdInPos.IsEnabled() ? &maEdInPos : &maEdOutPos; formula::RefEdit* p = mpEdInPos->IsEnabled() ? mpEdInPos : mpEdOutPos;
EnableAndGrabFocus(*p); EnableAndGrabFocus(*p);
} }
void ScPivotLayoutDlg::RepaintFieldWindows() void ScPivotLayoutDlg::RepaintFieldWindows()
{ {
Rectangle aRect; // currently has no effect whatsoever. Rectangle aRect; // currently has no effect whatsoever.
maWndPage.Paint(aRect); mpWndPage->Paint(aRect);
maWndCol.Paint(aRect); mpWndCol->Paint(aRect);
maWndRow.Paint(aRect); mpWndRow->Paint(aRect);
maWndData.Paint(aRect); mpWndData->Paint(aRect);
} }
ScDPFieldControlBase* ScPivotLayoutDlg::GetFieldWindow(ScPivotFieldType eType) ScDPFieldControlBase* ScPivotLayoutDlg::GetFieldWindow(ScPivotFieldType eType)
@@ -1421,15 +1429,15 @@ ScDPFieldControlBase* ScPivotLayoutDlg::GetFieldWindow(ScPivotFieldType eType)
switch (eType) switch (eType)
{ {
case PIVOTFIELDTYPE_PAGE: case PIVOTFIELDTYPE_PAGE:
return &maWndPage; return mpWndPage;
case PIVOTFIELDTYPE_COL: case PIVOTFIELDTYPE_COL:
return &maWndCol; return mpWndCol;
case PIVOTFIELDTYPE_ROW: case PIVOTFIELDTYPE_ROW:
return &maWndRow; return mpWndRow;
case PIVOTFIELDTYPE_DATA: case PIVOTFIELDTYPE_DATA:
return &maWndData; return mpWndData;
case PIVOTFIELDTYPE_SELECT: case PIVOTFIELDTYPE_SELECT:
return &maWndSelect; return mpWndSelect;
default: default:
; ;
} }
@@ -1443,16 +1451,16 @@ void ScPivotLayoutDlg::GetOtherFieldWindows(ScPivotFieldType eType, ScDPFieldCon
switch (eType) switch (eType)
{ {
case PIVOTFIELDTYPE_PAGE: case PIVOTFIELDTYPE_PAGE:
rpWnd1 = &maWndRow; rpWnd1 = mpWndRow;
rpWnd2 = &maWndCol; rpWnd2 = mpWndCol;
break; break;
case PIVOTFIELDTYPE_COL: case PIVOTFIELDTYPE_COL:
rpWnd1 = &maWndPage; rpWnd1 = mpWndPage;
rpWnd2 = &maWndRow; rpWnd2 = mpWndRow;
break; break;
case PIVOTFIELDTYPE_ROW: case PIVOTFIELDTYPE_ROW:
rpWnd1 = &maWndPage; rpWnd1 = mpWndPage;
rpWnd2 = &maWndCol; rpWnd2 = mpWndCol;
break; break;
default: default:
; ;
@@ -1467,12 +1475,12 @@ void ScPivotLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDoc )
if ( rRef.aStart != rRef.aEnd ) if ( rRef.aStart != rRef.aEnd )
RefInputStart(mpRefInputEdit); RefInputStart(mpRefInputEdit);
if (mpRefInputEdit == &maEdInPos) if (mpRefInputEdit == mpEdInPos)
{ {
OUString aRefStr(rRef.Format(SCR_ABS_3D, pDoc, pDoc->GetAddressConvention())); OUString aRefStr(rRef.Format(SCR_ABS_3D, pDoc, pDoc->GetAddressConvention()));
mpRefInputEdit->SetRefString(aRefStr); mpRefInputEdit->SetRefString(aRefStr);
} }
else if (mpRefInputEdit == &maEdOutPos) else if (mpRefInputEdit == mpEdOutPos)
{ {
OUString aRefStr(rRef.aStart.Format(STD_FORMAT, pDoc, pDoc->GetAddressConvention())); OUString aRefStr(rRef.aStart.Format(STD_FORMAT, pDoc, pDoc->GetAddressConvention()));
mpRefInputEdit->SetRefString(aRefStr); mpRefInputEdit->SetRefString(aRefStr);
@@ -1493,9 +1501,9 @@ void ScPivotLayoutDlg::SetActive()
if (mpRefInputEdit) if (mpRefInputEdit)
mpRefInputEdit->GrabFocus(); mpRefInputEdit->GrabFocus();
if (mpRefInputEdit == &maEdInPos) if (mpRefInputEdit == mpEdInPos)
EdInModifyHdl( NULL ); EdInModifyHdl( NULL );
else if (mpRefInputEdit == &maEdOutPos) else if (mpRefInputEdit == mpEdOutPos)
EdOutModifyHdl( NULL ); EdOutModifyHdl( NULL );
} }
else else
@@ -1512,12 +1520,12 @@ IMPL_LINK( ScPivotLayoutDlg, ClickHdl, PushButton *, pBtn )
if (!pWnd) if (!pWnd)
return 0; return 0;
if( pBtn == &maBtnRemove ) if( pBtn == mpBtnRemove )
{ {
RemoveField( meLastActiveType, pWnd->GetSelectedField() ); RemoveField( meLastActiveType, pWnd->GetSelectedField() );
if( !pWnd->IsEmpty() ) pWnd->GrabFocus(); if( !pWnd->IsEmpty() ) pWnd->GrabFocus();
} }
else if( pBtn == &maBtnOptions ) else if( pBtn == mpBtnOptions )
{ {
NotifyDoubleClick( meLastActiveType, pWnd->GetSelectedField() ); NotifyDoubleClick( meLastActiveType, pWnd->GetSelectedField() );
pWnd->GrabFocus(); pWnd->GrabFocus();
@@ -1527,19 +1535,19 @@ IMPL_LINK( ScPivotLayoutDlg, ClickHdl, PushButton *, pBtn )
IMPL_LINK_NOARG(ScPivotLayoutDlg, OkHdl) IMPL_LINK_NOARG(ScPivotLayoutDlg, OkHdl)
{ {
OUString aOutPosStr = maEdOutPos.GetText(); OUString aOutPosStr = mpEdOutPos->GetText();
ScAddress aAdrDest; ScAddress aAdrDest;
bool bToNewTable = (maLbOutPos.GetSelectEntryPos() == 1); bool bToNewTable = (mpLbOutPos->GetSelectEntryPos() == 1);
sal_uInt16 nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, mpDoc, mpDoc->GetAddressConvention() ) : 0; sal_uInt16 nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, mpDoc, mpDoc->GetAddressConvention() ) : 0;
if (!bToNewTable && (aOutPosStr.isEmpty() || (nResult & SCA_VALID) != SCA_VALID)) if (!bToNewTable && (aOutPosStr.isEmpty() || (nResult & SCA_VALID) != SCA_VALID))
{ {
// Invalid reference. Bail out. // Invalid reference. Bail out.
if ( !maBtnMore.GetState() ) if ( !mpExpander->get_expanded() )
maBtnMore.SetState(true); mpExpander->set_expanded(true);
ErrorBox(this, WinBits(WB_OK | WB_DEF_OK), ScGlobal::GetRscString(STR_INVALID_TABREF)).Execute(); ErrorBox(this, WinBits(WB_OK | WB_DEF_OK), ScGlobal::GetRscString(STR_INVALID_TABREF)).Execute();
maEdOutPos.GrabFocus(); mpEdOutPos->GrabFocus();
return 0; return 0;
} }
@@ -1564,12 +1572,12 @@ IMPL_LINK_NOARG(ScPivotLayoutDlg, OkHdl)
ScRange aOutRange( aAdrDest ); // bToNewTable is passed separately ScRange aOutRange( aAdrDest ); // bToNewTable is passed separately
ScDPSaveData aSaveData; ScDPSaveData aSaveData;
aSaveData.SetIgnoreEmptyRows( maBtnIgnEmptyRows.IsChecked() ); aSaveData.SetIgnoreEmptyRows( mpBtnIgnEmptyRows->IsChecked() );
aSaveData.SetRepeatIfEmpty( maBtnDetectCat.IsChecked() ); aSaveData.SetRepeatIfEmpty( mpBtnDetectCat->IsChecked() );
aSaveData.SetColumnGrand( maBtnTotalCol.IsChecked() ); aSaveData.SetColumnGrand( mpBtnTotalCol->IsChecked() );
aSaveData.SetRowGrand( maBtnTotalRow.IsChecked() ); aSaveData.SetRowGrand( mpBtnTotalRow->IsChecked() );
aSaveData.SetFilterButton( maBtnFilter.IsChecked() ); aSaveData.SetFilterButton( mpBtnFilter->IsChecked() );
aSaveData.SetDrillDown( maBtnDrillDown.IsChecked() ); aSaveData.SetDrillDown( mpBtnDrillDown->IsChecked() );
uno::Reference<sheet::XDimensionsSupplier> xSource = mxDlgDPObject->GetSource(); uno::Reference<sheet::XDimensionsSupplier> xSource = mxDlgDPObject->GetSource();
@@ -1691,9 +1699,9 @@ IMPL_LINK_NOARG(ScPivotLayoutDlg, CancelHdl)
return 0; return 0;
} }
IMPL_LINK_NOARG(ScPivotLayoutDlg, MoreClickHdl) IMPL_LINK_NOARG(ScPivotLayoutDlg, ExpandHdl)
{ {
MoreBtnClicked(); ExpanderClicked();
return 0; return 0;
} }

View File

@@ -25,6 +25,7 @@
#include <vcl/ctrl.hxx> #include <vcl/ctrl.hxx>
#include <vcl/fixed.hxx> #include <vcl/fixed.hxx>
#include <vcl/scrbar.hxx> #include <vcl/scrbar.hxx>
#include <vcl/layout.hxx>
#include "address.hxx" #include "address.hxx"
#include "pivot.hxx" #include "pivot.hxx"
@@ -91,10 +92,13 @@ public:
ScDPFieldControlBase( ScDPFieldControlBase(
ScPivotLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScPivotLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption, const char* pcHelpId);
ScDPFieldControlBase( Window* pParent );
virtual ~ScDPFieldControlBase(); virtual ~ScDPFieldControlBase();
virtual void CalcSize() = 0; virtual void CalcSize() = 0;
virtual void Init( ScPivotLayoutDlg* pDlg, FixedText* pCaption );
virtual bool IsValidIndex( size_t nIndex ) const = 0; virtual bool IsValidIndex( size_t nIndex ) const = 0;
/** @return The pixel position of a field (without bound check). */ /** @return The pixel position of a field (without bound check). */
virtual Point GetFieldPosition( size_t nIndex ) = 0; virtual Point GetFieldPosition( size_t nIndex ) = 0;
@@ -276,6 +280,7 @@ protected:
public: public:
ScDPHorFieldControl( ScDPHorFieldControl(
ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId);
ScDPHorFieldControl( Window* pParent );
virtual ~ScDPHorFieldControl(); virtual ~ScDPHorFieldControl();
@@ -313,6 +318,7 @@ class ScDPPageFieldControl : public ScDPHorFieldControl
public: public:
ScDPPageFieldControl( ScDPPageFieldControl(
ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId);
ScDPPageFieldControl( Window* pParent );
virtual ~ScDPPageFieldControl(); virtual ~ScDPPageFieldControl();
virtual ScPivotFieldType GetFieldType() const; virtual ScPivotFieldType GetFieldType() const;
@@ -326,6 +332,7 @@ class ScDPColFieldControl : public ScDPHorFieldControl
public: public:
ScDPColFieldControl( ScDPColFieldControl(
ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId);
ScDPColFieldControl( Window* pParent );
virtual ~ScDPColFieldControl(); virtual ~ScDPColFieldControl();
virtual ScPivotFieldType GetFieldType() const; virtual ScPivotFieldType GetFieldType() const;
@@ -342,6 +349,7 @@ class ScDPRowFieldControl : public ScDPFieldControlBase
public: public:
ScDPRowFieldControl( ScDPRowFieldControl(
ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId);
ScDPRowFieldControl( Window* pParent );
virtual ~ScDPRowFieldControl(); virtual ~ScDPRowFieldControl();
@@ -383,6 +391,7 @@ class ScDPSelectFieldControl : public ScDPHorFieldControl
public: public:
ScDPSelectFieldControl( ScDPSelectFieldControl(
ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId);
ScDPSelectFieldControl( Window* pParent );
virtual ~ScDPSelectFieldControl(); virtual ~ScDPSelectFieldControl();
virtual ScPivotFieldType GetFieldType() const; virtual ScPivotFieldType GetFieldType() const;
@@ -396,6 +405,7 @@ class ScDPDataFieldControl : public ScDPHorFieldControl
public: public:
ScDPDataFieldControl( ScDPDataFieldControl(
ScPivotLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScPivotLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption, const char* pcHelpId);
ScDPDataFieldControl( Window* pParent );
virtual ~ScDPDataFieldControl(); virtual ~ScDPDataFieldControl();
virtual ScPivotFieldType GetFieldType() const; virtual ScPivotFieldType GetFieldType() const;

View File

@@ -139,7 +139,7 @@ private:
/** Fills the field windows from the current pivot table settings. */ /** Fills the field windows from the current pivot table settings. */
void InitFieldWindows(); void InitFieldWindows();
/** Sets focus to the specified field control, if it is not empty. */ /** Sets focus to the specified field control, if it is not empty. */
void GrabFieldFocus( ScDPFieldControlBase& rFieldWindow ); void GrabFieldFocus( ScDPFieldControlBase* rFieldWindow );
void InitWndSelect(const ScDPLabelDataVector& rLabels); void InitWndSelect(const ScDPLabelDataVector& rLabels);
void InitWndData(const std::vector<ScPivotField>& rFields); void InitWndData(const std::vector<ScPivotField>& rFields);
@@ -166,7 +166,7 @@ private:
void UpdateSrcRange(); void UpdateSrcRange();
void UpdateOutputPos(); void UpdateOutputPos();
void OutputPosUpdated(); void OutputPosUpdated();
void MoreBtnClicked(); void ExpanderClicked();
void RepaintFieldWindows(); void RepaintFieldWindows();
@@ -188,7 +188,7 @@ private:
DECL_LINK( ClickHdl, PushButton * ); DECL_LINK( ClickHdl, PushButton * );
DECL_LINK( OkHdl, void * ); DECL_LINK( OkHdl, void * );
DECL_LINK( CancelHdl, void * ); DECL_LINK( CancelHdl, void * );
DECL_LINK( MoreClickHdl, void * ); DECL_LINK( ExpandHdl, void * );
DECL_LINK( EdOutModifyHdl, void * ); DECL_LINK( EdOutModifyHdl, void * );
DECL_LINK( EdInModifyHdl, void * ); DECL_LINK( EdInModifyHdl, void * );
DECL_LINK( SelAreaHdl, void * ); DECL_LINK( SelAreaHdl, void * );
@@ -197,41 +197,40 @@ private:
private: private:
typedef boost::scoped_ptr<ScDPObject> ScDPObjectPtr; typedef boost::scoped_ptr<ScDPObject> ScDPObjectPtr;
FixedLine maFlLayout; FixedText* mpFtPage;
FixedText maFtPage; ScDPPageFieldControl* mpWndPage;
ScDPPageFieldControl maWndPage; FixedText* mpFtCol;
FixedText maFtCol; ScDPColFieldControl* mpWndCol;
ScDPColFieldControl maWndCol; FixedText* mpFtRow;
FixedText maFtRow; ScDPRowFieldControl* mpWndRow;
ScDPRowFieldControl maWndRow; FixedText* mpFtData;
FixedText maFtData; ScDPDataFieldControl* mpWndData;
ScDPDataFieldControl maWndData; ScDPSelectFieldControl* mpWndSelect;
ScDPSelectFieldControl maWndSelect; FixedText* mpFtInfo;
FixedInfo maFtInfo;
std::vector<ScDPFieldControlBase*> maFieldCtrls; std::vector<ScDPFieldControlBase*> maFieldCtrls;
FixedLine maFlAreas; FixedText* mpFtInArea;
FixedText maFtInArea; ::formula::RefEdit* mpEdInPos;
::formula::RefEdit maEdInPos; ::formula::RefButton* mpRbInPos;
::formula::RefButton maRbInPos; ListBox* mpLbOutPos;
ListBox maLbOutPos; FixedText* mpFtOutArea;
FixedText maFtOutArea; formula::RefEdit* mpEdOutPos;
formula::RefEdit maEdOutPos; formula::RefButton* mpRbOutPos;
formula::RefButton maRbOutPos; CheckBox* mpBtnIgnEmptyRows;
CheckBox maBtnIgnEmptyRows; CheckBox* mpBtnDetectCat;
CheckBox maBtnDetectCat; CheckBox* mpBtnTotalCol;
CheckBox maBtnTotalCol; CheckBox* mpBtnTotalRow;
CheckBox maBtnTotalRow; CheckBox* mpBtnFilter;
CheckBox maBtnFilter; CheckBox* mpBtnDrillDown;
CheckBox maBtnDrillDown;
OKButton maBtnOk; OKButton* mpBtnOk;
CancelButton maBtnCancel; CancelButton* mpBtnCancel;
HelpButton maBtnHelp; PushButton* mpBtnRemove;
PushButton maBtnRemove; PushButton* mpBtnOptions;
PushButton maBtnOptions; //FIXME: replace with expander
MoreButton maBtnMore; //MoreButton* mpBtnMore;
VclExpander* mpExpander;
std::vector<OUString> maFuncNames; /// Localized function names from resource. std::vector<OUString> maFuncNames; /// Localized function names from resource.
boost::ptr_vector<OUString> maRefStrs; /// Reference strings stored with the output list box. boost::ptr_vector<OUString> maRefStrs; /// Reference strings stored with the output list box.
ScDPObjectPtr mxDlgDPObject; /// Clone of the pivot table object this dialog is based on. ScDPObjectPtr mxDlgDPObject; /// Clone of the pivot table object this dialog is based on.

View File

@@ -0,0 +1,697 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="PivotTableLayout">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="layout_style">start</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="remove">
<property name="label">gtk-remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="options">
<property name="label" translatable="yes">Options...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="sclo-ScDPPageFieldControl" id="pagefield">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
<placeholder/>
</child>
<child>
<object class="sclo-ScDPColFieldControl" id="columnfield">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="sclo-ScDPRowFieldControl" id="rowfield">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="sclo-ScDPDataFieldControl" id="datafield">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="info">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Drag the fields from the right into the desired position</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="sclo-ScDPSelectFieldControl" id="buttonfield">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="more">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<property name="top_padding">6</property>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="select_from">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Selection from:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">rangesel1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="foruilo-RefEdit" id="rangesel1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="foruilo-RefButton" id="changebutton1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="results_to">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Res_ults to:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">rangesel2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="target_area">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="foruilo-RefEdit" id="rangesel2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="foruilo-RefButton" id="changebutton2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkCheckButton" id="ignore_empty">
<property name="label" translatable="yes">Ignore _empty rows</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="detect_category">
<property name="label" translatable="yes">_Identify categories</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="total_cols">
<property name="label" translatable="yes">Total colum_ns</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="total_rows">
<property name="label" translatable="yes">_Total rows</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="add_filter">
<property name="label" translatable="yes">_Add filter</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="drill_down">
<property name="label" translatable="yes">Ena_ble drill to details</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Result</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">More</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="page_text">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Page Fields</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="column_text">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Column Fields</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="row_text">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Row Fields</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="data_text">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Data Fields</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="select_text">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Selection area</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="sum">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Sum - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="count">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Count - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="mean">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Mean - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="max">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Max - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">10</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="min">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Min - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">11</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="product">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Product - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">12</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="count2">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Count - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">13</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="stdev">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">StDev - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">14</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="stdevp">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">StDevP - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">15</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="var">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Var - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">16</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="varp">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">VarP - </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">17</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
<action-widget response="0">help</action-widget>
<action-widget response="0">remove</action-widget>
<action-widget response="0">options</action-widget>
</action-widgets>
</object>
</interface>