[Libreoffice-commits] .: 8 commits - sc/inc sc/Library_sc.mk sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Feb 9 12:28:57 PST 2012
sc/Library_sc.mk | 2
sc/inc/dpglobal.hxx | 135 ----------------
sc/inc/dpitemdata.hxx | 123 +++++++++++++++
sc/inc/dptablecache.hxx | 2
sc/inc/dptabsrc.hxx | 13 -
sc/inc/unonames.hxx | 83 +++++-----
sc/source/core/data/dpglobal.cxx | 99 ------------
sc/source/core/data/dpitemdata.cxx | 285 +++++++++++++++++++++++++++++++++++
sc/source/core/data/dpobject.cxx | 109 ++++---------
sc/source/core/data/dpoutput.cxx | 58 +++----
sc/source/core/data/dpsave.cxx | 52 +++---
sc/source/core/data/dptablecache.cxx | 207 +------------------------
sc/source/core/data/dptabres.cxx | 26 +--
sc/source/core/data/dptabsrc.cxx | 176 ++++++++++-----------
sc/source/ui/dbgui/pvlaydlg.cxx | 4
sc/source/ui/unoobj/dapiuno.cxx | 90 +++++------
sc/source/ui/vba/vbaformat.cxx | 10 -
sc/source/ui/view/dbfunc3.cxx | 2
18 files changed, 714 insertions(+), 762 deletions(-)
New commits:
commit 81f80beb8c481b247f44a088a456edf07575a785
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Thu Feb 9 15:23:53 2012 -0500
Really cleaned up dpglobal.hxx.
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 33595dc..75043f7 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -105,7 +105,6 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/data/document \
sc/source/core/data/dpcachetable \
sc/source/core/data/dpdimsave \
- sc/source/core/data/dpglobal \
sc/source/core/data/dpgroup \
sc/source/core/data/dpitemdata \
sc/source/core/data/dpobject \
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index c2cbc45..021369b 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -30,29 +30,6 @@
#ifndef _SC_DPGLOBAL_HXX
#define _SC_DPGLOBAL_HXX
-#include <algorithm>
-#include <list>
-#include <tools/gen.hxx>
-#include <global.hxx>
-
-#include <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/sheet/XDimensionsSupplier.hpp>
-
-#include <com/sun/star/sheet/DataPilotFieldFilter.hpp>
-#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
-#include <com/sun/star/sheet/DataPilotTableHeaderData.hpp>
-#include <com/sun/star/sheet/DataPilotTablePositionData.hpp>
-#include <com/sun/star/sheet/DataPilotTablePositionType.hpp>
-#include <com/sun/star/sheet/DataPilotTableResultData.hpp>
-#include <com/sun/star/sheet/DataResultFlags.hpp>
-#include <com/sun/star/sheet/GeneralFunction.hpp>
-#include <com/sun/star/sheet/MemberResultFlags.hpp>
-#include <com/sun/star/sheet/TableFilterField.hpp>
-#include <com/sun/star/sheet/XDataPilotMemberResults.hpp>
-#include <com/sun/star/sheet/XDataPilotResults.hpp>
-#include <com/sun/star/sheet/XHierarchiesSupplier.hpp>
-#include <com/sun/star/sheet/XLevelsSupplier.hpp>
-
#define SC_DP_MAX_FIELDS 256
#define PIVOT_MAXFUNC 11
@@ -70,11 +47,6 @@
#define PIVOT_FUNC_STD_VARP 0x0400
#define PIVOT_FUNC_AUTO 0x1000
-namespace ScDPGlobal
-{
-// common operation
- Rectangle operator *( const Rectangle &rLeft, const std::pair<double,double> & rRight );
-}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpglobal.cxx b/sc/source/core/data/dpglobal.cxx
deleted file mode 100644
index e90ffc4..0000000
--- a/sc/source/core/data/dpglobal.cxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2009.
- * Copyright 2009 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include "dpglobal.hxx"
-
-namespace ScDPGlobal
-{
- Rectangle operator *( const Rectangle &rLeft, const std::pair<double,double> & rRight )
- {
- Rectangle rcResult( rLeft );
- rcResult.Bottom() = rcResult.Top() + static_cast<long>( rcResult.GetHeight() * rRight.second );
- rcResult.Right() = rcResult.Left() + static_cast<long>( rcResult.GetWidth() * rRight.first);
- return rcResult;
- }
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index f588ab2..5bbf53a 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -57,6 +57,14 @@
#include "stringutil.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/sheet/DataPilotTableHeaderData.hpp>
+#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
+#include <com/sun/star/sheet/DataPilotTablePositionData.hpp>
+#include <com/sun/star/sheet/DataPilotTableResultData.hpp>
+#include <com/sun/star/sheet/MemberResultFlags.hpp>
+#include <com/sun/star/sheet/TableFilterField.hpp>
+#include <com/sun/star/sheet/DataResultFlags.hpp>
+#include <com/sun/star/sheet/DataPilotTablePositionType.hpp>
#include <vector>
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index baff6af..b9b1b71 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -53,15 +53,15 @@
#include <com/sun/star/util/XCloneable.hpp>
#include "dptabsrc.hxx"
#include "dpglobal.hxx"
-using namespace ScDPGlobal;
+
#include <com/sun/star/sheet/DataPilotFieldReferenceType.hpp>
#include <com/sun/star/sheet/DataPilotFieldReferenceItemType.hpp>
-using namespace com::sun::star::sheet;
#include <boost/unordered_map.hpp>
#include <boost/unordered_set.hpp>
using namespace com::sun::star;
+using namespace com::sun::star::sheet;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
using ::rtl::OUString;
commit 2bf0fd735210b961d15f5bccede1bef926b5d824
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Thu Feb 9 15:12:49 2012 -0500
Moved ScDPItemData into own files.
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index cf4bb6b..33595dc 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -107,6 +107,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/data/dpdimsave \
sc/source/core/data/dpglobal \
sc/source/core/data/dpgroup \
+ sc/source/core/data/dpitemdata \
sc/source/core/data/dpobject \
sc/source/core/data/dpoutput \
sc/source/core/data/dpoutputgeometry \
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index 992e171..c2cbc45 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -32,7 +32,6 @@
#include <algorithm>
#include <list>
-#include <vector>
#include <tools/gen.hxx>
#include <global.hxx>
@@ -71,83 +70,6 @@
#define PIVOT_FUNC_STD_VARP 0x0400
#define PIVOT_FUNC_AUTO 0x1000
-class SC_DLLPUBLIC ScDPItemData
-{
-public:
- enum {
- MK_VAL = 0x01,
- MK_DATA = 0x02,
- MK_ERR = 0x04,
- MK_DATE = 0x08,
- MK_DATEPART = 0x10
- };
-
- static bool isDate( sal_uLong nNumType );
-
-private:
- union
- {
- sal_uLong mnNumFormat;
- sal_Int32 mnDatePart;
- };
-
- String maString;
- double mfValue;
- sal_uInt8 mbFlag;
-
- friend class ScDPCache;
-public:
- ScDPItemData();
- ScDPItemData(sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF);
- ScDPItemData(const String& rS, double fV = 0.0, bool bHV = false, const sal_uLong nNumFormat = 0 , bool bData = true);
- ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel);
-
- void SetString( const String& rS );
- bool IsCaseInsEqual(const ScDPItemData& r) const;
-
- size_t Hash() const;
-
- // exact equality
- bool operator==( const ScDPItemData& r ) const;
- // case insensitive equality
- static sal_Int32 Compare( const ScDPItemData& rA, const ScDPItemData& rB );
-
-public:
- bool IsHasData() const ;
- bool IsHasErr() const ;
- bool IsValue() const;
- String GetString() const ;
- double GetValue() const ;
- bool HasStringData() const ;
- bool IsDate() const;
- bool HasDatePart() const;
- void SetDate( bool b ) ;
-
- sal_uInt8 GetType() const;
-};
-
-class SC_DLLPUBLIC ScDPItemDataPool
-{
-public:
- ScDPItemDataPool();
- ScDPItemDataPool(const ScDPItemDataPool& r);
-
- virtual ~ScDPItemDataPool();
- virtual const ScDPItemData* getData( sal_Int32 nId );
- virtual sal_Int32 getDataId( const ScDPItemData& aData );
- virtual sal_Int32 insertData( const ScDPItemData& aData );
-protected:
- struct DataHashFunc : public std::unary_function< const ScDPItemData &, size_t >
- {
- size_t operator() (const ScDPItemData &rData) const { return rData.Hash(); }
- };
-
- typedef ::boost::unordered_multimap< ScDPItemData, sal_Int32, DataHashFunc > DataHash;
-
- ::std::vector< ScDPItemData > maItems;
- DataHash maItemIds;
-};
-
namespace ScDPGlobal
{
// common operation
diff --git a/sc/inc/dpitemdata.hxx b/sc/inc/dpitemdata.hxx
new file mode 100644
index 0000000..97a2fbb
--- /dev/null
+++ b/sc/inc/dpitemdata.hxx
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Kohei Yoshida <kohei.yoshida at suse.com>
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef __SC_DPITEMDATA_HXX__
+#define __SC_DPITEMDATA_HXX__
+
+#include "scdllapi.h"
+#include "sal/types.h"
+#include "tools/solar.h"
+#include "tools/string.hxx"
+#include "address.hxx"
+
+#include <vector>
+
+#include <boost/unordered_map.hpp>
+
+class ScDocument;
+
+class SC_DLLPUBLIC ScDPItemData
+{
+public:
+ enum {
+ MK_VAL = 0x01,
+ MK_DATA = 0x02,
+ MK_ERR = 0x04,
+ MK_DATE = 0x08,
+ MK_DATEPART = 0x10
+ };
+
+ static bool isDate( sal_uLong nNumType );
+
+private:
+ union
+ {
+ sal_uLong mnNumFormat;
+ sal_Int32 mnDatePart;
+ };
+
+ String maString;
+ double mfValue;
+ sal_uInt8 mbFlag;
+
+ friend class ScDPCache;
+public:
+ ScDPItemData();
+ ScDPItemData(sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF);
+ ScDPItemData(const String& rS, double fV = 0.0, bool bHV = false, const sal_uLong nNumFormat = 0 , bool bData = true);
+ ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel);
+
+ void SetString( const String& rS );
+ bool IsCaseInsEqual(const ScDPItemData& r) const;
+
+ size_t Hash() const;
+
+ // exact equality
+ bool operator==( const ScDPItemData& r ) const;
+ // case insensitive equality
+ static sal_Int32 Compare( const ScDPItemData& rA, const ScDPItemData& rB );
+
+public:
+ bool IsHasData() const ;
+ bool IsHasErr() const ;
+ bool IsValue() const;
+ String GetString() const ;
+ double GetValue() const ;
+ bool HasStringData() const ;
+ bool IsDate() const;
+ bool HasDatePart() const;
+ void SetDate( bool b ) ;
+
+ sal_uInt8 GetType() const;
+};
+
+class SC_DLLPUBLIC ScDPItemDataPool
+{
+public:
+ ScDPItemDataPool();
+ ScDPItemDataPool(const ScDPItemDataPool& r);
+
+ virtual ~ScDPItemDataPool();
+ virtual const ScDPItemData* getData( sal_Int32 nId );
+ virtual sal_Int32 getDataId( const ScDPItemData& aData );
+ virtual sal_Int32 insertData( const ScDPItemData& aData );
+protected:
+ struct DataHashFunc : public std::unary_function< const ScDPItemData &, size_t >
+ {
+ size_t operator() (const ScDPItemData &rData) const { return rData.Hash(); }
+ };
+
+ typedef ::boost::unordered_multimap< ScDPItemData, sal_Int32, DataHashFunc > DataHash;
+
+ ::std::vector< ScDPItemData > maItems;
+ DataHash maItemIds;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx
index 436aa91..3238405 100644
--- a/sc/inc/dptablecache.hxx
+++ b/sc/inc/dptablecache.hxx
@@ -32,6 +32,7 @@
#include "global.hxx"
#include <svl/zforlist.hxx>
#include "dpglobal.hxx"
+#include "dpitemdata.hxx"
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
diff --git a/sc/source/core/data/dpglobal.cxx b/sc/source/core/data/dpglobal.cxx
index cb210b1..e90ffc4 100644
--- a/sc/source/core/data/dpglobal.cxx
+++ b/sc/source/core/data/dpglobal.cxx
@@ -29,209 +29,6 @@
#include "dpglobal.hxx"
-#include "document.hxx"
-#include "dpobject.hxx"
-#include "cell.hxx"
-#include "globstr.hrc"
-#include "dptabdat.hxx"
-
-bool ScDPItemData::isDate( sal_uLong nNumType )
-{
- return ((nNumType & NUMBERFORMAT_DATE) != 0) ? 1 : 0;
-}
-
-ScDPItemData::ScDPItemData() :
- mnNumFormat( 0 ), mfValue(0.0), mbFlag(0) {}
-
-ScDPItemData::ScDPItemData(sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF) :
- mnNumFormat(nNF), maString(rS), mfValue(fV), mbFlag(bF) {}
-
-ScDPItemData::ScDPItemData(const String& rS, double fV, bool bHV, const sal_uLong nNumFormatP, bool bData) :
- mnNumFormat( nNumFormatP ), maString(rS), mfValue(fV),
- mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!false) | (MK_DATE*!!isDate( mnNumFormat ) ) )
-{
-}
-
-ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel) :
- mnNumFormat( 0 ), mfValue(0.0), mbFlag( 0 )
-{
- String aDocStr;
- pDoc->GetString( nCol, nRow, nDocTab, aDocStr );
-
- SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
-
- ScAddress aPos( nCol, nRow, nDocTab );
- ScBaseCell* pCell = pDoc->GetCell( aPos );
-
- if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->GetErrCode() )
- {
- SetString ( aDocStr );
- mbFlag |= MK_ERR;
- }
- else if ( pDoc->HasValueData( nCol, nRow, nDocTab ) )
- {
- double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nDocTab));
- sal_uLong nFormat = NUMBERFORMAT_NUMBER;
- if ( pFormatter )
- nFormat = pFormatter->GetType( pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ) );
- maString = aDocStr;
- mfValue = fVal;
- mbFlag |= MK_VAL|MK_DATA;
- mnNumFormat = pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) );
- isDate( nFormat ) ? ( mbFlag |= MK_DATE ) : (mbFlag &= ~MK_DATE);
- }
- else if (bLabel || pDoc->HasData(nCol, nRow, nDocTab))
- {
- if (bLabel && !aDocStr.Len())
- {
- // Replace an empty label string with column name.
- rtl::OUStringBuffer aBuf;
- aBuf.append(ScGlobal::GetRscString(STR_COLUMN));
- aBuf.append(sal_Unicode(' '));
-
- ScAddress aColAddr(nCol, 0, 0);
- rtl::OUString aColStr;
- aColAddr.Format(aColStr, SCA_VALID_COL, NULL);
- aBuf.append(aColStr);
- aDocStr = aBuf.makeStringAndClear();
- }
-
- SetString(aDocStr);
- }
-}
-
-void ScDPItemData::SetString( const String& rS )
-{
- maString = rS;
- mbFlag &= ~(MK_VAL|MK_DATE);
- mnNumFormat = 0;
- mbFlag |= MK_DATA;
-}
-
-bool ScDPItemData::IsCaseInsEqual( const ScDPItemData& r ) const
-{
- //! pass Transliteration?
- //! inline?
- return IsValue() ? ( r.IsValue() && rtl::math::approxEqual( mfValue, r.mfValue ) ) :
- ( !r.IsValue() &&
- ScGlobal::GetpTransliteration()->isEqual( maString, r.maString ) );
-}
-
-size_t ScDPItemData::Hash() const
-{
- if ( IsValue() )
- return (size_t) rtl::math::approxFloor( mfValue );
- else
- // If we do unicode safe case insensitive hash we can drop
- // ScDPItemData::operator== and use ::IsCasInsEqual
- return rtl_ustr_hashCode_WithLength( maString.GetBuffer(), maString.Len() );
-}
-
-bool ScDPItemData::operator==( const ScDPItemData& r ) const
-{
- if ( IsValue() )
- {
- if( (HasDatePart() != r.HasDatePart()) || (HasDatePart() && mnDatePart != r.mnDatePart) )
- return false;
-
- if ( IsDate() != r.IsDate() )
- return false;
- else if ( r.IsValue() )
- return rtl::math::approxEqual( mfValue, r.mfValue );
- else
- return false;
- }
- else if ( r.IsValue() )
- return false;
- else
- // need exact equality until we have a safe case insensitive string hash
- return maString == r.maString;
-}
-
-sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA,
- const ScDPItemData& rB )
-{
- if ( rA.IsValue() )
- {
- if ( rB.IsValue() )
- {
- if ( rtl::math::approxEqual( rA.mfValue, rB.mfValue ) )
- {
- if ( rA.IsDate() == rB.IsDate() )
- return 0;
- else
- return rA.IsDate() ? 1: -1;
- }
- else if ( rA.mfValue < rB.mfValue )
- return -1;
- else
- return 1;
- }
- else
- return -1; // values first
- }
- else if ( rB.IsValue() )
- return 1; // values first
- else
- return ScGlobal::GetCollator()->compareString( rA.maString, rB.maString );
-}
-
-sal_uInt8 ScDPItemData::GetType() const
-{
- if ( IsHasErr() )
- return SC_VALTYPE_ERROR;
- else if ( !IsHasData() )
- return SC_VALTYPE_EMPTY;
- else if ( IsValue())
- return SC_VALTYPE_VALUE;
- else
- return SC_VALTYPE_STRING;
-}
-
-bool ScDPItemData::IsHasData() const
-{
- return !!(mbFlag&MK_DATA);
-}
-
-bool ScDPItemData::IsHasErr() const
-{
- return !!(mbFlag&MK_ERR);
-}
-
-bool ScDPItemData::IsValue() const
-{
- return !!(mbFlag&MK_VAL);
-}
-
-String ScDPItemData::GetString() const
-{
- return maString;
-}
-
-double ScDPItemData::GetValue() const
-{
- return mfValue;
-}
-
-bool ScDPItemData::HasStringData() const
-{
- return IsHasData()&&!IsHasErr()&&!IsValue();
-}
-
-bool ScDPItemData::IsDate() const
-{
- return !!(mbFlag&MK_DATE);
-}
-
-bool ScDPItemData::HasDatePart() const
-{
- return !!(mbFlag&MK_DATEPART);
-}
-
-void ScDPItemData::SetDate( bool b )
-{
- b ? ( mbFlag |= MK_DATE ) : ( mbFlag &= ~MK_DATE );
-}
namespace ScDPGlobal
{
@@ -245,54 +42,4 @@ namespace ScDPGlobal
}
-ScDPItemDataPool::ScDPItemDataPool()
-{
-}
-
-ScDPItemDataPool::ScDPItemDataPool(const ScDPItemDataPool& r):
- maItems(r.maItems),
- maItemIds(r.maItemIds)
-{
-}
-
-ScDPItemDataPool::~ScDPItemDataPool()
-{
-}
-
-
-const ScDPItemData* ScDPItemDataPool::getData( sal_Int32 nId )
-{
- if ( nId >= static_cast<sal_Int32>(maItems.size()) )
- return NULL;
- else
- return &(maItems[nId]);
-}
-
-sal_Int32 ScDPItemDataPool::getDataId( const ScDPItemData& aData )
-{
- DataHash::const_iterator itr = maItemIds.find( aData),
- itrEnd = maItemIds.end();
- if ( itr == itrEnd )
- // not exist
- return -1;
-
- else //exist
- return itr->second;
-
-}
-
-sal_Int32 ScDPItemDataPool::insertData( const ScDPItemData& aData )
-{
- sal_Int32 nResult = getDataId( aData );
-
- if( nResult < 0 )
- {
- maItemIds.insert( DataHash::value_type( aData, nResult = maItems.size() ) );
- maItems.push_back( aData );
- }
-
- return nResult;
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx
new file mode 100644
index 0000000..6a06cae
--- /dev/null
+++ b/sc/source/core/data/dpitemdata.cxx
@@ -0,0 +1,285 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Kohei Yoshida <kohei.yoshida at suse.com>
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include "dpitemdata.hxx"
+
+#include "document.hxx"
+#include "dpobject.hxx"
+#include "cell.hxx"
+#include "globstr.hrc"
+#include "dptabdat.hxx"
+
+bool ScDPItemData::isDate( sal_uLong nNumType )
+{
+ return ((nNumType & NUMBERFORMAT_DATE) != 0) ? 1 : 0;
+}
+
+ScDPItemData::ScDPItemData() :
+ mnNumFormat( 0 ), mfValue(0.0), mbFlag(0) {}
+
+ScDPItemData::ScDPItemData(sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF) :
+ mnNumFormat(nNF), maString(rS), mfValue(fV), mbFlag(bF) {}
+
+ScDPItemData::ScDPItemData(const String& rS, double fV, bool bHV, const sal_uLong nNumFormatP, bool bData) :
+ mnNumFormat( nNumFormatP ), maString(rS), mfValue(fV),
+ mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!false) | (MK_DATE*!!isDate( mnNumFormat ) ) )
+{
+}
+
+ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel) :
+ mnNumFormat( 0 ), mfValue(0.0), mbFlag( 0 )
+{
+ String aDocStr;
+ pDoc->GetString( nCol, nRow, nDocTab, aDocStr );
+
+ SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
+
+ ScAddress aPos( nCol, nRow, nDocTab );
+ ScBaseCell* pCell = pDoc->GetCell( aPos );
+
+ if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->GetErrCode() )
+ {
+ SetString ( aDocStr );
+ mbFlag |= MK_ERR;
+ }
+ else if ( pDoc->HasValueData( nCol, nRow, nDocTab ) )
+ {
+ double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nDocTab));
+ sal_uLong nFormat = NUMBERFORMAT_NUMBER;
+ if ( pFormatter )
+ nFormat = pFormatter->GetType( pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ) );
+ maString = aDocStr;
+ mfValue = fVal;
+ mbFlag |= MK_VAL|MK_DATA;
+ mnNumFormat = pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) );
+ isDate( nFormat ) ? ( mbFlag |= MK_DATE ) : (mbFlag &= ~MK_DATE);
+ }
+ else if (bLabel || pDoc->HasData(nCol, nRow, nDocTab))
+ {
+ if (bLabel && !aDocStr.Len())
+ {
+ // Replace an empty label string with column name.
+ rtl::OUStringBuffer aBuf;
+ aBuf.append(ScGlobal::GetRscString(STR_COLUMN));
+ aBuf.append(sal_Unicode(' '));
+
+ ScAddress aColAddr(nCol, 0, 0);
+ rtl::OUString aColStr;
+ aColAddr.Format(aColStr, SCA_VALID_COL, NULL);
+ aBuf.append(aColStr);
+ aDocStr = aBuf.makeStringAndClear();
+ }
+
+ SetString(aDocStr);
+ }
+}
+
+void ScDPItemData::SetString( const String& rS )
+{
+ maString = rS;
+ mbFlag &= ~(MK_VAL|MK_DATE);
+ mnNumFormat = 0;
+ mbFlag |= MK_DATA;
+}
+
+bool ScDPItemData::IsCaseInsEqual( const ScDPItemData& r ) const
+{
+ //! pass Transliteration?
+ //! inline?
+ return IsValue() ? ( r.IsValue() && rtl::math::approxEqual( mfValue, r.mfValue ) ) :
+ ( !r.IsValue() &&
+ ScGlobal::GetpTransliteration()->isEqual( maString, r.maString ) );
+}
+
+size_t ScDPItemData::Hash() const
+{
+ if ( IsValue() )
+ return (size_t) rtl::math::approxFloor( mfValue );
+ else
+ // If we do unicode safe case insensitive hash we can drop
+ // ScDPItemData::operator== and use ::IsCasInsEqual
+ return rtl_ustr_hashCode_WithLength( maString.GetBuffer(), maString.Len() );
+}
+
+bool ScDPItemData::operator==( const ScDPItemData& r ) const
+{
+ if ( IsValue() )
+ {
+ if( (HasDatePart() != r.HasDatePart()) || (HasDatePart() && mnDatePart != r.mnDatePart) )
+ return false;
+
+ if ( IsDate() != r.IsDate() )
+ return false;
+ else if ( r.IsValue() )
+ return rtl::math::approxEqual( mfValue, r.mfValue );
+ else
+ return false;
+ }
+ else if ( r.IsValue() )
+ return false;
+ else
+ // need exact equality until we have a safe case insensitive string hash
+ return maString == r.maString;
+}
+
+sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA,
+ const ScDPItemData& rB )
+{
+ if ( rA.IsValue() )
+ {
+ if ( rB.IsValue() )
+ {
+ if ( rtl::math::approxEqual( rA.mfValue, rB.mfValue ) )
+ {
+ if ( rA.IsDate() == rB.IsDate() )
+ return 0;
+ else
+ return rA.IsDate() ? 1: -1;
+ }
+ else if ( rA.mfValue < rB.mfValue )
+ return -1;
+ else
+ return 1;
+ }
+ else
+ return -1; // values first
+ }
+ else if ( rB.IsValue() )
+ return 1; // values first
+ else
+ return ScGlobal::GetCollator()->compareString( rA.maString, rB.maString );
+}
+
+sal_uInt8 ScDPItemData::GetType() const
+{
+ if ( IsHasErr() )
+ return SC_VALTYPE_ERROR;
+ else if ( !IsHasData() )
+ return SC_VALTYPE_EMPTY;
+ else if ( IsValue())
+ return SC_VALTYPE_VALUE;
+ else
+ return SC_VALTYPE_STRING;
+}
+
+bool ScDPItemData::IsHasData() const
+{
+ return !!(mbFlag&MK_DATA);
+}
+
+bool ScDPItemData::IsHasErr() const
+{
+ return !!(mbFlag&MK_ERR);
+}
+
+bool ScDPItemData::IsValue() const
+{
+ return !!(mbFlag&MK_VAL);
+}
+
+String ScDPItemData::GetString() const
+{
+ return maString;
+}
+
+double ScDPItemData::GetValue() const
+{
+ return mfValue;
+}
+
+bool ScDPItemData::HasStringData() const
+{
+ return IsHasData()&&!IsHasErr()&&!IsValue();
+}
+
+bool ScDPItemData::IsDate() const
+{
+ return !!(mbFlag&MK_DATE);
+}
+
+bool ScDPItemData::HasDatePart() const
+{
+ return !!(mbFlag&MK_DATEPART);
+}
+
+void ScDPItemData::SetDate( bool b )
+{
+ b ? ( mbFlag |= MK_DATE ) : ( mbFlag &= ~MK_DATE );
+}
+
+
+ScDPItemDataPool::ScDPItemDataPool()
+{
+}
+
+ScDPItemDataPool::ScDPItemDataPool(const ScDPItemDataPool& r):
+ maItems(r.maItems),
+ maItemIds(r.maItemIds)
+{
+}
+
+ScDPItemDataPool::~ScDPItemDataPool()
+{
+}
+
+
+const ScDPItemData* ScDPItemDataPool::getData( sal_Int32 nId )
+{
+ if ( nId >= static_cast<sal_Int32>(maItems.size()) )
+ return NULL;
+ else
+ return &(maItems[nId]);
+}
+
+sal_Int32 ScDPItemDataPool::getDataId( const ScDPItemData& aData )
+{
+ DataHash::const_iterator itr = maItemIds.find( aData),
+ itrEnd = maItemIds.end();
+ if ( itr == itrEnd )
+ // not exist
+ return -1;
+
+ else //exist
+ return itr->second;
+
+}
+
+sal_Int32 ScDPItemDataPool::insertData( const ScDPItemData& aData )
+{
+ sal_Int32 nResult = getDataId( aData );
+
+ if( nResult < 0 )
+ {
+ maItemIds.insert( DataHash::value_type( aData, nResult = maItems.size() ) );
+ maItems.push_back( aData );
+ }
+
+ return nResult;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit dc261fc0c4e7f4c29b142c53d4d4e65f8ff3a092
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Thu Feb 9 14:58:06 2012 -0500
Cleaning up ScDPItemData a bit...
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index b5ce019..992e171 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -87,37 +87,37 @@ public:
private:
union
{
- sal_uLong nNumFormat;
+ sal_uLong mnNumFormat;
sal_Int32 mnDatePart;
};
- String aString;
- double fValue;
+ String maString;
+ double mfValue;
sal_uInt8 mbFlag;
friend class ScDPCache;
public:
- ScDPItemData() : nNumFormat( 0 ), fValue(0.0), mbFlag( 0 ){}
- ScDPItemData( sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF ):nNumFormat(nNF), aString(rS), fValue(fV), mbFlag( bF ){}
- ScDPItemData( const String& rS, double fV = 0.0, bool bHV = false, const sal_uLong nNumFormat = 0 , bool bData = true) ;
+ ScDPItemData();
+ ScDPItemData(sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF);
+ ScDPItemData(const String& rS, double fV = 0.0, bool bHV = false, const sal_uLong nNumFormat = 0 , bool bData = true);
ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel);
- void SetString( const String& rS ) { aString = rS; mbFlag &= ~(MK_VAL|MK_DATE); nNumFormat = 0; mbFlag |= MK_DATA; }
- bool IsCaseInsEqual( const ScDPItemData& r ) const;
+ void SetString( const String& rS );
+ bool IsCaseInsEqual(const ScDPItemData& r) const;
- size_t Hash() const;
+ size_t Hash() const;
// exact equality
- bool operator==( const ScDPItemData& r ) const;
+ bool operator==( const ScDPItemData& r ) const;
// case insensitive equality
- static sal_Int32 Compare( const ScDPItemData& rA, const ScDPItemData& rB );
+ static sal_Int32 Compare( const ScDPItemData& rA, const ScDPItemData& rB );
public:
bool IsHasData() const ;
bool IsHasErr() const ;
bool IsValue() const;
- String GetString() const ;
- double GetValue() const ;
+ String GetString() const ;
+ double GetValue() const ;
bool HasStringData() const ;
bool IsDate() const;
bool HasDatePart() const;
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index c3b3031..8a57d70 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -60,7 +60,6 @@
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/implbase6.hxx>
-#include "dpglobal.hxx"
#include "dptabdat.hxx"
namespace com { namespace sun { namespace star {
diff --git a/sc/source/core/data/dpglobal.cxx b/sc/source/core/data/dpglobal.cxx
index 142c84f..cb210b1 100644
--- a/sc/source/core/data/dpglobal.cxx
+++ b/sc/source/core/data/dpglobal.cxx
@@ -40,14 +40,20 @@ bool ScDPItemData::isDate( sal_uLong nNumType )
return ((nNumType & NUMBERFORMAT_DATE) != 0) ? 1 : 0;
}
+ScDPItemData::ScDPItemData() :
+ mnNumFormat( 0 ), mfValue(0.0), mbFlag(0) {}
+
+ScDPItemData::ScDPItemData(sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF) :
+ mnNumFormat(nNF), maString(rS), mfValue(fV), mbFlag(bF) {}
+
ScDPItemData::ScDPItemData(const String& rS, double fV, bool bHV, const sal_uLong nNumFormatP, bool bData) :
- nNumFormat( nNumFormatP ), aString(rS), fValue(fV),
- mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!false) | (MK_DATE*!!isDate( nNumFormat ) ) )
+ mnNumFormat( nNumFormatP ), maString(rS), mfValue(fV),
+ mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!false) | (MK_DATE*!!isDate( mnNumFormat ) ) )
{
}
ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel) :
- nNumFormat( 0 ), fValue(0.0), mbFlag( 0 )
+ mnNumFormat( 0 ), mfValue(0.0), mbFlag( 0 )
{
String aDocStr;
pDoc->GetString( nCol, nRow, nDocTab, aDocStr );
@@ -68,10 +74,10 @@ ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocT
sal_uLong nFormat = NUMBERFORMAT_NUMBER;
if ( pFormatter )
nFormat = pFormatter->GetType( pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ) );
- aString = aDocStr;
- fValue = fVal;
+ maString = aDocStr;
+ mfValue = fVal;
mbFlag |= MK_VAL|MK_DATA;
- nNumFormat = pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) );
+ mnNumFormat = pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) );
isDate( nFormat ) ? ( mbFlag |= MK_DATE ) : (mbFlag &= ~MK_DATE);
}
else if (bLabel || pDoc->HasData(nCol, nRow, nDocTab))
@@ -94,23 +100,31 @@ ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocT
}
}
+void ScDPItemData::SetString( const String& rS )
+{
+ maString = rS;
+ mbFlag &= ~(MK_VAL|MK_DATE);
+ mnNumFormat = 0;
+ mbFlag |= MK_DATA;
+}
+
bool ScDPItemData::IsCaseInsEqual( const ScDPItemData& r ) const
{
//! pass Transliteration?
//! inline?
- return IsValue() ? ( r.IsValue() && rtl::math::approxEqual( fValue, r.fValue ) ) :
+ return IsValue() ? ( r.IsValue() && rtl::math::approxEqual( mfValue, r.mfValue ) ) :
( !r.IsValue() &&
- ScGlobal::GetpTransliteration()->isEqual( aString, r.aString ) );
+ ScGlobal::GetpTransliteration()->isEqual( maString, r.maString ) );
}
size_t ScDPItemData::Hash() const
{
if ( IsValue() )
- return (size_t) rtl::math::approxFloor( fValue );
+ return (size_t) rtl::math::approxFloor( mfValue );
else
// If we do unicode safe case insensitive hash we can drop
// ScDPItemData::operator== and use ::IsCasInsEqual
- return rtl_ustr_hashCode_WithLength( aString.GetBuffer(), aString.Len() );
+ return rtl_ustr_hashCode_WithLength( maString.GetBuffer(), maString.Len() );
}
bool ScDPItemData::operator==( const ScDPItemData& r ) const
@@ -123,7 +137,7 @@ bool ScDPItemData::operator==( const ScDPItemData& r ) const
if ( IsDate() != r.IsDate() )
return false;
else if ( r.IsValue() )
- return rtl::math::approxEqual( fValue, r.fValue );
+ return rtl::math::approxEqual( mfValue, r.mfValue );
else
return false;
}
@@ -131,7 +145,7 @@ bool ScDPItemData::operator==( const ScDPItemData& r ) const
return false;
else
// need exact equality until we have a safe case insensitive string hash
- return aString == r.aString;
+ return maString == r.maString;
}
sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA,
@@ -141,14 +155,14 @@ sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA,
{
if ( rB.IsValue() )
{
- if ( rtl::math::approxEqual( rA.fValue, rB.fValue ) )
+ if ( rtl::math::approxEqual( rA.mfValue, rB.mfValue ) )
{
if ( rA.IsDate() == rB.IsDate() )
return 0;
else
return rA.IsDate() ? 1: -1;
}
- else if ( rA.fValue < rB.fValue )
+ else if ( rA.mfValue < rB.mfValue )
return -1;
else
return 1;
@@ -159,7 +173,7 @@ sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA,
else if ( rB.IsValue() )
return 1; // values first
else
- return ScGlobal::GetCollator()->compareString( rA.aString, rB.aString );
+ return ScGlobal::GetCollator()->compareString( rA.maString, rB.maString );
}
sal_uInt8 ScDPItemData::GetType() const
@@ -191,12 +205,12 @@ bool ScDPItemData::IsValue() const
String ScDPItemData::GetString() const
{
- return aString;
+ return maString;
}
double ScDPItemData::GetValue() const
{
- return fValue;
+ return mfValue;
}
bool ScDPItemData::HasStringData() const
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index fc73fb0..e81d3a5 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -595,7 +595,7 @@ bool ScDPCache::AddData(long nDim, ScDPItemData* pData)
// Wrap this instance with scoped pointer to ensure proper deletion.
auto_ptr<ScDPItemData> p(pData);
- pData->SetDate(ScDPItemData::isDate(GetNumType(pData->nNumFormat)));
+ pData->SetDate(ScDPItemData::isDate(GetNumType(pData->mnNumFormat)));
SCROW nIndex = 0;
if (!hasItemInDimension(maTableDataValues[nDim], maGlobalOrder[nDim], *pData, nIndex))
@@ -628,7 +628,7 @@ String ScDPCache::GetDimensionName( sal_uInt16 nColumn ) const
if ( static_cast<size_t>(nColumn+1) < maLabelNames.size() )
{
- return maLabelNames[nColumn+1].aString;
+ return maLabelNames[nColumn+1].maString;
}
else
return String();
@@ -642,16 +642,16 @@ void ScDPCache::AddLabel(ScDPItemData *pData)
maLabelNames.push_back( new ScDPItemData(ScGlobal::GetRscString(STR_PIVOT_DATA)) );
//reset name if needed
- String strNewName = pData->aString;
+ String strNewName = pData->maString;
bool bFound = false;
long nIndex = 1;
do
{
for ( long i= maLabelNames.size()-1; i>=0; i-- )
{
- if( maLabelNames[i].aString == strNewName )
+ if( maLabelNames[i].maString == strNewName )
{
- strNewName = pData->aString;
+ strNewName = pData->maString;
strNewName += String::CreateFromInt32( nIndex );
nIndex ++ ;
bFound = true;
@@ -661,7 +661,7 @@ void ScDPCache::AddLabel(ScDPItemData *pData)
}
while ( !bFound );
- pData->aString = strNewName;
+ pData->maString = strNewName;
maLabelNames.push_back( pData );
}
@@ -732,7 +732,7 @@ sal_uLong ScDPCache::GetNumberFormat( long nDim ) const
nCount = 10;
for (size_t i = 0; i < nCount; ++i)
{
- sal_uLong n = maTableDataValues[nDim][i].nNumFormat;
+ sal_uLong n = maTableDataValues[nDim][i].mnNumFormat;
if (n)
return n;
}
commit 692496aa2e9acbb4b428cd395dbeb2ec8c8abc1e
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Thu Feb 9 14:41:25 2012 -0500
Moved definitions of ScDPItemData where they belong.
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index 090a7a7..b5ce019 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -81,6 +81,9 @@ public:
MK_DATE = 0x08,
MK_DATEPART = 0x10
};
+
+ static bool isDate( sal_uLong nNumType );
+
private:
union
{
@@ -90,7 +93,7 @@ private:
String aString;
double fValue;
- sal_uInt8 mbFlag;
+ sal_uInt8 mbFlag;
friend class ScDPCache;
public:
@@ -120,9 +123,7 @@ public:
bool HasDatePart() const;
void SetDate( bool b ) ;
- sal_uInt8 GetType() const;
- sal_uInt8 & GetFlag() throw() { return mbFlag; }
- const sal_uInt8 & GetFlag() const throw() { return const_cast<ScDPItemData*>(this)->GetFlag(); }
+ sal_uInt8 GetType() const;
};
class SC_DLLPUBLIC ScDPItemDataPool
diff --git a/sc/source/core/data/dpglobal.cxx b/sc/source/core/data/dpglobal.cxx
index 3561eff..142c84f 100644
--- a/sc/source/core/data/dpglobal.cxx
+++ b/sc/source/core/data/dpglobal.cxx
@@ -31,8 +31,193 @@
#include "dpglobal.hxx"
#include "document.hxx"
#include "dpobject.hxx"
+#include "cell.hxx"
+#include "globstr.hrc"
+#include "dptabdat.hxx"
-#include <stdio.h>
+bool ScDPItemData::isDate( sal_uLong nNumType )
+{
+ return ((nNumType & NUMBERFORMAT_DATE) != 0) ? 1 : 0;
+}
+
+ScDPItemData::ScDPItemData(const String& rS, double fV, bool bHV, const sal_uLong nNumFormatP, bool bData) :
+ nNumFormat( nNumFormatP ), aString(rS), fValue(fV),
+ mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!false) | (MK_DATE*!!isDate( nNumFormat ) ) )
+{
+}
+
+ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel) :
+ nNumFormat( 0 ), fValue(0.0), mbFlag( 0 )
+{
+ String aDocStr;
+ pDoc->GetString( nCol, nRow, nDocTab, aDocStr );
+
+ SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
+
+ ScAddress aPos( nCol, nRow, nDocTab );
+ ScBaseCell* pCell = pDoc->GetCell( aPos );
+
+ if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->GetErrCode() )
+ {
+ SetString ( aDocStr );
+ mbFlag |= MK_ERR;
+ }
+ else if ( pDoc->HasValueData( nCol, nRow, nDocTab ) )
+ {
+ double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nDocTab));
+ sal_uLong nFormat = NUMBERFORMAT_NUMBER;
+ if ( pFormatter )
+ nFormat = pFormatter->GetType( pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ) );
+ aString = aDocStr;
+ fValue = fVal;
+ mbFlag |= MK_VAL|MK_DATA;
+ nNumFormat = pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) );
+ isDate( nFormat ) ? ( mbFlag |= MK_DATE ) : (mbFlag &= ~MK_DATE);
+ }
+ else if (bLabel || pDoc->HasData(nCol, nRow, nDocTab))
+ {
+ if (bLabel && !aDocStr.Len())
+ {
+ // Replace an empty label string with column name.
+ rtl::OUStringBuffer aBuf;
+ aBuf.append(ScGlobal::GetRscString(STR_COLUMN));
+ aBuf.append(sal_Unicode(' '));
+
+ ScAddress aColAddr(nCol, 0, 0);
+ rtl::OUString aColStr;
+ aColAddr.Format(aColStr, SCA_VALID_COL, NULL);
+ aBuf.append(aColStr);
+ aDocStr = aBuf.makeStringAndClear();
+ }
+
+ SetString(aDocStr);
+ }
+}
+
+bool ScDPItemData::IsCaseInsEqual( const ScDPItemData& r ) const
+{
+ //! pass Transliteration?
+ //! inline?
+ return IsValue() ? ( r.IsValue() && rtl::math::approxEqual( fValue, r.fValue ) ) :
+ ( !r.IsValue() &&
+ ScGlobal::GetpTransliteration()->isEqual( aString, r.aString ) );
+}
+
+size_t ScDPItemData::Hash() const
+{
+ if ( IsValue() )
+ return (size_t) rtl::math::approxFloor( fValue );
+ else
+ // If we do unicode safe case insensitive hash we can drop
+ // ScDPItemData::operator== and use ::IsCasInsEqual
+ return rtl_ustr_hashCode_WithLength( aString.GetBuffer(), aString.Len() );
+}
+
+bool ScDPItemData::operator==( const ScDPItemData& r ) const
+{
+ if ( IsValue() )
+ {
+ if( (HasDatePart() != r.HasDatePart()) || (HasDatePart() && mnDatePart != r.mnDatePart) )
+ return false;
+
+ if ( IsDate() != r.IsDate() )
+ return false;
+ else if ( r.IsValue() )
+ return rtl::math::approxEqual( fValue, r.fValue );
+ else
+ return false;
+ }
+ else if ( r.IsValue() )
+ return false;
+ else
+ // need exact equality until we have a safe case insensitive string hash
+ return aString == r.aString;
+}
+
+sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA,
+ const ScDPItemData& rB )
+{
+ if ( rA.IsValue() )
+ {
+ if ( rB.IsValue() )
+ {
+ if ( rtl::math::approxEqual( rA.fValue, rB.fValue ) )
+ {
+ if ( rA.IsDate() == rB.IsDate() )
+ return 0;
+ else
+ return rA.IsDate() ? 1: -1;
+ }
+ else if ( rA.fValue < rB.fValue )
+ return -1;
+ else
+ return 1;
+ }
+ else
+ return -1; // values first
+ }
+ else if ( rB.IsValue() )
+ return 1; // values first
+ else
+ return ScGlobal::GetCollator()->compareString( rA.aString, rB.aString );
+}
+
+sal_uInt8 ScDPItemData::GetType() const
+{
+ if ( IsHasErr() )
+ return SC_VALTYPE_ERROR;
+ else if ( !IsHasData() )
+ return SC_VALTYPE_EMPTY;
+ else if ( IsValue())
+ return SC_VALTYPE_VALUE;
+ else
+ return SC_VALTYPE_STRING;
+}
+
+bool ScDPItemData::IsHasData() const
+{
+ return !!(mbFlag&MK_DATA);
+}
+
+bool ScDPItemData::IsHasErr() const
+{
+ return !!(mbFlag&MK_ERR);
+}
+
+bool ScDPItemData::IsValue() const
+{
+ return !!(mbFlag&MK_VAL);
+}
+
+String ScDPItemData::GetString() const
+{
+ return aString;
+}
+
+double ScDPItemData::GetValue() const
+{
+ return fValue;
+}
+
+bool ScDPItemData::HasStringData() const
+{
+ return IsHasData()&&!IsHasErr()&&!IsValue();
+}
+
+bool ScDPItemData::IsDate() const
+{
+ return !!(mbFlag&MK_DATE);
+}
+
+bool ScDPItemData::HasDatePart() const
+{
+ return !!(mbFlag&MK_DATEPART);
+}
+
+void ScDPItemData::SetDate( bool b )
+{
+ b ? ( mbFlag |= MK_DATE ) : ( mbFlag &= ~MK_DATE );
+}
namespace ScDPGlobal
{
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index 6dd05e9..fc73fb0 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -28,18 +28,16 @@
************************************************************************/
#include "dptablecache.hxx"
+
#include "document.hxx"
-#include "cell.hxx"
#include "queryentry.hxx"
-#include "globstr.hrc"
-
-#include <rtl/math.hxx>
#include "queryparam.hxx"
#include "dpglobal.hxx"
-#include "dptabdat.hxx"
#include "dpobject.hxx"
-
+#include "globstr.hrc"
#include "docoptio.hxx"
+
+#include <rtl/math.hxx>
#include <unotools/textsearch.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
@@ -63,10 +61,6 @@ using ::std::auto_ptr;
namespace {
-bool isDate( sal_uLong nNumType )
-{
- return ((nNumType & NUMBERFORMAT_DATE) != 0) ? 1 : 0;
-}
/**
* Search for an item in the data array. If it's in the array, return its
@@ -184,185 +178,6 @@ ScDPItemData* lcl_GetItemValue(
}
-ScDPItemData::ScDPItemData(const String& rS, double fV, bool bHV, const sal_uLong nNumFormatP, bool bData) :
- nNumFormat( nNumFormatP ), aString(rS), fValue(fV),
- mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!false) | (MK_DATE*!!isDate( nNumFormat ) ) )
-{
-}
-
-ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel) :
- nNumFormat( 0 ), fValue(0.0), mbFlag( 0 )
-{
- String aDocStr;
- pDoc->GetString( nCol, nRow, nDocTab, aDocStr );
-
- SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
-
- ScAddress aPos( nCol, nRow, nDocTab );
- ScBaseCell* pCell = pDoc->GetCell( aPos );
-
- if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->GetErrCode() )
- {
- SetString ( aDocStr );
- mbFlag |= MK_ERR;
- }
- else if ( pDoc->HasValueData( nCol, nRow, nDocTab ) )
- {
- double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nDocTab));
- sal_uLong nFormat = NUMBERFORMAT_NUMBER;
- if ( pFormatter )
- nFormat = pFormatter->GetType( pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) ) );
- aString = aDocStr;
- fValue = fVal;
- mbFlag |= MK_VAL|MK_DATA;
- nNumFormat = pDoc->GetNumberFormat( ScAddress( nCol, nRow, nDocTab ) );
- isDate( nFormat ) ? ( mbFlag |= MK_DATE ) : (mbFlag &= ~MK_DATE);
- }
- else if (bLabel || pDoc->HasData(nCol, nRow, nDocTab))
- {
- if (bLabel && !aDocStr.Len())
- {
- // Replace an empty label string with column name.
- rtl::OUStringBuffer aBuf;
- aBuf.append(ScGlobal::GetRscString(STR_COLUMN));
- aBuf.append(sal_Unicode(' '));
-
- ScAddress aColAddr(nCol, 0, 0);
- rtl::OUString aColStr;
- aColAddr.Format(aColStr, SCA_VALID_COL, NULL);
- aBuf.append(aColStr);
- aDocStr = aBuf.makeStringAndClear();
- }
-
- SetString(aDocStr);
- }
-}
-
-bool ScDPItemData::IsCaseInsEqual( const ScDPItemData& r ) const
-{
- //! pass Transliteration?
- //! inline?
- return IsValue() ? ( r.IsValue() && rtl::math::approxEqual( fValue, r.fValue ) ) :
- ( !r.IsValue() &&
- ScGlobal::GetpTransliteration()->isEqual( aString, r.aString ) );
-}
-
-size_t ScDPItemData::Hash() const
-{
- if ( IsValue() )
- return (size_t) rtl::math::approxFloor( fValue );
- else
- // If we do unicode safe case insensitive hash we can drop
- // ScDPItemData::operator== and use ::IsCasInsEqual
- return rtl_ustr_hashCode_WithLength( aString.GetBuffer(), aString.Len() );
-}
-
-bool ScDPItemData::operator==( const ScDPItemData& r ) const
-{
- if ( IsValue() )
- {
- if( (HasDatePart() != r.HasDatePart()) || (HasDatePart() && mnDatePart != r.mnDatePart) )
- return false;
-
- if ( IsDate() != r.IsDate() )
- return false;
- else if ( r.IsValue() )
- return rtl::math::approxEqual( fValue, r.fValue );
- else
- return false;
- }
- else if ( r.IsValue() )
- return false;
- else
- // need exact equality until we have a safe case insensitive string hash
- return aString == r.aString;
-}
-
-sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA,
- const ScDPItemData& rB )
-{
- if ( rA.IsValue() )
- {
- if ( rB.IsValue() )
- {
- if ( rtl::math::approxEqual( rA.fValue, rB.fValue ) )
- {
- if ( rA.IsDate() == rB.IsDate() )
- return 0;
- else
- return rA.IsDate() ? 1: -1;
- }
- else if ( rA.fValue < rB.fValue )
- return -1;
- else
- return 1;
- }
- else
- return -1; // values first
- }
- else if ( rB.IsValue() )
- return 1; // values first
- else
- return ScGlobal::GetCollator()->compareString( rA.aString, rB.aString );
-}
-
-sal_uInt8 ScDPItemData::GetType() const
-{
- if ( IsHasErr() )
- return SC_VALTYPE_ERROR;
- else if ( !IsHasData() )
- return SC_VALTYPE_EMPTY;
- else if ( IsValue())
- return SC_VALTYPE_VALUE;
- else
- return SC_VALTYPE_STRING;
-}
-
-bool ScDPItemData::IsHasData() const
-{
- return !!(mbFlag&MK_DATA);
-}
-
-bool ScDPItemData::IsHasErr() const
-{
- return !!(mbFlag&MK_ERR);
-}
-
-bool ScDPItemData::IsValue() const
-{
- return !!(mbFlag&MK_VAL);
-}
-
-String ScDPItemData::GetString() const
-{
- return aString;
-}
-
-double ScDPItemData::GetValue() const
-{
- return fValue;
-}
-
-bool ScDPItemData::HasStringData() const
-{
- return IsHasData()&&!IsHasErr()&&!IsValue();
-}
-
-bool ScDPItemData::IsDate() const
-{
- return !!(mbFlag&MK_DATE);
-}
-
-bool ScDPItemData::HasDatePart() const
-{
- return !!(mbFlag&MK_DATEPART);
-}
-
-void ScDPItemData::SetDate( bool b )
-{
- b ? ( mbFlag |= MK_DATE ) : ( mbFlag &= ~MK_DATE );
-}
-
// -----------------------------------------------------------------------
//class ScDPTableDataCache
//To cache the pivot table data source
@@ -780,7 +595,7 @@ bool ScDPCache::AddData(long nDim, ScDPItemData* pData)
// Wrap this instance with scoped pointer to ensure proper deletion.
auto_ptr<ScDPItemData> p(pData);
- pData->SetDate(isDate(GetNumType(pData->nNumFormat)));
+ pData->SetDate(ScDPItemData::isDate(GetNumType(pData->nNumFormat)));
SCROW nIndex = 0;
if (!hasItemInDimension(maTableDataValues[nDim], maGlobalOrder[nDim], *pData, nIndex))
commit 0ee411e6870f73ad6000ebb2502c777cabe30bea
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Thu Feb 9 14:28:35 2012 -0500
More duplicated defines.
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index 1fc3b70..090a7a7 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -54,9 +54,7 @@
#include <com/sun/star/sheet/XHierarchiesSupplier.hpp>
#include <com/sun/star/sheet/XLevelsSupplier.hpp>
-
-// moved from fieldwnd.hxx, see also SC_DAPI_MAXFIELDS
-#define MAX_LABELS 256
+#define SC_DP_MAX_FIELDS 256
#define PIVOT_MAXFUNC 11
#define PIVOT_FUNC_NONE 0x0000
@@ -73,10 +71,6 @@
#define PIVOT_FUNC_STD_VARP 0x0400
#define PIVOT_FUNC_AUTO 0x1000
-#define DATA_RENAME_SEPARATOR "_"
-#define __MAX_NUM_LEN 64
-#define __DECIMALPLACE 18
-
class SC_DLLPUBLIC ScDPItemData
{
public:
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index 79986f7..c3b3031 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -77,10 +77,6 @@ class ScDPResultData;
class ScDPItemData;
class ScDPTableData;
-// should be dynamic!
-#define SC_DAPI_MAXFIELDS 256
-
-
//
// implementation of DataPilotSource using ScDPTableData
//
@@ -108,10 +104,10 @@ private:
ScDPTableData* pData; // data source (ScDPObject manages its life time)
ScDPDimensions* pDimensions; // api objects
// settings:
- long nColDims[SC_DAPI_MAXFIELDS];
- long nRowDims[SC_DAPI_MAXFIELDS];
- long nDataDims[SC_DAPI_MAXFIELDS];
- long nPageDims[SC_DAPI_MAXFIELDS];
+ long nColDims[SC_DP_MAX_FIELDS];
+ long nRowDims[SC_DP_MAX_FIELDS];
+ long nDataDims[SC_DP_MAX_FIELDS];
+ long nPageDims[SC_DP_MAX_FIELDS];
long nColDimCount;
long nRowDimCount;
long nDataDimCount;
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index a09e5ee..d675bc8 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1980,8 +1980,8 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam)
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xDimsName );
long nDimCount = xDims->getCount();
- if ( nDimCount > MAX_LABELS )
- nDimCount = MAX_LABELS;
+ if ( nDimCount > SC_DP_MAX_FIELDS )
+ nDimCount = SC_DP_MAX_FIELDS;
if (!nDimCount)
return false;
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 3d50245..114aa15 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -254,8 +254,8 @@ sal_Bool ScDPColMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 )
ScDPInitState::ScDPInitState() :
nCount( 0 )
{
- pIndex = new long[SC_DAPI_MAXFIELDS];
- pData = new SCROW[SC_DAPI_MAXFIELDS];
+ pIndex = new long[SC_DP_MAX_FIELDS];
+ pData = new SCROW[SC_DP_MAX_FIELDS];
}
ScDPInitState::~ScDPInitState()
@@ -266,8 +266,8 @@ ScDPInitState::~ScDPInitState()
void ScDPInitState::AddMember( long nSourceIndex, SCROW nMember )
{
- OSL_ENSURE( nCount < SC_DAPI_MAXFIELDS, "too many InitState members" );
- if ( nCount < SC_DAPI_MAXFIELDS )
+ OSL_ENSURE( nCount < SC_DP_MAX_FIELDS, "too many InitState members" );
+ if ( nCount < SC_DP_MAX_FIELDS )
{
pIndex[nCount] = nSourceIndex;
pData[nCount] = nMember;
@@ -334,10 +334,10 @@ ScDPRunningTotalState::ScDPRunningTotalState( ScDPResultMember* pColRoot, ScDPRe
nColIndexPos( 0 ),
nRowIndexPos( 0 )
{
- pColVisible = new long[SC_DAPI_MAXFIELDS+1];
- pColIndexes = new long[SC_DAPI_MAXFIELDS+1];
- pRowVisible = new long[SC_DAPI_MAXFIELDS+1];
- pRowIndexes = new long[SC_DAPI_MAXFIELDS+1];
+ pColVisible = new long[SC_DP_MAX_FIELDS+1];
+ pColIndexes = new long[SC_DP_MAX_FIELDS+1];
+ pRowVisible = new long[SC_DP_MAX_FIELDS+1];
+ pRowIndexes = new long[SC_DP_MAX_FIELDS+1];
pColIndexes[0] = -1;
pRowIndexes[0] = -1;
}
@@ -352,8 +352,8 @@ ScDPRunningTotalState::~ScDPRunningTotalState()
void ScDPRunningTotalState::AddColIndex( long nVisible, long nSorted )
{
- OSL_ENSURE( nColIndexPos < SC_DAPI_MAXFIELDS, "too many column indexes" );
- if ( nColIndexPos < SC_DAPI_MAXFIELDS )
+ OSL_ENSURE( nColIndexPos < SC_DP_MAX_FIELDS, "too many column indexes" );
+ if ( nColIndexPos < SC_DP_MAX_FIELDS )
{
pColVisible[nColIndexPos] = nVisible;
pColIndexes[nColIndexPos] = nSorted;
@@ -365,8 +365,8 @@ void ScDPRunningTotalState::AddColIndex( long nVisible, long nSorted )
void ScDPRunningTotalState::AddRowIndex( long nVisible, long nSorted )
{
- OSL_ENSURE( nRowIndexPos < SC_DAPI_MAXFIELDS, "too many row indexes" );
- if ( nRowIndexPos < SC_DAPI_MAXFIELDS )
+ OSL_ENSURE( nRowIndexPos < SC_DP_MAX_FIELDS, "too many row indexes" );
+ if ( nRowIndexPos < SC_DP_MAX_FIELDS )
{
pRowVisible[nRowIndexPos] = nVisible;
pRowIndexes[nRowIndexPos] = nSorted;
@@ -767,7 +767,7 @@ ScDPResultData::ScDPResultData( ScDPSource* pSrc ) : //! Ref
bDataAtRow( false )
{
- lcl_ResizePointVector( mpDimMembers , SC_DAPI_MAXFIELDS );
+ lcl_ResizePointVector( mpDimMembers , SC_DP_MAX_FIELDS );
}
ScDPResultData::~ScDPResultData()
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 6764d2d..199e457 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -808,8 +808,8 @@ void ScDPSource::CreateRes_Impl()
// or pointer arrays.
vector<rtl::OUString> aDataNames;
sheet::DataPilotFieldReference* pDataRefValues = NULL;
- ScSubTotalFunc eDataFunctions[SC_DAPI_MAXFIELDS];
- sal_uInt16 nDataRefOrient[SC_DAPI_MAXFIELDS];
+ ScSubTotalFunc eDataFunctions[SC_DP_MAX_FIELDS];
+ sal_uInt16 nDataRefOrient[SC_DP_MAX_FIELDS];
if (nDataDimCount)
{
aDataNames.resize(nDataDimCount);
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 961b979..8b83f6b 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -347,8 +347,8 @@ void ScDPLayoutDlg::StateChanged( StateChangedType nStateChange )
void ScDPLayoutDlg::InitWndSelect( const vector<ScDPLabelDataRef>& rLabels )
{
size_t nLabelCount = rLabels.size();
- if (nLabelCount > MAX_LABELS)
- nLabelCount = MAX_LABELS;
+ if (nLabelCount > SC_DP_MAX_FIELDS)
+ nLabelCount = SC_DP_MAX_FIELDS;
aLabelDataArr.clear();
aLabelDataArr.reserve( nLabelCount );
commit 2f14dc8754302f72addeb6797246d55b59fb9f4e
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Thu Feb 9 14:22:04 2012 -0500
Use names from unonames.hxx to be consistent.
And removed duplicated defines.
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index 5d3b5d6..1fc3b70 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -77,28 +77,6 @@
#define __MAX_NUM_LEN 64
#define __DECIMALPLACE 18
-#define DP_PROP_COLUMNGRAND "ColumnGrand"
-#define DP_PROP_FUNCTION "Function"
-#define DP_PROP_IGNOREEMPTY "IgnoreEmptyRows"
-#define DP_PROP_ISDATALAYOUT "IsDataLayoutDimension"
-#define DP_PROP_ISVISIBLE "IsVisible"
-#define DP_PROP_ORIENTATION "Orientation"
-#define DP_PROP_REPEATIFEMPTY "RepeatIfEmpty"
-#define DP_PROP_ROWGRAND "RowGrand"
-#define DP_PROP_SHOWDETAILS "ShowDetails"
-#define DP_PROP_SHOWEMPTY "ShowEmpty"
-#define DP_PROP_SUBTOTALS "SubTotals"
-#define DP_PROP_USEDHIERARCHY "UsedHierarchy"
-#define DP_PROP_FILTER "Filter"
-#define DP_PROP_POSITION "Position"
-#define DP_PROP_ORIGINAL "Original"
-
-class ScTypedStrData;
-class ScDPObject;
-class ScDPInfoWnd;
-class ScDocShell;
-class ScTabViewShell;
-
class SC_DLLPUBLIC ScDPItemData
{
public:
diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx
index c4c2ebc..436aa91 100644
--- a/sc/inc/dptablecache.hxx
+++ b/sc/inc/dptablecache.hxx
@@ -41,6 +41,7 @@
#include <boost/ptr_container/ptr_vector.hpp>
struct ScQueryParam;
+class ScDPObject;
/**
* This class represents the cached data part of the datapilot cache table
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index c6e7d78..0a91ece 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -565,18 +565,18 @@
#define SC_UNO_DP_COLGRAND "ColumnGrand"
#define SC_UNO_DP_ROWGRAND "RowGrand"
#define SC_UNO_DP_ORIGINAL "Original"
-#define SC_UNO_DP_ISDATALA "IsDataLayoutDimension"
-#define SC_UNO_DP_ORIENTAT "Orientation"
+#define SC_UNO_DP_ISDATALAYOUT "IsDataLayoutDimension"
+#define SC_UNO_DP_ORIENTATION "Orientation"
#define SC_UNO_DP_POSITION "Position"
#define SC_UNO_DP_FUNCTION "Function"
-#define SC_UNO_DP_USEDHIER "UsedHierarchy"
+#define SC_UNO_DP_USEDHIERARCHY "UsedHierarchy"
#define SC_UNO_DP_FILTER "Filter"
#define SC_UNO_DP_SUBTOTAL "SubTotals"
-#define SC_UNO_DP_SHOWEMPT "ShowEmpty"
-#define SC_UNO_DP_ISVISIBL "IsVisible"
-#define SC_UNO_DP_SHOWDETA "ShowDetails"
-#define SC_UNO_DP_IGNOREEM "IgnoreEmptyRows"
-#define SC_UNO_DP_REPEATIF "RepeatIfEmpty"
+#define SC_UNO_DP_SHOWEMPTY "ShowEmpty"
+#define SC_UNO_DP_ISVISIBLE "IsVisible"
+#define SC_UNO_DP_SHOWDETAILS "ShowDetails"
+#define SC_UNO_DP_IGNOREEMPTY "IgnoreEmptyRows"
+#define SC_UNO_DP_REPEATEMPTY "RepeatIfEmpty"
#define SC_UNO_DP_DATADESC "DataDescription"
#define SC_UNO_DP_NUMBERFO SC_UNONAME_NUMFMT
#define SC_UNO_DP_ROWFIELDCOUNT "RowFieldCount"
@@ -594,12 +594,12 @@
#define SC_UNO_DP_LAYOUT "Layout"
// data pilot descriptor
-#define SC_UNO_DP_IGNEMPROWS "IgnoreEmptyRows"
-#define SC_UNO_DP_RPTEMPTY "RepeatIfEmpty"
+#define SC_UNO_DP_IGNORE_EMPTYROWS "IgnoreEmptyRows"
+#define SC_UNO_DP_REPEATEMPTY "RepeatIfEmpty"
#define SC_UNO_DP_DRILLDOWN "DrillDownOnDoubleClick"
-#define SC_UNO_DP_SHOWFILT "ShowFilterButton"
+#define SC_UNO_DP_SHOWFILTER "ShowFilterButton"
#define SC_UNO_DP_IMPORTDESC "ImportDescriptor"
-#define SC_UNO_DP_SOURCESERV "SourceServiceName"
+#define SC_UNO_DP_SOURCESERVICE "SourceServiceName"
#define SC_UNO_DP_SERVICEARG "ServiceArguments"
// properties in data pilot descriptor ServiceArguments
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index ee3d771..a09e5ee 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -126,11 +126,11 @@ sal_uInt16 lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSup
if ( xDimProp.is() )
{
bFound = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
if (bFound)
nRet = ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
}
}
@@ -689,8 +689,8 @@ bool ScDPObject::GetMembers( sal_Int32 nDim, sal_Int32 nHier, vector<ScDPLabelDa
Reference<beans::XPropertySet> xMemProp(xMember, UNO_QUERY);
if (xMemProp.is())
{
- aMem.mbVisible = ScUnoHelpFunctions::GetBoolProperty(xMemProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISVISIBL)));
- aMem.mbShowDetails = ScUnoHelpFunctions::GetBoolProperty(xMemProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SHOWDETA)));
+ aMem.mbVisible = ScUnoHelpFunctions::GetBoolProperty(xMemProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISVISIBLE)));
+ aMem.mbShowDetails = ScUnoHelpFunctions::GetBoolProperty(xMemProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SHOWDETAILS)));
aMem.maLayoutName = ScUnoHelpFunctions::GetStringProperty(
xMemProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_LAYOUTNAME)), OUString());
@@ -873,7 +873,7 @@ OUString ScDPObject::GetDimName( long nDim, bool& rIsDataLayout, sal_Int32* pFla
if ( xDimName.is() && xDimProp.is() )
{
sal_Bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
rtl::OUString aName;
@@ -917,7 +917,7 @@ bool ScDPObject::IsDuplicated( long nDim )
try
{
uno::Any aOrigAny = xDimProp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIGINAL)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIGINAL)) );
uno::Reference<uno::XInterface> xIntOrig;
if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() )
bDuplicated = true;
@@ -973,7 +973,7 @@ void ScDPObject::FillPageList( std::vector<rtl::OUString>& rStrings, long nField
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
long nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_USEDHIERARCHY)) );
long nLevel = 0;
long nHierCount = 0;
@@ -1023,7 +1023,7 @@ void ScDPObject::FillPageList( std::vector<rtl::OUString>& rStrings, long nField
sal_Bool bVisible = false;
if (xPropSet.is())
{
- Any any = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISVISIBL)));
+ Any any = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISVISIBLE)));
any >>= bVisible;
}
@@ -1344,9 +1344,9 @@ bool ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
uno::Reference<sheet::XHierarchiesSupplier> xDimSupp( xDim, uno::UNO_QUERY );
sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)) );
sal_Int32 nOrient = ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( !bDataLayout )
{
@@ -1364,7 +1364,7 @@ bool ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
uno::Reference<container::XIndexAccess> xHiers = new ScNameToIndexAccess( xDimSupp->getHierarchies() );
sal_Int32 nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_USEDHIERARCHY)) );
if ( nHierarchy >= xHiers->getCount() )
nHierarchy = 0;
@@ -1553,7 +1553,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)) );
if (bDataLayout)
{
// the elements of the data layout dimension can't be found by their names
@@ -1611,7 +1611,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
if ( xMbrProp.is() )
{
bShowDetails = ScUnoHelpFunctions::GetBoolProperty( xMbrProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWDETAILS)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SHOWDETAILS)) );
//! don't set bFound if property is unknown?
bFound = sal_True;
}
@@ -1660,7 +1660,7 @@ sal_uInt16 lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimPro
{
uno::Reference<container::XIndexAccess> xHiers = new ScNameToIndexAccess( xDimSupp->getHierarchies() );
long nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_USEDHIERARCHY)) );
if ( nHierarchy >= xHiers->getCount() )
nHierarchy = 0;
@@ -1679,7 +1679,7 @@ sal_uInt16 lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimPro
try
{
aSubAny = xLevProp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SUBTOTALS)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SUBTOTAL)) );
}
catch(uno::Exception&)
{
@@ -1745,7 +1745,7 @@ void lcl_FillOldFields(
// dimension orientation, hidden by default.
long nDimOrient = ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( xDimProp.is() && nDimOrient == nOrient )
@@ -1757,7 +1757,7 @@ void lcl_FillOldFields(
if ( nOrient == sheet::DataPilotFieldOrientation_DATA )
{
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_FUNCTION)),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_FUNCTION)),
sheet::GeneralFunction_NONE );
if ( eFunc == sheet::GeneralFunction_AUTO )
{
@@ -1771,14 +1771,14 @@ void lcl_FillOldFields(
// is this data layout dimension?
bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty(
- xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)));
+ xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)));
// is this dimension cloned?
uno::Any aOrigAny;
try
{
aOrigAny = xDimProp->getPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIGINAL)));
+ OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIGINAL)));
}
catch(uno::Exception&)
{
@@ -1837,7 +1837,7 @@ void lcl_FillOldFields(
rField.nFuncMask = nMask;
rField.nFuncCount = lcl_CountBits(nMask);
long nPos = ScUnoHelpFunctions::GetLongProperty(
- xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_POSITION)));
+ xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_POSITION)));
aPos.push_back(nPos);
try
@@ -1907,15 +1907,15 @@ bool ScDPObject::FillOldParam(ScPivotParam& rParam) const
try
{
rParam.bMakeTotalCol = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_COLUMNGRAND)), true );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_COLGRAND)), true );
rParam.bMakeTotalRow = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ROWGRAND)), true );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ROWGRAND)), true );
// following properties may be missing for external sources
rParam.bIgnoreEmptyRows = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_IGNOREEMPTY)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_IGNOREEMPTY)) );
rParam.bDetectCategories = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_REPEATIFEMPTY)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_REPEATEMPTY)) );
}
catch(uno::Exception&)
{
@@ -1932,7 +1932,7 @@ void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans::XProp
{
uno::Reference<container::XIndexAccess> xHiers = new ScNameToIndexAccess( xDimSupp->getHierarchies() );
long nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_USEDHIERARCHY)) );
if ( nHierarchy >= xHiers->getCount() )
nHierarchy = 0;
rData.mnUsedHier = nHierarchy;
@@ -1950,7 +1950,7 @@ void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans::XProp
if ( xLevProp.is() )
{
rData.mbShowAll = ScUnoHelpFunctions::GetBoolProperty( xLevProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWEMPTY)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SHOWEMPTY)) );
try
{
@@ -1997,7 +1997,7 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam)
{
bool bDuplicated = false;
bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
try
@@ -2005,7 +2005,7 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam)
aFieldName = String( xDimName->getName() );
uno::Any aOrigAny = xDimProp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIGINAL)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIGINAL)) );
uno::Reference<uno::XInterface> xIntOrig;
if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() )
bDuplicated = true;
@@ -2073,7 +2073,7 @@ sal_Int32 ScDPObject::GetUsedHierarchy( sal_Int32 nDim )
uno::Reference<container::XIndexAccess> xIntDims(new ScNameToIndexAccess( xDimsName ));
uno::Reference<beans::XPropertySet> xDim(xIntDims->getByIndex( nDim ), uno::UNO_QUERY);
if (xDim.is())
- nHier = ScUnoHelpFunctions::GetLongProperty( xDim, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_USEDHIER ) ) );
+ nHier = ScUnoHelpFunctions::GetLongProperty( xDim, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_USEDHIERARCHY ) ) );
return nHier;
}
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 0b5c866..f588ab2 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -372,7 +372,7 @@ void lcl_FillNumberFormats( sal_uInt32*& rFormats, long& rCount,
{
sheet::DataPilotFieldOrientation eDimOrient =
(sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA )
{
@@ -439,7 +439,7 @@ sal_uInt32 lcl_GetFirstNumberFormat( const uno::Reference<container::XIndexAcces
{
sheet::DataPilotFieldOrientation eDimOrient =
(sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA )
{
@@ -487,7 +487,7 @@ uno::Sequence<sheet::MemberResult> lcl_GetSelectedPageAsResult( const uno::Refer
{
//! merge with ScDPDimension::setPropertyValue?
- uno::Any aValue = xDimProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_FILTER)) );
+ uno::Any aValue = xDimProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_FILTER)) );
uno::Sequence<sheet::TableFilterField> aSeq;
if (aValue >>= aSeq)
@@ -561,13 +561,13 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
{
sheet::DataPilotFieldOrientation eDimOrient =
(sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
long nDimPos = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_POSITION)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_POSITION)) );
sal_Bool bIsDataLayout = ScUnoHelpFunctions::GetBoolProperty(
xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)) );
bool bHasHiddenMember = ScUnoHelpFunctions::GetBoolProperty(
xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_HAS_HIDDEN_MEMBER)));
@@ -577,7 +577,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
new ScNameToIndexAccess( xDimSupp->getHierarchies() );
long nHierarchy = ScUnoHelpFunctions::GetLongProperty(
xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_USEDHIERARCHY)) );
if ( nHierarchy >= xHiers->getCount() )
nHierarchy = 0;
@@ -1221,12 +1221,12 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s
uno::Reference<beans::XPropertySet> xSrcProp( xSource, uno::UNO_QUERY );
sal_Bool bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_COLUMNGRAND)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_COLGRAND)) );
if ( bColGrand )
rGrandTotalCols = 1; // default if data layout not in columns
sal_Bool bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ROWGRAND)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ROWGRAND)) );
if ( bRowGrand )
rGrandTotalRows = 1; // default if data layout not in rows
@@ -1247,10 +1247,10 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s
{
sheet::DataPilotFieldOrientation eDimOrient =
(sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) ) )
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)) ) )
{
rDataLayoutIndex = nDim;
rDataOrient = eDimOrient;
@@ -1570,7 +1570,7 @@ uno::Sequence<sheet::GeneralFunction> lcl_GetSubTotals(
{
try
{
- uno::Any aValue = xLevelProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SUBTOTALS)) );
+ uno::Any aValue = xLevelProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SUBTOTAL)) );
aValue >>= aSubTotals;
}
catch(uno::Exception&)
@@ -1826,7 +1826,7 @@ void ScDPOutput::GetDataDimensionNames( String& rSourceName, String& rGivenName,
//! Should use a stored name when available
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_FUNCTION)),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_FUNCTION)),
sheet::GeneralFunction_NONE );
rGivenName = lcl_GetDataFieldName( rSourceName, eFunc );
}
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 6f4c237..baff6af 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -166,17 +166,17 @@ void ScDPSaveMember::WriteToSource( const uno::Reference<uno::XInterface>& xMemb
if ( nVisibleMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xMembProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISVISIBLE)), (bool)nVisibleMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISVISIBLE)), (bool)nVisibleMode );
if ( nShowDetailsMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xMembProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWDETAILS)), (bool)nShowDetailsMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SHOWDETAILS)), (bool)nShowDetailsMode );
if (mpLayoutName.get())
ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, SC_UNO_DP_LAYOUTNAME, *mpLayoutName);
if ( nPosition >= 0 )
- ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, DP_PROP_POSITION, nPosition);
+ ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, SC_UNO_DP_POSITION, nPosition);
}
}
@@ -555,16 +555,16 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
sheet::DataPilotFieldOrientation eOrient = (sheet::DataPilotFieldOrientation)nOrientation;
aAny <<= eOrient;
- xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)), aAny );
+ xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)), aAny );
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)nFunction;
aAny <<= eFunc;
- xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_FUNCTION)), aAny );
+ xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_FUNCTION)), aAny );
if ( nUsedHierarchy >= 0 )
{
aAny <<= (sal_Int32)nUsedHierarchy;
- xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)), aAny );
+ xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_USEDHIERARCHY)), aAny );
}
if ( pReferenceValue )
@@ -584,7 +584,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
}
// else keep empty sequence
- ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, DP_PROP_FILTER, aFilter);
+ ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_FILTER, aFilter);
if (mpLayoutName.get())
ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_LAYOUTNAME, *mpLayoutName);
@@ -643,11 +643,11 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
for (long i=0; i<nSubTotalCount; i++)
pArray[i] = (sheet::GeneralFunction)pSubTotalFuncs[i];
aAny <<= aSeq;
- xLevProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SUBTOTALS)), aAny );
+ xLevProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SUBTOTAL)), aAny );
}
if ( nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xLevProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWEMPTY)), (bool)nShowEmptyMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SHOWEMPTY)), (bool)nShowEmptyMode );
if ( pSortInfo )
ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_DP_SORTING, *pSortInfo);
@@ -1029,7 +1029,7 @@ void lcl_ResetOrient( const uno::Reference<sheet::XDimensionsSupplier>& xSource
{
uno::Any aAny;
aAny <<= eOrient;
- xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)), aAny );
+ xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)), aAny );
}
}
}
@@ -1052,10 +1052,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
{
if ( nIgnoreEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_IGNOREEMPTY)), (bool)nIgnoreEmptyMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_IGNOREEMPTY)), (bool)nIgnoreEmptyMode );
if ( nRepeatEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_REPEATIFEMPTY)), (bool)nRepeatEmptyMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_REPEATEMPTY)), (bool)nRepeatEmptyMode );
}
catch(uno::Exception&)
{
@@ -1101,7 +1101,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
if ( xDimProp.is() )
{
bFound = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
}
}
@@ -1146,10 +1146,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
{
if ( nColumnGrandMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_COLUMNGRAND)), (bool)nColumnGrandMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_COLGRAND)), (bool)nColumnGrandMode );
if ( nRowGrandMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ROWGRAND)), (bool)nRowGrandMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ROWGRAND)), (bool)nRowGrandMode );
}
}
catch(uno::Exception&)
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 0894b2e..6764d2d 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1142,8 +1142,8 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPSource::getPropertySetInfo(
{
{MAP_CHAR_LEN(SC_UNO_DP_COLGRAND), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_DATADESC), 0, &getCppuType((rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
- {MAP_CHAR_LEN(SC_UNO_DP_IGNOREEM), 0, &getBooleanCppuType(), 0, 0 }, // for sheet data only
- {MAP_CHAR_LEN(SC_UNO_DP_REPEATIF), 0, &getBooleanCppuType(), 0, 0 }, // for sheet data only
+ {MAP_CHAR_LEN(SC_UNO_DP_IGNOREEMPTY), 0, &getBooleanCppuType(), 0, 0 }, // for sheet data only
+ {MAP_CHAR_LEN(SC_UNO_DP_REPEATEMPTY), 0, &getBooleanCppuType(), 0, 0 }, // for sheet data only
{MAP_CHAR_LEN(SC_UNO_DP_ROWGRAND), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_ROWFIELDCOUNT), 0, &getCppuType(static_cast<sal_Int32*>(0)), READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_COLUMNFIELDCOUNT), 0, &getCppuType(static_cast<sal_Int32*>(0)), READONLY, 0 },
@@ -1166,9 +1166,9 @@ void SAL_CALL ScDPSource::setPropertyValue( const rtl::OUString& aPropertyName,
setColumnGrand( lcl_GetBoolFromAny( aValue ) );
else if ( aNameStr.EqualsAscii( SC_UNO_DP_ROWGRAND ) )
setRowGrand( lcl_GetBoolFromAny( aValue ) );
- else if ( aNameStr.EqualsAscii( SC_UNO_DP_IGNOREEM ) )
+ else if ( aNameStr.EqualsAscii( SC_UNO_DP_IGNOREEMPTY ) )
setIgnoreEmptyRows( lcl_GetBoolFromAny( aValue ) );
- else if ( aNameStr.EqualsAscii( SC_UNO_DP_REPEATIF ) )
+ else if ( aNameStr.EqualsAscii( SC_UNO_DP_REPEATEMPTY ) )
setRepeatIfEmpty( lcl_GetBoolFromAny( aValue ) );
else if (aNameStr.EqualsAscii(SC_UNO_DP_GRANDTOTAL_NAME))
{
@@ -1193,9 +1193,9 @@ uno::Any SAL_CALL ScDPSource::getPropertyValue( const rtl::OUString& aPropertyNa
lcl_SetBoolInAny( aRet, getColumnGrand() );
else if ( aNameStr.EqualsAscii( SC_UNO_DP_ROWGRAND ) )
lcl_SetBoolInAny( aRet, getRowGrand() );
- else if ( aNameStr.EqualsAscii( SC_UNO_DP_IGNOREEM ) )
+ else if ( aNameStr.EqualsAscii( SC_UNO_DP_IGNOREEMPTY ) )
lcl_SetBoolInAny( aRet, getIgnoreEmptyRows() );
- else if ( aNameStr.EqualsAscii( SC_UNO_DP_REPEATIF ) )
+ else if ( aNameStr.EqualsAscii( SC_UNO_DP_REPEATEMPTY ) )
lcl_SetBoolInAny( aRet, getRepeatIfEmpty() );
else if ( aNameStr.EqualsAscii( SC_UNO_DP_DATADESC ) ) // read-only
aRet <<= rtl::OUString( getDataDescription() );
@@ -1541,13 +1541,13 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPDimension::getPropertySetIn
{MAP_CHAR_LEN(SC_UNO_DP_FILTER), 0, &getCppuType((uno::Sequence<sheet::TableFilterField>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_FLAGS), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_FUNCTION), 0, &getCppuType((sheet::GeneralFunction*)0), 0, 0 },
- {MAP_CHAR_LEN(SC_UNO_DP_ISDATALA), 0, &getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0 },
+ {MAP_CHAR_LEN(SC_UNO_DP_ISDATALAYOUT), 0, &getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_NUMBERFO), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
- {MAP_CHAR_LEN(SC_UNO_DP_ORIENTAT), 0, &getCppuType((sheet::DataPilotFieldOrientation*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNO_DP_ORIENTATION), 0, &getCppuType((sheet::DataPilotFieldOrientation*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_ORIGINAL), 0, &getCppuType((uno::Reference<container::XNamed>*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_POSITION), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_REFVALUE), 0, &getCppuType((sheet::DataPilotFieldReference*)0), 0, 0 },
- {MAP_CHAR_LEN(SC_UNO_DP_USEDHIER), 0, &getCppuType((sal_Int32*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNO_DP_USEDHIERARCHY), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_LAYOUTNAME), 0, &getCppuType(static_cast<rtl::OUString*>(0)), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_FIELD_SUBTOTALNAME), 0, &getCppuType(static_cast<rtl::OUString*>(0)), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_HAS_HIDDEN_MEMBER), 0, &getBooleanCppuType(), 0, 0 },
@@ -1570,13 +1570,13 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam
if (aValue >>= nInt)
setPosition( nInt );
}
- else if ( aNameStr.EqualsAscii( SC_UNO_DP_USEDHIER ) )
+ else if ( aNameStr.EqualsAscii( SC_UNO_DP_USEDHIERARCHY ) )
{
sal_Int32 nInt = 0;
if (aValue >>= nInt)
setUsedHierarchy( nInt );
}
- else if ( aNameStr.EqualsAscii( SC_UNO_DP_ORIENTAT ) )
+ else if ( aNameStr.EqualsAscii( SC_UNO_DP_ORIENTATION ) )
{
sheet::DataPilotFieldOrientation eEnum;
if (aValue >>= eEnum)
@@ -1650,9 +1650,9 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert
String aNameStr = aPropertyName;
if ( aNameStr.EqualsAscii( SC_UNO_DP_POSITION ) )
aRet <<= (sal_Int32) getPosition();
- else if ( aNameStr.EqualsAscii( SC_UNO_DP_USEDHIER ) )
+ else if ( aNameStr.EqualsAscii( SC_UNO_DP_USEDHIERARCHY ) )
aRet <<= (sal_Int32) getUsedHierarchy();
- else if ( aNameStr.EqualsAscii( SC_UNO_DP_ORIENTAT ) )
+ else if ( aNameStr.EqualsAscii( SC_UNO_DP_ORIENTATION ) )
{
sheet::DataPilotFieldOrientation eVal = (sheet::DataPilotFieldOrientation)getOrientation();
aRet <<= eVal;
@@ -1664,7 +1664,7 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert
}
else if ( aNameStr.EqualsAscii( SC_UNO_DP_REFVALUE ) )
aRet <<= aReferenceValue;
- else if ( aNameStr.EqualsAscii( SC_UNO_DP_ISDATALA ) ) // read-only properties
+ else if ( aNameStr.EqualsAscii( SC_UNO_DP_ISDATALAYOUT ) ) // read-only properties
lcl_SetBoolInAny( aRet, getIsDataLayoutDimension() );
else if ( aNameStr.EqualsAscii( SC_UNO_DP_NUMBERFO ) )
{
@@ -2266,7 +2266,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPLevel::getPropertySetInfo()
//! change type of AutoShow/Layout/Sorting to API struct when available
{MAP_CHAR_LEN(SC_UNO_DP_AUTOSHOW), 0, &getCppuType((sheet::DataPilotFieldAutoShowInfo*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_LAYOUT), 0, &getCppuType((sheet::DataPilotFieldLayoutInfo*)0), 0, 0 },
- {MAP_CHAR_LEN(SC_UNO_DP_SHOWEMPT), 0, &getBooleanCppuType(), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNO_DP_SHOWEMPTY), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_SORTING), 0, &getCppuType((sheet::DataPilotFieldSortInfo*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_SUBTOTAL), 0, &getCppuType((uno::Sequence<sheet::GeneralFunction>*)0), 0, 0 },
{0,0,0,0,0,0}
@@ -2282,7 +2282,7 @@ void SAL_CALL ScDPLevel::setPropertyValue( const rtl::OUString& aPropertyName, c
uno::RuntimeException)
{
String aNameStr = aPropertyName;
- if ( aNameStr.EqualsAscii( SC_UNO_DP_SHOWEMPT ) )
+ if ( aNameStr.EqualsAscii( SC_UNO_DP_SHOWEMPTY ) )
setShowEmpty( lcl_GetBoolFromAny( aValue ) );
else if ( aNameStr.EqualsAscii( SC_UNO_DP_SUBTOTAL ) )
{
@@ -2308,7 +2308,7 @@ uno::Any SAL_CALL ScDPLevel::getPropertyValue( const rtl::OUString& aPropertyNam
{
uno::Any aRet;
String aNameStr = aPropertyName;
- if ( aNameStr.EqualsAscii( SC_UNO_DP_SHOWEMPT ) )
+ if ( aNameStr.EqualsAscii( SC_UNO_DP_SHOWEMPTY ) )
lcl_SetBoolInAny( aRet, getShowEmpty() );
else if ( aNameStr.EqualsAscii( SC_UNO_DP_SUBTOTAL ) )
{
@@ -2745,9 +2745,9 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPMember::getPropertySetInfo(
static SfxItemPropertyMapEntry aDPMemberMap_Impl[] =
{
- {MAP_CHAR_LEN(SC_UNO_DP_ISVISIBL), 0, &getBooleanCppuType(), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNO_DP_ISVISIBLE), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_POSITION), 0, &getCppuType((sal_Int32*)0), 0, 0 },
- {MAP_CHAR_LEN(SC_UNO_DP_SHOWDETA), 0, &getBooleanCppuType(), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNO_DP_SHOWDETAILS), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DP_LAYOUTNAME), 0, &getCppuType(static_cast<rtl::OUString*>(0)), 0, 0 },
{0,0,0,0,0,0}
};
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list