summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-12-12 19:05:31 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-12-14 01:12:41 -0500
commit1360b28b477f980a2c58659ffc298d0dd2cda20b (patch)
tree446e6c4aba4f8414687ebd884ea98ab983e475f4 /sc/inc
parent34b7826f9814b09dcd6aba15552bef1c330f3db2 (diff)
bnc#791706: Support multiple selection in page fields.
This change allows selecting multiple items in page field popups in pivot table. Change-Id: I692e13c0815211bac6da47fefd83bba18c901c5c
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/attrib.hxx4
-rw-r--r--sc/inc/dpoutputgeometry.hxx7
-rw-r--r--sc/inc/dpsave.hxx2
-rw-r--r--sc/inc/fillinfo.hxx14
-rw-r--r--sc/inc/miscuno.hxx9
-rw-r--r--sc/inc/sc.hrc1
6 files changed, 25 insertions, 12 deletions
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 5706b273afe0..9b12f085955a 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -94,10 +94,12 @@ public:
bool IsOverlapped() const { return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; }
bool HasAutoFilter() const { return ( GetValue() & SC_MF_AUTO ) != 0; }
- bool HasButton() const { return ( GetValue() & SC_MF_BUTTON ) != 0; }
bool HasDPTable() const { return ( GetValue() & SC_MF_DP_TABLE ) != 0; }
bool IsScenario() const { return ( GetValue() & SC_MF_SCENARIO ) != 0; }
+
+ bool HasPivotButton() const;
+ bool HasPivotPopupButton() const;
};
//------------------------------------------------------------------------
diff --git a/sc/inc/dpoutputgeometry.hxx b/sc/inc/dpoutputgeometry.hxx
index 4cc254a4081a..e275cd87d947 100644
--- a/sc/inc/dpoutputgeometry.hxx
+++ b/sc/inc/dpoutputgeometry.hxx
@@ -28,7 +28,7 @@ class ScAddress;
class SC_DLLPUBLIC ScDPOutputGeometry
{
public:
- enum FieldType { Column, Row, Page, Data, None };
+ enum FieldType { Column = 0, Row, Page, Data, None };
ScDPOutputGeometry(const ScRange& rOutRange, bool bShowFilter);
~ScDPOutputGeometry();
@@ -40,6 +40,7 @@ public:
void setColumnFieldCount(sal_uInt32 nCount);
void setPageFieldCount(sal_uInt32 nCount);
void setDataFieldCount(sal_uInt32 nCount);
+ void setDataLayoutType(FieldType eType);
void getColumnFieldPositions(::std::vector<ScAddress>& rAddrs) const;
void getRowFieldPositions(::std::vector<ScAddress>& rAddrs) const;
@@ -52,13 +53,15 @@ public:
private:
ScDPOutputGeometry(); // disabled
+ void adjustFieldsForDataLayout(sal_uInt32& rColumnFields, sal_uInt32& rRowFields) const;
+
private:
ScRange maOutRange;
sal_uInt32 mnRowFields; /// number of row fields
sal_uInt32 mnColumnFields;
sal_uInt32 mnPageFields;
sal_uInt32 mnDataFields;
-
+ FieldType meDataLayoutType;
bool mbShowFilter;
};
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index 948117b90180..5bca23b4d939 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -197,8 +197,6 @@ public:
void SetLayoutInfo(const ::com::sun::star::sheet::DataPilotFieldLayoutInfo* pNew);
void SetCurrentPage( const ::rtl::OUString* pPage ); // NULL = no selection (all)
- bool HasCurrentPage() const;
- const ::rtl::OUString& GetCurrentPage() const;
sal_uInt16 GetOrientation() const
{ return nOrientation; }
diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx
index 458953d80caf..23d0f9b94d34 100644
--- a/sc/inc/fillinfo.hxx
+++ b/sc/inc/fillinfo.hxx
@@ -123,8 +123,8 @@ struct CellInfo
sal_Bool bHOverlapped : 1;
sal_Bool bVOverlapped : 1;
sal_Bool bAutoFilter : 1;
- sal_Bool bPushButton : 1;
- bool bPopupButton: 1;
+ bool bPivotButton:1;
+ bool bPivotPopupButton:1;
bool bFilterActive:1;
sal_Bool bPrinted : 1; // when required (pagebreak mode)
@@ -155,11 +155,11 @@ struct RowInfo
SCROW nRowNo;
SCCOL nRotMaxCol; // SC_ROTMAX_NONE, if nothing
- sal_Bool bEmptyBack;
- sal_Bool bEmptyText;
- sal_Bool bAutoFilter;
- sal_Bool bPushButton;
- sal_Bool bChanged; // TRUE, if not tested
+ bool bEmptyBack:1;
+ bool bEmptyText:1;
+ bool bAutoFilter:1;
+ bool bPivotButton:1;
+ bool bChanged:1; // TRUE, if not tested
inline explicit RowInfo() : pCellInfo( 0 ) {}
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index de953af08cc7..646d2613d294 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -188,6 +188,15 @@ public:
any <<= rVal;
SetOptionalPropertyValue(rPropSet, pPropName, any);
}
+
+ template<typename ValueType>
+ static com::sun::star::uno::Sequence<ValueType> VectorToSequence( const std::vector<ValueType>& rVector )
+ {
+ if (rVector.empty())
+ return com::sun::star::uno::Sequence<ValueType>();
+
+ return com::sun::star::uno::Sequence<ValueType>(&rVector[0], static_cast<sal_Int32>(rVector.size()));
+ }
};
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 19ad415e129a..2849c9fd53e9 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -755,6 +755,7 @@
#define SCSTR_COLUMN_USER (STR_START + 60)
#define SCSTR_FIELDSEP (STR_START + 61)
#define SCSTR_TEXTSEP (STR_START + 62)
+#define SCSTR_MULTIPLE (STR_START + 63)
#define SCSTR_CFG_INPUT (STR_START + 65)