[Libreoffice-commits] .: Branch 'feature/calc-dp-unlimited-fields' - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Nov 18 12:56:53 PST 2010
sc/source/ui/dbgui/dpuiglobal.hxx | 2 +-
sc/source/ui/dbgui/fieldwnd.cxx | 24 +++++++++++++++++++++++-
sc/source/ui/dbgui/pvlaydlg.cxx | 12 +++++-------
sc/source/ui/inc/fieldwnd.hxx | 17 +++++++++++++++++
sc/source/ui/inc/pvlaydlg.hxx | 3 ++-
5 files changed, 48 insertions(+), 10 deletions(-)
New commits:
commit df8379433f5bc8ef6ac81f553b24b85514d7f942
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Thu Nov 18 15:55:45 2010 -0500
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.
diff --git a/sc/source/ui/dbgui/dpuiglobal.hxx b/sc/source/ui/dbgui/dpuiglobal.hxx
index 9312e07..8b5c743 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 5faad71..a9f0ab3 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 11f6bc4..530776c 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 77c6b66..0b1fb85 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 f732e6c..3416243 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);
More information about the Libreoffice-commits
mailing list