summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-11-18 15:55:45 -0500
committerKohei Yoshida <kyoshida@novell.com>2010-11-18 15:55:45 -0500
commitde7813a766fcf6112f74d6949594f3c8f34c0905 (patch)
treec215beec783b1dd018ff299b516b062cd88a27ad
parent06cb54cdbb4603d79460b950ba2c19d5b9134b7f (diff)
Started re-working the select field window widget.
The new widget will make use of horizontal scroll control base class to manage scrolling etc. Much better than the old method of having the parent class manage scrolling.
-rw-r--r--sc/source/ui/dbgui/dpuiglobal.hxx2
-rw-r--r--sc/source/ui/dbgui/fieldwnd.cxx24
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx12
-rw-r--r--sc/source/ui/inc/fieldwnd.hxx17
-rw-r--r--sc/source/ui/inc/pvlaydlg.hxx3
5 files changed, 48 insertions, 10 deletions
diff --git a/sc/source/ui/dbgui/dpuiglobal.hxx b/sc/source/ui/dbgui/dpuiglobal.hxx
index 9312e07ddb2c..8b5c74303177 100644
--- a/sc/source/ui/dbgui/dpuiglobal.hxx
+++ b/sc/source/ui/dbgui/dpuiglobal.hxx
@@ -32,7 +32,7 @@
#define OUTER_MARGIN_HOR 4
#define OUTER_MARGIN_VER 4
-#define DATA_FIELD_BTN_GAP 4 // must be an even number
+#define DATA_FIELD_BTN_GAP 2 // must be an even number
#define ROW_FIELD_BTN_GAP 2 // must be an even number
#define FIELD_BTN_WIDTH 81
#define FIELD_BTN_HEIGHT 23
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index e1865e2b3e5e..3a3a03f1d560 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -41,7 +41,7 @@
#include "dpuiglobal.hxx"
#include "AccessibleDataPilotControl.hxx"
#include "scresid.hxx"
-#include "sc.hrc"
+#include "pivot.hrc"
using ::rtl::OUString;
using ::std::vector;
@@ -1215,6 +1215,26 @@ IMPL_LINK(ScDPRowFieldControl, EndScrollHdl, ScrollBar*, EMPTYARG)
//=============================================================================
+#if NEW_SELECT_FIELD
+
+ScDPSelectFieldControl::ScDPSelectFieldControl(
+ ScDPLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption) :
+ ScDPHorFieldControl(pDialog, rResId, pCaption)
+{
+ SetName(String(ScResId(STR_SELECT)));
+}
+
+ScDPSelectFieldControl::~ScDPSelectFieldControl()
+{
+}
+
+ScDPFieldType ScDPSelectFieldControl::GetFieldType() const
+{
+ return TYPE_SELECT;
+}
+
+#else
+
ScDPSelectFieldControl::ScDPSelectFieldControl(
ScDPLayoutDlg* pDialog, const ResId& rResId, const String& rName ) :
ScDPFieldControlBase( pDialog, rResId, NULL )
@@ -1326,6 +1346,8 @@ ScDPFieldType ScDPSelectFieldControl::GetFieldType() const
return TYPE_SELECT;
}
+#endif
+
//=============================================================================
ScDPDataFieldControl::ScDPDataFieldControl( ScDPLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption ) :
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index dd9d4bf3528c..9986b9a13626 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -146,7 +146,7 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar
aWndRow ( this, ScResId( WND_ROW ), &aFtRow ),
aFtData ( this, ScResId( FT_DATA ) ),
aWndData ( this, ScResId( WND_DATA ), &aFtData ),
- aWndSelect ( this, ScResId( WND_SELECT ), String(ScResId(STR_SELECT)) ),
+ aWndSelect ( this, ScResId( WND_SELECT ), NULL ),
aSlider ( this, ScResId( WND_HSCROLL ) ),
aFtInfo ( this, ScResId( FT_INFO ) ),
@@ -189,7 +189,8 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar
GetViewData() ),
pDoc ( ((ScTabViewShell*)SfxViewShell::Current())->
GetViewData()->GetDocument() ),
- bRefInputMode ( FALSE )
+ bRefInputMode (false),
+ mbValidSrcRange (false)
{
xDlgDPObject->SetAlive( TRUE ); // needed to get structure information
xDlgDPObject->FillOldParam( thePivotData, FALSE );
@@ -352,11 +353,6 @@ void ScDPLayoutDlg::Init(bool bNewOutput)
aWndSelect.SetHelpId( HID_SC_DPLAY_SELECT );
InitFocus();
-
-// SetDispatcherLock( TRUE ); // Modal-Modus einschalten
-
- //@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
}
//----------------------------------------------------------------------------
@@ -1412,6 +1408,7 @@ void ScDPLayoutDlg::CalcWndSizes()
aWndRow.CalcSize();
aWndCol.CalcSize();
aWndData.CalcSize();
+ aWndSelect.CalcSize();
}
namespace {
@@ -1467,6 +1464,7 @@ bool ScDPLayoutDlg::GetPivotArrays(
void ScDPLayoutDlg::UpdateSrcRange()
{
+ StackPrinter __stack_printer__("ScDPLayoutDlg::UpdateSrcRange");
String theCurPosStr = aEdInPos.GetText();
USHORT nResult = ScRange().Parse(theCurPosStr, pDoc, pDoc->GetAddressConvention());
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 77c6b6644be8..0b1fb8506a9e 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -37,6 +37,8 @@
#include <vcl/scrbar.hxx>
#include <cppuhelper/weakref.hxx>
+#define NEW_SELECT_FIELD 1
+
#define PAGE_SIZE 16 // count of visible fields for scrollbar
#define LINE_SIZE 8 // count of fields per column for scrollbar
#define MAX_FIELDS 8 // maximum count of fields for row/col/data area
@@ -339,6 +341,20 @@ private:
// ============================================================================
+#if NEW_SELECT_FIELD
+
+class ScDPSelectFieldControl : public ScDPHorFieldControl
+{
+public:
+ ScDPSelectFieldControl(
+ ScDPLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption);
+ virtual ~ScDPSelectFieldControl();
+
+ virtual ScDPFieldType GetFieldType() const;
+};
+
+#else
+
class ScDPSelectFieldControl : public ScDPFieldControlBase
{
public:
@@ -364,6 +380,7 @@ protected:
virtual size_t GetDisplayPosition(size_t nIndex) const { return 0; }
virtual void Redraw();
};
+#endif
// ============================================================================
diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx
index f732e6c3a6f5..3416243266a9 100644
--- a/sc/source/ui/inc/pvlaydlg.hxx
+++ b/sc/source/ui/inc/pvlaydlg.hxx
@@ -181,7 +181,8 @@ private:
ScPivotParam thePivotData;
ScViewData* pViewData;
ScDocument* pDoc;
- BOOL bRefInputMode;
+ bool bRefInputMode;
+ bool mbValidSrcRange;
private:
void Init (bool bNewOutput);