summaryrefslogtreecommitdiff
path: root/sc/inc/dpobject.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/inc/dpobject.hxx')
-rw-r--r--sc/inc/dpobject.hxx42
1 files changed, 32 insertions, 10 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 2dc8829485c8..ef7a2c491c50 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -36,8 +36,11 @@
#include "address.hxx"
#include "collect.hxx"
#include "dpoutput.hxx"
+#include "pivot.hxx"
#include <com/sun/star/sheet/XDimensionsSupplier.hpp>
+#include <boost/shared_ptr.hpp>
+
//------------------------------------------------------------------
namespace com { namespace sun { namespace star { namespace sheet {
@@ -64,6 +67,7 @@ class ScStrCollection;
class TypedScStrCollection;
struct PivotField;
class ScDPCacheTable;
+class ScDPTableData;
struct ScDPServiceDesc
{
@@ -99,15 +103,19 @@ private:
ScSheetSourceDesc* pSheetDesc; // for sheet data
ScImportSourceDesc* pImpDesc; // for database data
ScDPServiceDesc* pServDesc; // for external service
+ ::boost::shared_ptr<ScDPTableData> mpTableData;
// cached data
com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier> xSource;
ScDPOutput* pOutput;
BOOL bSettingsChanged;
BOOL bAlive; // FALSE if only used to hold settings
+ sal_uInt16 mnAutoFormatIndex;
BOOL bAllowMove;
long nHeaderRows; // page fields plus filter button
+ bool mbHeaderLayout; // TRUE : grid, FALSE : standard
+ SC_DLLPRIVATE ScDPTableData* GetTableData();
SC_DLLPRIVATE void CreateObjects();
SC_DLLPRIVATE void CreateOutput();
@@ -135,6 +143,12 @@ public:
void SetOutRange(const ScRange& rRange);
const ScRange& GetOutRange() const { return aOutRange; }
+ void SetAutoFormatIndex (const sal_uInt16 nIndex);
+ sal_uInt16 GetAutoFormatIndex() const;
+
+ void SetHeaderLayout(bool bUseGrid);
+ bool GetHeaderLayout() const;
+
void SetSheetDesc(const ScSheetSourceDesc& rDesc);
void SetImportDesc(const ScImportSourceDesc& rDesc);
void SetServiceData(const ScDPServiceDesc& rDesc);
@@ -157,7 +171,14 @@ public:
void SetTag(const String& rNew);
const String& GetTag() const { return aTableTag; }
- BOOL IsDimNameInUse( const String& rName ) const;
+ /**
+ * Data description cell displays the description of a data dimension if
+ * and only if there is only one data dimension. It's usually located at
+ * the upper-left corner of the table output.
+ */
+ bool IsDataDescriptionCell(const ScAddress& rPos);
+
+ bool IsDimNameInUse(const ::rtl::OUString& rName) const;
String GetDimName( long nDim, BOOL& rIsDataLayout );
BOOL IsDuplicated( long nDim );
long GetDimCount();
@@ -190,16 +211,10 @@ public:
sal_Int32 GetUsedHierarchy( sal_Int32 nDim );
BOOL GetMembersNA( sal_Int32 nDim, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xMembers );
- BOOL GetMembers( sal_Int32 nDim,
- com::sun::star::uno::Sequence< rtl::OUString >& rMembers,
- com::sun::star::uno::Sequence< sal_Bool >* pVisible = 0,
- com::sun::star::uno::Sequence< sal_Bool >* pShowDet = 0 );
-
BOOL GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xMembers );
- BOOL GetMembers( sal_Int32 nDim, sal_Int32 nHier,
- com::sun::star::uno::Sequence< rtl::OUString >& rMembers,
- com::sun::star::uno::Sequence< sal_Bool >* pVisible = 0,
- com::sun::star::uno::Sequence< sal_Bool >* pShowDet = 0 );
+
+ bool GetMemberNames( sal_Int32 nDim, ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames );
+ bool GetMembers( sal_Int32 nDim, sal_Int32 nHier, ::std::vector<ScDPLabelData::Member>& rMembers );
void UpdateReference( UpdateRefMode eUpdateRefMode,
const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
@@ -221,6 +236,8 @@ public:
// (button attribute must be present)
void RefreshAfterLoad();
+ void BuildAllDimensionMembers();
+
static BOOL HasRegisteredSources();
static com::sun::star::uno::Sequence<rtl::OUString> GetRegisteredSources();
static com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier>
@@ -291,6 +308,11 @@ public:
ScSimpleSharedString& GetSharedString();
+ void FreeTable(ScDPObject* pDPObj);
+ SC_DLLPUBLIC bool InsertNewTable(ScDPObject* pDPObj);
+
+ bool HasDPTable(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
+
ScDPCacheCell* getCacheCellFromPool(const ScDPCacheCell& rCell);
void clearCacheCellPool();
};