diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-09 12:58:07 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-09 15:25:08 -0500 |
commit | ee96213ca4bbbb063f93a7e62d22b98f0daaa815 (patch) | |
tree | 56920306b4593d8da3fe7a5e10d61e55a81e7d67 /sc | |
parent | Consolidate all these duplicated defined uno prop names for pivot table. (diff) | |
download | core-ee96213ca4bbbb063f93a7e62d22b98f0daaa815.tar.gz core-ee96213ca4bbbb063f93a7e62d22b98f0daaa815.zip |
Pivot table related uno names to have SC_UNO_DP prefix.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/unonames.hxx | 83 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 26 | ||||
-rw-r--r-- | sc/source/core/data/dpoutput.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/data/dpsave.cxx | 18 | ||||
-rw-r--r-- | sc/source/core/data/dptabsrc.cxx | 172 | ||||
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 90 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaformat.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/view/dbfunc3.cxx | 2 |
8 files changed, 205 insertions, 206 deletions
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx index 58ed8548bdba..c6e7d78c6a91 100644 --- a/sc/inc/unonames.hxx +++ b/sc/inc/unonames.hxx @@ -562,52 +562,51 @@ #define OLD_UNO_VERTSCROLL "VerticalScrollBar" // data pilot source -#define SC_UNO_COLGRAND "ColumnGrand" -#define SC_UNO_ROWGRAND "RowGrand" -#define SC_UNO_ORIGINAL "Original" -#define SC_UNO_ISDATALA "IsDataLayoutDimension" -#define SC_UNO_ORIENTAT "Orientation" -#define SC_UNO_POSITION "Position" -#define SC_UNO_FUNCTION "Function" -#define SC_UNO_USEDHIER "UsedHierarchy" -#define SC_UNO_FILTER "Filter" -#define SC_UNO_SUBTOTAL "SubTotals" -#define SC_UNO_SHOWEMPT "ShowEmpty" -#define SC_UNO_ISVISIBL "IsVisible" -#define SC_UNO_SHOWDETA "ShowDetails" -#define SC_UNO_IGNOREEM "IgnoreEmptyRows" -#define SC_UNO_REPEATIF "RepeatIfEmpty" -#define SC_UNO_DATADESC "DataDescription" -#define SC_UNO_NUMBERFO "NumberFormat" -#define SC_UNO_ROWFIELDCOUNT "RowFieldCount" -#define SC_UNO_COLUMNFIELDCOUNT "ColumnFieldCount" -#define SC_UNO_DATAFIELDCOUNT "DataFieldCount" -#define SC_UNO_LAYOUTNAME "LayoutName" -#define SC_UNO_FIELD_SUBTOTALNAME "FieldSubtotalName" -#define SC_UNO_GRANDTOTAL_NAME "GrandTotalName" -#define SC_UNO_HAS_HIDDEN_MEMBER "HasHiddenMember" -#define SC_UNO_FLAGS "Flags" - -// (preliminary:) -#define SC_UNO_REFVALUE "ReferenceValue" -#define SC_UNO_SORTING "Sorting" -#define SC_UNO_AUTOSHOW "AutoShow" -#define SC_UNO_LAYOUT "Layout" +#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_POSITION "Position" +#define SC_UNO_DP_FUNCTION "Function" +#define SC_UNO_DP_USEDHIER "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_DATADESC "DataDescription" +#define SC_UNO_DP_NUMBERFO SC_UNONAME_NUMFMT +#define SC_UNO_DP_ROWFIELDCOUNT "RowFieldCount" +#define SC_UNO_DP_COLUMNFIELDCOUNT "ColumnFieldCount" +#define SC_UNO_DP_DATAFIELDCOUNT "DataFieldCount" +#define SC_UNO_DP_LAYOUTNAME "LayoutName" +#define SC_UNO_DP_FIELD_SUBTOTALNAME "FieldSubtotalName" +#define SC_UNO_DP_GRANDTOTAL_NAME "GrandTotalName" +#define SC_UNO_DP_HAS_HIDDEN_MEMBER "HasHiddenMember" +#define SC_UNO_DP_FLAGS "Flags" + +#define SC_UNO_DP_REFVALUE "ReferenceValue" +#define SC_UNO_DP_SORTING "Sorting" +#define SC_UNO_DP_AUTOSHOW "AutoShow" +#define SC_UNO_DP_LAYOUT "Layout" // data pilot descriptor -#define SC_UNO_IGNEMPROWS "IgnoreEmptyRows" -#define SC_UNO_RPTEMPTY "RepeatIfEmpty" -#define SC_UNO_DRILLDOWN "DrillDownOnDoubleClick" -#define SC_UNO_SHOWFILT "ShowFilterButton" -#define SC_UNO_IMPORTDESC "ImportDescriptor" -#define SC_UNO_SOURCESERV "SourceServiceName" -#define SC_UNO_SERVICEARG "ServiceArguments" +#define SC_UNO_DP_IGNEMPROWS "IgnoreEmptyRows" +#define SC_UNO_DP_RPTEMPTY "RepeatIfEmpty" +#define SC_UNO_DP_DRILLDOWN "DrillDownOnDoubleClick" +#define SC_UNO_DP_SHOWFILT "ShowFilterButton" +#define SC_UNO_DP_IMPORTDESC "ImportDescriptor" +#define SC_UNO_DP_SOURCESERV "SourceServiceName" +#define SC_UNO_DP_SERVICEARG "ServiceArguments" // properties in data pilot descriptor ServiceArguments -#define SC_UNO_SOURCENAME "SourceName" -#define SC_UNO_OBJECTNAME "ObjectName" -#define SC_UNO_USERNAME "UserName" -#define SC_UNO_PASSWORD "Password" +#define SC_UNO_DP_SOURCENAME "SourceName" +#define SC_UNO_DP_OBJECTNAME "ObjectName" +#define SC_UNO_DP_USERNAME "UserName" +#define SC_UNO_DP_PASSWORD "Password" // range selection #define SC_UNONAME_INITVAL "InitialValue" diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 1dec7be77db2..ee3d7715090e 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -689,11 +689,11 @@ 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_ISVISIBL))); - aMem.mbShowDetails = ScUnoHelpFunctions::GetBoolProperty(xMemProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_SHOWDETA))); + 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.maLayoutName = ScUnoHelpFunctions::GetStringProperty( - xMemProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_LAYOUTNAME)), OUString()); + xMemProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_LAYOUTNAME)), OUString()); } aMembers.push_back(aMem); @@ -847,7 +847,7 @@ bool ScDPObject::IsDimNameInUse(const OUString& rName) const continue; OUString aLayoutName = ScUnoHelpFunctions::GetStringProperty( - xPropSet, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_LAYOUTNAME)), OUString()); + xPropSet, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_LAYOUTNAME)), OUString()); if (aLayoutName.equalsIgnoreAsciiCase(rName)) return true; } @@ -891,7 +891,7 @@ OUString ScDPObject::GetDimName( long nDim, bool& rIsDataLayout, sal_Int32* pFla if (pFlags) *pFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_FLAGS)), 0 ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_FLAGS)), 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_ISVISIBL))); + Any any = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISVISIBL))); any >>= bVisible; } @@ -1843,7 +1843,7 @@ void lcl_FillOldFields( try { if (nOrient == sheet::DataPilotFieldOrientation_DATA) - xDimProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_REFVALUE))) + xDimProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_REFVALUE))) >>= rField.maFieldRef; } catch (uno::Exception&) @@ -1954,11 +1954,11 @@ void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans::XProp try { - xLevProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SORTING ) ) ) + xLevProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_SORTING ) ) ) >>= rData.maSortInfo; - xLevProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_LAYOUT ) ) ) + xLevProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_LAYOUT ) ) ) >>= rData.maLayoutInfo; - xLevProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_AUTOSHOW ) ) ) + xLevProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_AUTOSHOW ) ) ) >>= rData.maShowInfo; } catch(uno::Exception&) @@ -2015,7 +2015,7 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam) } OUString aLayoutName = ScUnoHelpFunctions::GetStringProperty( - xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_LAYOUTNAME)), OUString()); + xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_LAYOUTNAME)), OUString()); if ( aFieldName.Len() && !bData && !bDuplicated ) { @@ -2028,7 +2028,7 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam) GetMembers(nDim, GetUsedHierarchy(nDim), pNewLabel->maMembers); lcl_FillLabelData(*pNewLabel, xDimProp); pNewLabel->mnFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_FLAGS)), 0 ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_FLAGS)), 0 ); rParam.maLabelArray.push_back(pNewLabel); } } @@ -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_USEDHIER ) ) ); + nHier = ScUnoHelpFunctions::GetLongProperty( xDim, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_USEDHIER ) ) ); return nHier; } diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 3264b28ce0db..0b5c866b9159 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -569,7 +569,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) ); bool bHasHiddenMember = ScUnoHelpFunctions::GetBoolProperty( - xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_HAS_HIDDEN_MEMBER))); + xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_HAS_HIDDEN_MEMBER))); if ( eDimOrient != sheet::DataPilotFieldOrientation_HIDDEN ) { @@ -606,7 +606,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS // #i108948# use ScUnoHelpFunctions::GetStringProperty, because // LayoutName is new and may not be present in external implementation OUString aCaption = ScUnoHelpFunctions::GetStringProperty( xPropSet, - OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_LAYOUTNAME)), aName ); + OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_LAYOUTNAME)), aName ); bool bRowFieldHasMember = false; switch ( eDimOrient ) @@ -705,7 +705,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS try { uno::Any aAny = xSrcProp->getPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DATADESC)) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_DATADESC)) ); rtl::OUString aUStr; aAny >>= aUStr; aDataDescription = String( aUStr ); @@ -1308,7 +1308,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa if (xPropSet.is()) { sal_Int32 nDataFieldCount = ScUnoHelpFunctions::GetLongProperty( xPropSet, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DATAFIELDCOUNT)) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_DATAFIELDCOUNT)) ); if (nDataFieldCount > 0) aResData.DataFieldIndex = (nRow - nDataStartRow) % nDataFieldCount; } @@ -1390,7 +1390,7 @@ bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>& return false; sal_Int32 nDataFieldCount = ScUnoHelpFunctions::GetLongProperty( xPropSet, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DATAFIELDCOUNT)) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_DATAFIELDCOUNT)) ); if (nDataFieldCount == 0) // No data field is present in this datapilot table. return false; diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index e8a48b731b30..6f4c2374354c 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -173,7 +173,7 @@ void ScDPSaveMember::WriteToSource( const uno::Reference<uno::XInterface>& xMemb rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWDETAILS)), (bool)nShowDetailsMode ); if (mpLayoutName.get()) - ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, SC_UNO_LAYOUTNAME, *mpLayoutName); + ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, SC_UNO_DP_LAYOUTNAME, *mpLayoutName); if ( nPosition >= 0 ) ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, DP_PROP_POSITION, nPosition); @@ -570,7 +570,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD if ( pReferenceValue ) { aAny <<= *pReferenceValue; - xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_REFVALUE)), aAny ); + xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_REFVALUE)), aAny ); } uno::Sequence<sheet::TableFilterField> aFilter; @@ -586,12 +586,12 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, DP_PROP_FILTER, aFilter); if (mpLayoutName.get()) - ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_LAYOUTNAME, *mpLayoutName); + ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_LAYOUTNAME, *mpLayoutName); const OUString* pSubTotalName = GetSubtotalName(); if (pSubTotalName) // Custom subtotal name, with '?' being replaced by the visible field name later. - ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_FIELD_SUBTOTALNAME, *pSubTotalName); + ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_FIELD_SUBTOTALNAME, *pSubTotalName); } // Level loop outside of maMemberList loop @@ -650,13 +650,13 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWEMPTY)), (bool)nShowEmptyMode ); if ( pSortInfo ) - ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_SORTING, *pSortInfo); + ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_DP_SORTING, *pSortInfo); if ( pAutoShowInfo ) - ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_AUTOSHOW, *pAutoShowInfo); + ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_DP_AUTOSHOW, *pAutoShowInfo); if ( pLayoutInfo ) - ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_LAYOUT, *pLayoutInfo); + ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_DP_LAYOUT, *pLayoutInfo); // exceptions are caught at ScDPSaveData::WriteToSource } @@ -697,7 +697,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD } if (xDimProp.is()) - ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_HAS_HIDDEN_MEMBER, bHasHiddenMember); + ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_HAS_HIDDEN_MEMBER, bHasHiddenMember); } void ScDPSaveDimension::UpdateMemberVisibility(const boost::unordered_map<OUString, bool, OUStringHash>& rData) @@ -1064,7 +1064,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie const OUString* pGrandTotalName = GetGrandTotalName(); if (pGrandTotalName) - ScUnoHelpFunctions::SetOptionalPropertyValue(xSourceProp, SC_UNO_GRANDTOTAL_NAME, *pGrandTotalName); + ScUnoHelpFunctions::SetOptionalPropertyValue(xSourceProp, SC_UNO_DP_GRANDTOTAL_NAME, *pGrandTotalName); } // exceptions in the other calls are errors diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 8b9e4e0bb8af..0894b2e056a2 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -1140,15 +1140,15 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPSource::getPropertySetInfo( static SfxItemPropertyMapEntry aDPSourceMap_Impl[] = { - {MAP_CHAR_LEN(SC_UNO_COLGRAND), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_DATADESC), 0, &getCppuType((rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 }, - {MAP_CHAR_LEN(SC_UNO_IGNOREEM), 0, &getBooleanCppuType(), 0, 0 }, // for sheet data only - {MAP_CHAR_LEN(SC_UNO_REPEATIF), 0, &getBooleanCppuType(), 0, 0 }, // for sheet data only - {MAP_CHAR_LEN(SC_UNO_ROWGRAND), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_ROWFIELDCOUNT), 0, &getCppuType(static_cast<sal_Int32*>(0)), READONLY, 0 }, - {MAP_CHAR_LEN(SC_UNO_COLUMNFIELDCOUNT), 0, &getCppuType(static_cast<sal_Int32*>(0)), READONLY, 0 }, - {MAP_CHAR_LEN(SC_UNO_DATAFIELDCOUNT), 0, &getCppuType(static_cast<sal_Int32*>(0)), READONLY, 0 }, - {MAP_CHAR_LEN(SC_UNO_GRANDTOTAL_NAME), 0, &getCppuType(static_cast<OUString*>(0)), 0, 0 }, + {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_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 }, + {MAP_CHAR_LEN(SC_UNO_DP_DATAFIELDCOUNT), 0, &getCppuType(static_cast<sal_Int32*>(0)), READONLY, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_GRANDTOTAL_NAME), 0, &getCppuType(static_cast<OUString*>(0)), 0, 0 }, {0,0,0,0,0,0} }; static uno::Reference<beans::XPropertySetInfo> aRef = @@ -1162,15 +1162,15 @@ void SAL_CALL ScDPSource::setPropertyValue( const rtl::OUString& aPropertyName, uno::RuntimeException) { String aNameStr = aPropertyName; - if ( aNameStr.EqualsAscii( SC_UNO_COLGRAND ) ) + if ( aNameStr.EqualsAscii( SC_UNO_DP_COLGRAND ) ) setColumnGrand( lcl_GetBoolFromAny( aValue ) ); - else if ( aNameStr.EqualsAscii( SC_UNO_ROWGRAND ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_ROWGRAND ) ) setRowGrand( lcl_GetBoolFromAny( aValue ) ); - else if ( aNameStr.EqualsAscii( SC_UNO_IGNOREEM ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_IGNOREEM ) ) setIgnoreEmptyRows( lcl_GetBoolFromAny( aValue ) ); - else if ( aNameStr.EqualsAscii( SC_UNO_REPEATIF ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_REPEATIF ) ) setRepeatIfEmpty( lcl_GetBoolFromAny( aValue ) ); - else if (aNameStr.EqualsAscii(SC_UNO_GRANDTOTAL_NAME)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_GRANDTOTAL_NAME)) { OUString aName; if (aValue >>= aName) @@ -1189,23 +1189,23 @@ uno::Any SAL_CALL ScDPSource::getPropertyValue( const rtl::OUString& aPropertyNa { uno::Any aRet; String aNameStr = aPropertyName; - if ( aNameStr.EqualsAscii( SC_UNO_COLGRAND ) ) + if ( aNameStr.EqualsAscii( SC_UNO_DP_COLGRAND ) ) lcl_SetBoolInAny( aRet, getColumnGrand() ); - else if ( aNameStr.EqualsAscii( SC_UNO_ROWGRAND ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_ROWGRAND ) ) lcl_SetBoolInAny( aRet, getRowGrand() ); - else if ( aNameStr.EqualsAscii( SC_UNO_IGNOREEM ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_IGNOREEM ) ) lcl_SetBoolInAny( aRet, getIgnoreEmptyRows() ); - else if ( aNameStr.EqualsAscii( SC_UNO_REPEATIF ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_REPEATIF ) ) lcl_SetBoolInAny( aRet, getRepeatIfEmpty() ); - else if ( aNameStr.EqualsAscii( SC_UNO_DATADESC ) ) // read-only + else if ( aNameStr.EqualsAscii( SC_UNO_DP_DATADESC ) ) // read-only aRet <<= rtl::OUString( getDataDescription() ); - else if ( aNameStr.EqualsAscii( SC_UNO_ROWFIELDCOUNT ) ) // read-only + else if ( aNameStr.EqualsAscii( SC_UNO_DP_ROWFIELDCOUNT ) ) // read-only aRet <<= static_cast<sal_Int32>(nRowDimCount); - else if ( aNameStr.EqualsAscii( SC_UNO_COLUMNFIELDCOUNT ) ) // read-only + else if ( aNameStr.EqualsAscii( SC_UNO_DP_COLUMNFIELDCOUNT ) ) // read-only aRet <<= static_cast<sal_Int32>(nColDimCount); - else if ( aNameStr.EqualsAscii( SC_UNO_DATAFIELDCOUNT ) ) // read-only + else if ( aNameStr.EqualsAscii( SC_UNO_DP_DATAFIELDCOUNT ) ) // read-only aRet <<= static_cast<sal_Int32>(nDataDimCount); - else if (aNameStr.EqualsAscii(SC_UNO_GRANDTOTAL_NAME)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_GRANDTOTAL_NAME)) { if (mpGrandTotalName.get()) aRet <<= *mpGrandTotalName; @@ -1538,19 +1538,19 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPDimension::getPropertySetIn static SfxItemPropertyMapEntry aDPDimensionMap_Impl[] = { - {MAP_CHAR_LEN(SC_UNO_FILTER), 0, &getCppuType((uno::Sequence<sheet::TableFilterField>*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_FLAGS), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 }, - {MAP_CHAR_LEN(SC_UNO_FUNCTION), 0, &getCppuType((sheet::GeneralFunction*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_ISDATALA), 0, &getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0 }, - {MAP_CHAR_LEN(SC_UNO_NUMBERFO), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 }, - {MAP_CHAR_LEN(SC_UNO_ORIENTAT), 0, &getCppuType((sheet::DataPilotFieldOrientation*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_ORIGINAL), 0, &getCppuType((uno::Reference<container::XNamed>*)0), beans::PropertyAttribute::READONLY, 0 }, - {MAP_CHAR_LEN(SC_UNO_POSITION), 0, &getCppuType((sal_Int32*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_REFVALUE), 0, &getCppuType((sheet::DataPilotFieldReference*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_USEDHIER), 0, &getCppuType((sal_Int32*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_LAYOUTNAME), 0, &getCppuType(static_cast<rtl::OUString*>(0)), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_FIELD_SUBTOTALNAME), 0, &getCppuType(static_cast<rtl::OUString*>(0)), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_HAS_HIDDEN_MEMBER), 0, &getBooleanCppuType(), 0, 0 }, + {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_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_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_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 }, {0,0,0,0,0,0} }; static uno::Reference<beans::XPropertySetInfo> aRef = @@ -1564,33 +1564,33 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam uno::RuntimeException) { String aNameStr = aPropertyName; - if ( aNameStr.EqualsAscii( SC_UNO_POSITION ) ) + if ( aNameStr.EqualsAscii( SC_UNO_DP_POSITION ) ) { sal_Int32 nInt = 0; if (aValue >>= nInt) setPosition( nInt ); } - else if ( aNameStr.EqualsAscii( SC_UNO_USEDHIER ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_USEDHIER ) ) { sal_Int32 nInt = 0; if (aValue >>= nInt) setUsedHierarchy( nInt ); } - else if ( aNameStr.EqualsAscii( SC_UNO_ORIENTAT ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_ORIENTAT ) ) { sheet::DataPilotFieldOrientation eEnum; if (aValue >>= eEnum) setOrientation( sal::static_int_cast<sal_uInt16>(eEnum) ); } - else if ( aNameStr.EqualsAscii( SC_UNO_FUNCTION ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_FUNCTION ) ) { sheet::GeneralFunction eEnum; if (aValue >>= eEnum) setFunction( sal::static_int_cast<sal_uInt16>(eEnum) ); } - else if ( aNameStr.EqualsAscii( SC_UNO_REFVALUE ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_REFVALUE ) ) aValue >>= aReferenceValue; - else if ( aNameStr.EqualsAscii( SC_UNO_FILTER ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_FILTER ) ) { sal_Bool bDone = false; uno::Sequence<sheet::TableFilterField> aSeq; @@ -1621,19 +1621,19 @@ void SAL_CALL ScDPDimension::setPropertyValue( const rtl::OUString& aPropertyNam } DELETEZ( pSelectedData ); // invalid after changing aSelectedPage } - else if (aNameStr.EqualsAscii(SC_UNO_LAYOUTNAME)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_LAYOUTNAME)) { OUString aTmpName; if (aValue >>= aTmpName) mpLayoutName.reset(new OUString(aTmpName)); } - else if (aNameStr.EqualsAscii(SC_UNO_FIELD_SUBTOTALNAME)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_FIELD_SUBTOTALNAME)) { OUString aTmpName; if (aValue >>= aTmpName) mpSubtotalName.reset(new OUString(aTmpName)); } - else if (aNameStr.EqualsAscii(SC_UNO_HAS_HIDDEN_MEMBER)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_HAS_HIDDEN_MEMBER)) aValue >>= mbHasHiddenMember; else { @@ -1648,25 +1648,25 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert { uno::Any aRet; String aNameStr = aPropertyName; - if ( aNameStr.EqualsAscii( SC_UNO_POSITION ) ) + if ( aNameStr.EqualsAscii( SC_UNO_DP_POSITION ) ) aRet <<= (sal_Int32) getPosition(); - else if ( aNameStr.EqualsAscii( SC_UNO_USEDHIER ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_USEDHIER ) ) aRet <<= (sal_Int32) getUsedHierarchy(); - else if ( aNameStr.EqualsAscii( SC_UNO_ORIENTAT ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_ORIENTAT ) ) { sheet::DataPilotFieldOrientation eVal = (sheet::DataPilotFieldOrientation)getOrientation(); aRet <<= eVal; } - else if ( aNameStr.EqualsAscii( SC_UNO_FUNCTION ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_FUNCTION ) ) { sheet::GeneralFunction eVal = (sheet::GeneralFunction)getFunction(); aRet <<= eVal; } - else if ( aNameStr.EqualsAscii( SC_UNO_REFVALUE ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_REFVALUE ) ) aRet <<= aReferenceValue; - else if ( aNameStr.EqualsAscii( SC_UNO_ISDATALA ) ) // read-only properties + else if ( aNameStr.EqualsAscii( SC_UNO_DP_ISDATALA ) ) // read-only properties lcl_SetBoolInAny( aRet, getIsDataLayoutDimension() ); - else if ( aNameStr.EqualsAscii( SC_UNO_NUMBERFO ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_NUMBERFO ) ) { sal_Int32 nFormat = 0; sheet::GeneralFunction eFunc = (sheet::GeneralFunction)getFunction(); @@ -1692,14 +1692,14 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert aRet <<= nFormat; } - else if ( aNameStr.EqualsAscii( SC_UNO_ORIGINAL ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_ORIGINAL ) ) { uno::Reference<container::XNamed> xOriginal; if (nSourceDim >= 0) xOriginal = pSource->GetDimensionsObject()->getByIndex(nSourceDim); aRet <<= xOriginal; } - else if ( aNameStr.EqualsAscii( SC_UNO_FILTER ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_FILTER ) ) { if ( bHasSelectedPage ) { @@ -1711,13 +1711,13 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert else aRet <<= uno::Sequence<sheet::TableFilterField>(0); } - else if (aNameStr.EqualsAscii(SC_UNO_LAYOUTNAME)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_LAYOUTNAME)) aRet <<= mpLayoutName.get() ? *mpLayoutName : OUString(RTL_CONSTASCII_USTRINGPARAM("")); - else if (aNameStr.EqualsAscii(SC_UNO_FIELD_SUBTOTALNAME)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_FIELD_SUBTOTALNAME)) aRet <<= mpSubtotalName.get() ? *mpSubtotalName : OUString(RTL_CONSTASCII_USTRINGPARAM("")); - else if (aNameStr.EqualsAscii(SC_UNO_HAS_HIDDEN_MEMBER)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_HAS_HIDDEN_MEMBER)) aRet <<= mbHasHiddenMember; - else if (aNameStr.EqualsAscii(SC_UNO_FLAGS)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_FLAGS)) { sal_Int32 nFlags = 0; // tabular data: all orientations are possible aRet <<= nFlags; @@ -2264,11 +2264,11 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPLevel::getPropertySetInfo() static SfxItemPropertyMapEntry aDPLevelMap_Impl[] = { //! change type of AutoShow/Layout/Sorting to API struct when available - {MAP_CHAR_LEN(SC_UNO_AUTOSHOW), 0, &getCppuType((sheet::DataPilotFieldAutoShowInfo*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_LAYOUT), 0, &getCppuType((sheet::DataPilotFieldLayoutInfo*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_SHOWEMPT), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_SORTING), 0, &getCppuType((sheet::DataPilotFieldSortInfo*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_SUBTOTAL), 0, &getCppuType((uno::Sequence<sheet::GeneralFunction>*)0), 0, 0 }, + {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_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} }; static uno::Reference<beans::XPropertySetInfo> aRef = @@ -2282,19 +2282,19 @@ void SAL_CALL ScDPLevel::setPropertyValue( const rtl::OUString& aPropertyName, c uno::RuntimeException) { String aNameStr = aPropertyName; - if ( aNameStr.EqualsAscii( SC_UNO_SHOWEMPT ) ) + if ( aNameStr.EqualsAscii( SC_UNO_DP_SHOWEMPT ) ) setShowEmpty( lcl_GetBoolFromAny( aValue ) ); - else if ( aNameStr.EqualsAscii( SC_UNO_SUBTOTAL ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_SUBTOTAL ) ) { uno::Sequence<sheet::GeneralFunction> aSeq; if ( aValue >>= aSeq ) setSubTotals( aSeq ); } - else if ( aNameStr.EqualsAscii( SC_UNO_SORTING ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_SORTING ) ) aValue >>= aSortInfo; - else if ( aNameStr.EqualsAscii( SC_UNO_AUTOSHOW ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_AUTOSHOW ) ) aValue >>= aAutoShowInfo; - else if ( aNameStr.EqualsAscii( SC_UNO_LAYOUT ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_LAYOUT ) ) aValue >>= aLayoutInfo; else { @@ -2308,20 +2308,20 @@ uno::Any SAL_CALL ScDPLevel::getPropertyValue( const rtl::OUString& aPropertyNam { uno::Any aRet; String aNameStr = aPropertyName; - if ( aNameStr.EqualsAscii( SC_UNO_SHOWEMPT ) ) + if ( aNameStr.EqualsAscii( SC_UNO_DP_SHOWEMPT ) ) lcl_SetBoolInAny( aRet, getShowEmpty() ); - else if ( aNameStr.EqualsAscii( SC_UNO_SUBTOTAL ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_SUBTOTAL ) ) { uno::Sequence<sheet::GeneralFunction> aSeq = getSubTotals(); //! avoid extra copy? aRet <<= aSeq; } - else if ( aNameStr.EqualsAscii( SC_UNO_SORTING ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_SORTING ) ) aRet <<= aSortInfo; - else if ( aNameStr.EqualsAscii( SC_UNO_AUTOSHOW ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_AUTOSHOW ) ) aRet <<= aAutoShowInfo; - else if ( aNameStr.EqualsAscii( SC_UNO_LAYOUT ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_LAYOUT ) ) aRet <<= aLayoutInfo; - else if (aNameStr.EqualsAscii(SC_UNO_LAYOUTNAME)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_LAYOUTNAME)) { // read only property long nSrcDim = pSource->GetSourceDim(nDim); @@ -2745,10 +2745,10 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPMember::getPropertySetInfo( static SfxItemPropertyMapEntry aDPMemberMap_Impl[] = { - {MAP_CHAR_LEN(SC_UNO_ISVISIBL), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_POSITION), 0, &getCppuType((sal_Int32*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_SHOWDETA), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_LAYOUTNAME), 0, &getCppuType(static_cast<rtl::OUString*>(0)), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_ISVISIBL), 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_LAYOUTNAME), 0, &getCppuType(static_cast<rtl::OUString*>(0)), 0, 0 }, {0,0,0,0,0,0} }; static uno::Reference<beans::XPropertySetInfo> aRef = @@ -2762,17 +2762,17 @@ void SAL_CALL ScDPMember::setPropertyValue( const rtl::OUString& aPropertyName, uno::RuntimeException) { String aNameStr = aPropertyName; - if ( aNameStr.EqualsAscii( SC_UNO_ISVISIBL ) ) + if ( aNameStr.EqualsAscii( SC_UNO_DP_ISVISIBL ) ) setIsVisible( lcl_GetBoolFromAny( aValue ) ); - else if ( aNameStr.EqualsAscii( SC_UNO_SHOWDETA ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_SHOWDETA ) ) setShowDetails( lcl_GetBoolFromAny( aValue ) ); - else if ( aNameStr.EqualsAscii( SC_UNO_POSITION ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_POSITION ) ) { sal_Int32 nInt = 0; if (aValue >>= nInt) setPosition( nInt ); } - else if (aNameStr.EqualsAscii(SC_UNO_LAYOUTNAME)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_LAYOUTNAME)) { rtl::OUString aName; if (aValue >>= aName) @@ -2790,13 +2790,13 @@ uno::Any SAL_CALL ScDPMember::getPropertyValue( const rtl::OUString& aPropertyNa { uno::Any aRet; String aNameStr = aPropertyName; - if ( aNameStr.EqualsAscii( SC_UNO_ISVISIBL ) ) + if ( aNameStr.EqualsAscii( SC_UNO_DP_ISVISIBL ) ) lcl_SetBoolInAny( aRet, getIsVisible() ); - else if ( aNameStr.EqualsAscii( SC_UNO_SHOWDETA ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_SHOWDETA ) ) lcl_SetBoolInAny( aRet, getShowDetails() ); - else if ( aNameStr.EqualsAscii( SC_UNO_POSITION ) ) + else if ( aNameStr.EqualsAscii( SC_UNO_DP_POSITION ) ) aRet <<= (sal_Int32) getPosition(); - else if (aNameStr.EqualsAscii(SC_UNO_LAYOUTNAME)) + else if (aNameStr.EqualsAscii(SC_UNO_DP_LAYOUTNAME)) aRet <<= mpLayoutName.get() ? *mpLayoutName : rtl::OUString(); else { diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 15e9fecedd91..a3ab4a1dba7a 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -105,16 +105,16 @@ const SfxItemPropertyMapEntry* lcl_GetDataPilotDescriptorBaseMap() { static SfxItemPropertyMapEntry aDataPilotDescriptorBaseMap_Impl[] = { - {MAP_CHAR_LEN(SC_UNO_COLGRAND), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_DRILLDOWN), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_GRANDTOTAL_NAME),0,&getCppuType((rtl::OUString*)0), beans::PropertyAttribute::MAYBEVOID, 0 }, - {MAP_CHAR_LEN(SC_UNO_IGNEMPROWS), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_IMPORTDESC), 0, &getCppuType((uno::Sequence<beans::PropertyValue>*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_RPTEMPTY), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_ROWGRAND), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_SERVICEARG), 0, &getCppuType((uno::Sequence<beans::PropertyValue>*)0), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_SHOWFILT), 0, &getBooleanCppuType(), 0, 0 }, - {MAP_CHAR_LEN(SC_UNO_SOURCESERV), 0, &getCppuType((rtl::OUString*)0), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_COLGRAND), 0, &getBooleanCppuType(), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_DRILLDOWN), 0, &getBooleanCppuType(), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_GRANDTOTAL_NAME),0,&getCppuType((rtl::OUString*)0), beans::PropertyAttribute::MAYBEVOID, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_IGNEMPROWS), 0, &getBooleanCppuType(), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_IMPORTDESC), 0, &getCppuType((uno::Sequence<beans::PropertyValue>*)0), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_RPTEMPTY), 0, &getBooleanCppuType(), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_ROWGRAND), 0, &getBooleanCppuType(), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_SERVICEARG), 0, &getCppuType((uno::Sequence<beans::PropertyValue>*)0), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_SHOWFILT), 0, &getBooleanCppuType(), 0, 0 }, + {MAP_CHAR_LEN(SC_UNO_DP_SOURCESERV), 0, &getCppuType((rtl::OUString*)0), 0, 0 }, {0,0,0,0,0,0} }; return aDataPilotDescriptorBaseMap_Impl; @@ -383,7 +383,7 @@ bool lcl_IsDuplicated( const Reference<XPropertySet> xDimProps ) { try { - Any aAny = xDimProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_ORIGINAL ) ) ); + Any aAny = xDimProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_ORIGINAL ) ) ); Reference< XNamed > xOriginal( aAny, UNO_QUERY ); return xOriginal.is(); } @@ -402,7 +402,7 @@ OUString lcl_GetOriginalName( const Reference< XNamed > xDim ) { try { - Any aAny = xDimProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_ORIGINAL))); + Any aAny = xDimProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIGINAL))); aAny >>= xOriginal; } catch( Exception& ) @@ -792,37 +792,37 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp ScDPSaveData aNewData( *pOldData ); String aNameString = aPropertyName; - if ( aNameString.EqualsAscii( SC_UNO_COLGRAND ) ) + if ( aNameString.EqualsAscii( SC_UNO_DP_COLGRAND ) ) { aNewData.SetColumnGrand(::cppu::any2bool( aValue )); } - else if ( aNameString.EqualsAscii( SC_UNO_IGNEMPROWS ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_IGNEMPROWS ) ) { aNewData.SetIgnoreEmptyRows(::cppu::any2bool( aValue )); } - else if ( aNameString.EqualsAscii( SC_UNO_RPTEMPTY ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_RPTEMPTY ) ) { aNewData.SetRepeatIfEmpty(::cppu::any2bool( aValue )); } - else if ( aNameString.EqualsAscii( SC_UNO_ROWGRAND ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_ROWGRAND ) ) { aNewData.SetRowGrand(::cppu::any2bool( aValue )); } - else if ( aNameString.EqualsAscii( SC_UNO_SHOWFILT ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_SHOWFILT ) ) { aNewData.SetFilterButton(::cppu::any2bool( aValue )); } - else if ( aNameString.EqualsAscii( SC_UNO_DRILLDOWN ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_DRILLDOWN ) ) { aNewData.SetDrillDown(::cppu::any2bool( aValue )); } - else if ( aNameString.EqualsAscii( SC_UNO_GRANDTOTAL_NAME ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_GRANDTOTAL_NAME ) ) { rtl::OUString aStrVal; if ( aValue >>= aStrVal ) aNewData.SetGrandTotalName(aStrVal); } - else if ( aNameString.EqualsAscii( SC_UNO_IMPORTDESC ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_IMPORTDESC ) ) { uno::Sequence<beans::PropertyValue> aArgSeq; if ( aValue >>= aArgSeq ) @@ -854,7 +854,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp pDPObject->SetImportDesc( aImportDesc ); } } - else if ( aNameString.EqualsAscii( SC_UNO_SOURCESERV ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_SOURCESERV ) ) { rtl::OUString aStrVal; if ( aValue >>= aStrVal ) @@ -871,7 +871,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp pDPObject->SetServiceData( aServiceDesc ); } } - else if ( aNameString.EqualsAscii( SC_UNO_SERVICEARG ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_SERVICEARG ) ) { uno::Sequence<beans::PropertyValue> aArgSeq; if ( aValue >>= aArgSeq ) @@ -890,22 +890,22 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp const beans::PropertyValue& rProp = aArgSeq[nArgPos]; String aPropName(rProp.Name); - if (aPropName.EqualsAscii( SC_UNO_SOURCENAME )) + if (aPropName.EqualsAscii( SC_UNO_DP_SOURCENAME )) { if ( rProp.Value >>= aStrVal ) aServiceDesc.aParSource = aStrVal; } - else if (aPropName.EqualsAscii( SC_UNO_OBJECTNAME )) + else if (aPropName.EqualsAscii( SC_UNO_DP_OBJECTNAME )) { if ( rProp.Value >>= aStrVal ) aServiceDesc.aParName = aStrVal; } - else if (aPropName.EqualsAscii( SC_UNO_USERNAME )) + else if (aPropName.EqualsAscii( SC_UNO_DP_USERNAME )) { if ( rProp.Value >>= aStrVal ) aServiceDesc.aParUser = aStrVal; } - else if (aPropName.EqualsAscii( SC_UNO_PASSWORD )) + else if (aPropName.EqualsAscii( SC_UNO_DP_PASSWORD )) { if ( rProp.Value >>= aStrVal ) aServiceDesc.aParPass = aStrVal; @@ -941,37 +941,37 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope ScDPSaveData aNewData( *pOldData ); String aNameString = aPropertyName; - if ( aNameString.EqualsAscii( SC_UNO_COLGRAND ) ) + if ( aNameString.EqualsAscii( SC_UNO_DP_COLGRAND ) ) { aRet = ::cppu::bool2any( aNewData.GetColumnGrand() ); } - else if ( aNameString.EqualsAscii( SC_UNO_IGNEMPROWS ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_IGNEMPROWS ) ) { aRet = ::cppu::bool2any( aNewData.GetIgnoreEmptyRows() ); } - else if ( aNameString.EqualsAscii( SC_UNO_RPTEMPTY ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_RPTEMPTY ) ) { aRet = ::cppu::bool2any( aNewData.GetRepeatIfEmpty() ); } - else if ( aNameString.EqualsAscii( SC_UNO_ROWGRAND ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_ROWGRAND ) ) { aRet = ::cppu::bool2any( aNewData.GetRowGrand() ); } - else if ( aNameString.EqualsAscii( SC_UNO_SHOWFILT ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_SHOWFILT ) ) { aRet = ::cppu::bool2any( aNewData.GetFilterButton() ); } - else if ( aNameString.EqualsAscii( SC_UNO_DRILLDOWN ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_DRILLDOWN ) ) { aRet = ::cppu::bool2any( aNewData.GetDrillDown() ); } - else if ( aNameString.EqualsAscii( SC_UNO_GRANDTOTAL_NAME ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_GRANDTOTAL_NAME ) ) { const rtl::OUString* pGrandTotalName = aNewData.GetGrandTotalName(); if (pGrandTotalName) aRet <<= *pGrandTotalName; // same behavior as in ScDPSource } - else if ( aNameString.EqualsAscii( SC_UNO_IMPORTDESC ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_IMPORTDESC ) ) { const ScImportSourceDesc* pImportDesc = pDPObject->GetImportSourceDesc(); if ( pImportDesc ) @@ -996,7 +996,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope aRet <<= aEmpty; } } - else if ( aNameString.EqualsAscii( SC_UNO_SOURCESERV ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_SOURCESERV ) ) { rtl::OUString aServiceName; const ScDPServiceDesc* pServiceDesc = pDPObject->GetDPServiceDesc(); @@ -1004,20 +1004,20 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope aServiceName = pServiceDesc->aServiceName; aRet <<= aServiceName; // empty string if no ServiceDesc set } - else if ( aNameString.EqualsAscii( SC_UNO_SERVICEARG ) ) + else if ( aNameString.EqualsAscii( SC_UNO_DP_SERVICEARG ) ) { const ScDPServiceDesc* pServiceDesc = pDPObject->GetDPServiceDesc(); if (pServiceDesc) { uno::Sequence<beans::PropertyValue> aSeq( 4 ); beans::PropertyValue* pArray = aSeq.getArray(); - pArray[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SOURCENAME )); + pArray[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_SOURCENAME )); pArray[0].Value <<= pServiceDesc->aParSource; - pArray[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_OBJECTNAME )); + pArray[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_OBJECTNAME )); pArray[1].Value <<= pServiceDesc->aParName; - pArray[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_USERNAME )); + pArray[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_USERNAME )); pArray[2].Value <<= pServiceDesc->aParUser; - pArray[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_PASSWORD )); + pArray[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_PASSWORD )); pArray[3].Value <<= pServiceDesc->aParPass; aRet <<= aSeq; } @@ -1606,7 +1606,7 @@ sal_Int32 lcl_GetFieldCount( const Reference<XDimensionsSupplier>& rSource, cons for (sal_Int32 i = 0; i < nIntCount; ++i) { xDim.set(xIntDims->getByIndex(i), UNO_QUERY); - if (xDim.is() && (xDim->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_ORIENTAT))) == rOrient)) + if (xDim.is() && (xDim->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTAT))) == rOrient)) ++nRet; } } @@ -1646,7 +1646,7 @@ sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, while (i < nIntCount && !bOk) { xDim.set(xIntDims->getByIndex(i), UNO_QUERY); - if (xDim.is() && (xDim->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_ORIENTAT))) == rOrient)) + if (xDim.is() && (xDim->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTAT))) == rOrient)) { if (nPos == nIndex) { @@ -1688,7 +1688,7 @@ sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, OUString sOriginalName( lcl_GetOriginalName( xDimName ) ); rFieldId.maFieldName = sOriginalName; rFieldId.mbDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDim, - OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_ISDATALA)) ); + OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALA)) ); sal_Int32 nRepeat = 0; if ( rOrient.hasValue() && lcl_IsDuplicated( xDim ) ) @@ -3505,7 +3505,7 @@ Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName { Reference< XPropertySet > xMemberProps( xMember, UNO_QUERY ); if( xMemberProps.is() ) - aRet = xMemberProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SHOWDETA ) ) ); + aRet = xMemberProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_SHOWDETA ) ) ); else aRet <<= true; } @@ -3520,7 +3520,7 @@ Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName { Reference< XPropertySet > xMemberProps( xMember, UNO_QUERY ); if( xMemberProps.is() ) - aRet <<= !cppu::any2bool( xMemberProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_ISVISIBL ) ) ) ); + aRet <<= !cppu::any2bool( xMemberProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_ISVISIBL ) ) ) ); else aRet <<= false; } diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index 8dd97ef0e340..13bf8f84aac9 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -376,7 +376,7 @@ ScVbaFormat<Ifc1>::getNumberFormatLocal( ) throw (script::BasicErrorException, uno::Any aRet = uno::makeAny( rtl::OUString() ); try { - rtl::OUString sPropName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_NUMBERFO ) ); + rtl::OUString sPropName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_NUMBERFO ) ); if (!isAmbiguous( sPropName )) { @@ -412,7 +412,7 @@ ScVbaFormat<Ifc1>::setNumberFormat( lang::Locale _aLocale, const rtl::OUString& { xNumberFormats->addNew(_sFormatString, _aLocale); } - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_NUMBERFO ) ), uno::makeAny( nFormat ) ); + mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_NUMBERFO ) ), uno::makeAny( nFormat ) ); } catch (const uno::Exception& ) { @@ -428,7 +428,7 @@ ScVbaFormat<Ifc1>::setNumberFormatLocal( const uno::Any& _oLocalFormatString ) t { rtl::OUString sLocalFormatString; sal_Int32 nFormat = -1; - rtl::OUString sNumFormat( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_NUMBERFO ) ); + rtl::OUString sNumFormat( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_NUMBERFO ) ); if ( !(_oLocalFormatString >>= sLocalFormatString ) || !( mxPropertySet->getPropertyValue(sNumFormat) >>= nFormat ) ) throw uno::RuntimeException(); @@ -471,7 +471,7 @@ ScVbaFormat<Ifc1>::setNumberFormat( const uno::Any& _oFormatString ) throw (scri lang::Locale aRangeLocale; xNumberFormats->getByKey(nFormat)->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( LOCALE ) ) ) >>= aRangeLocale; sal_Int32 nNewFormat = xNumberFormatTypes->getFormatForLocale(nFormat, aRangeLocale); - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_NUMBERFO ) ), uno::makeAny( nNewFormat)); + mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_NUMBERFO ) ), uno::makeAny( nNewFormat)); } catch (const uno::Exception& ) { @@ -742,7 +742,7 @@ ScVbaFormat< Ifc1 >::getNumberFormat( ) throw (script::BasicErrorException, uno try { sal_Int32 nFormat = -1; - rtl::OUString sNumFormat( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_NUMBERFO ) ); + rtl::OUString sNumFormat( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_DP_NUMBERFO ) ); if (!isAmbiguous(sNumFormat) && ( mxPropertySet->getPropertyValue(sNumFormat) >>= nFormat) ) { diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 45e312631256..01a75631c844 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -2132,7 +2132,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet if (!xPropSet.is()) continue; - Any any = xPropSet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_NUMBERFO)) ); + Any any = xPropSet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_NUMBERFO)) ); sal_Int32 nNumFmt = 0; if (!(any >>= nNumFmt)) continue; |