[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Nov 10 19:00:18 PST 2010
sc/source/core/data/documen5.cxx | 9 +---
sc/source/core/data/documen6.cxx | 3 -
sc/source/core/data/dpobject.cxx | 73 ++++++++++++++++------------------
sc/source/core/data/dpoutput.cxx | 11 ++---
sc/source/core/data/dpsave.cxx | 28 ++++++-------
sc/source/core/data/dpsdbtab.cxx | 13 ++----
sc/source/core/data/dptabsrc.cxx | 4 -
sc/source/core/data/globalx.cxx | 2
sc/source/core/data/table3.cxx | 2
sc/source/core/data/tabprotection.cxx | 5 --
10 files changed, 71 insertions(+), 79 deletions(-)
New commits:
commit 3a40dce81ead2d9af2cc591ca19b1deebfb02834
Author: julien <serval2412 at yahoo.fr>
Date: Wed Nov 10 21:59:31 2010 -0500
Replaced OUString::createFromAscii() with RTL_CONSTASCII_USTRINGPARAM.
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 8e6bed0..a25d660 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -113,16 +113,16 @@ void lcl_SetChartParameters( const uno::Reference< chart2::data::XDataReceiver >
{
uno::Sequence< beans::PropertyValue > aArgs( 4 );
aArgs[0] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellRangeRepresentation")), -1,
uno::makeAny( rRanges ), beans::PropertyState_DIRECT_VALUE );
aArgs[1] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("HasCategories"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasCategories")), -1,
uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE );
aArgs[2] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstCellAsLabel")), -1,
uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE );
aArgs[3] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("DataRowSource"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataRowSource")), -1,
uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE );
xReceiver->setArguments( aArgs );
}
@@ -783,5 +783,4 @@ void ScDocument::AddOLEObjectToCollection(const String& rName)
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index 3cfc6a2..d9601a1 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -63,7 +63,7 @@ const uno::Reference< i18n::XBreakIterator >& ScDocument::GetBreakIterator()
if ( !pScriptTypeData->xBreakIter.is() )
{
uno::Reference< uno::XInterface > xInterface = xServiceManager->createInstance(
- ::rtl::OUString::createFromAscii( SC_BREAKITER_SERVICE ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_BREAKITER_SERVICE )) );
pScriptTypeData->xBreakIter = uno::Reference< i18n::XBreakIterator >( xInterface, uno::UNO_QUERY );
DBG_ASSERT( pScriptTypeData->xBreakIter.is(), "can't get BreakIterator" );
}
@@ -182,5 +182,4 @@ BYTE ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*
return GetCellScriptType( pCell, nFormat );
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index f235676..ef236dd 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -149,11 +149,11 @@ USHORT lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSupplie
if ( xDimProp.is() )
{
bFound = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
if (bFound)
nRet = ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
}
}
@@ -687,11 +687,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::createFromAscii(SC_UNO_ISVISIBL));
- aMem.mbShowDetails = ScUnoHelpFunctions::GetBoolProperty(xMemProp, OUString::createFromAscii(SC_UNO_SHOWDETA));
+ 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.maLayoutName = ScUnoHelpFunctions::GetStringProperty(
- xMemProp, OUString::createFromAscii(SC_UNO_LAYOUTNAME), OUString());
+ xMemProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_LAYOUTNAME)), OUString());
}
aMembers.push_back(aMem);
@@ -841,7 +841,7 @@ bool ScDPObject::IsDimNameInUse(const OUString& rName) const
continue;
OUString aLayoutName = ScUnoHelpFunctions::GetStringProperty(
- xPropSet, OUString::createFromAscii(SC_UNO_LAYOUTNAME), OUString());
+ xPropSet, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_LAYOUTNAME)), OUString());
if (aLayoutName.equalsIgnoreAsciiCase(rName))
return true;
}
@@ -867,7 +867,7 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags
if ( xDimName.is() && xDimProp.is() )
{
BOOL bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
rtl::OUString aName;
@@ -885,7 +885,7 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags
if (pFlags)
*pFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString::createFromAscii(SC_UNO_FLAGS), 0 );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_FLAGS)), 0 );
}
}
}
@@ -911,7 +911,7 @@ BOOL ScDPObject::IsDuplicated( long nDim )
try
{
uno::Any aOrigAny = xDimProp->getPropertyValue(
- rtl::OUString::createFromAscii(DP_PROP_ORIGINAL) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIGINAL)) );
uno::Reference<uno::XInterface> xIntOrig;
if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() )
bDuplicated = TRUE;
@@ -967,7 +967,7 @@ void ScDPObject::FillPageList( TypedScStrCollection& rStrings, long nField )
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
long nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_USEDHIERARCHY) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
long nLevel = 0;
long nHierCount = 0;
@@ -1017,7 +1017,7 @@ void ScDPObject::FillPageList( TypedScStrCollection& rStrings, long nField )
sal_Bool bVisible = false;
if (xPropSet.is())
{
- Any any = xPropSet->getPropertyValue(OUString::createFromAscii(SC_UNO_ISVISIBL));
+ Any any = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_ISVISIBL)));
any >>= bVisible;
}
@@ -1340,9 +1340,9 @@ BOOL ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
uno::Reference<sheet::XHierarchiesSupplier> xDimSupp( xDim, uno::UNO_QUERY );
BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
sal_Int32 nOrient = ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( !bDataLayout )
{
@@ -1360,7 +1360,7 @@ BOOL ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
uno::Reference<container::XIndexAccess> xHiers = new ScNameToIndexAccess( xDimSupp->getHierarchies() );
sal_Int32 nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_USEDHIERARCHY) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
if ( nHierarchy >= xHiers->getCount() )
nHierarchy = 0;
@@ -1550,7 +1550,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
if (bDataLayout)
{
// the elements of the data layout dimension can't be found by their names
@@ -1608,7 +1608,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
if ( xMbrProp.is() )
{
bShowDetails = ScUnoHelpFunctions::GetBoolProperty( xMbrProp,
- rtl::OUString::createFromAscii(DP_PROP_SHOWDETAILS) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWDETAILS)) );
//! don't set bFound if property is unknown?
bFound = TRUE;
}
@@ -1656,7 +1656,7 @@ USHORT lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp )
{
uno::Reference<container::XIndexAccess> xHiers = new ScNameToIndexAccess( xDimSupp->getHierarchies() );
long nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_USEDHIERARCHY) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
if ( nHierarchy >= xHiers->getCount() )
nHierarchy = 0;
@@ -1675,7 +1675,7 @@ USHORT lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& xDimProp )
try
{
aSubAny = xLevProp->getPropertyValue(
- rtl::OUString::createFromAscii(DP_PROP_SUBTOTALS) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SUBTOTALS)) );
}
catch(uno::Exception&)
{
@@ -1736,7 +1736,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
ScUnoHelpFunctions::AnyToInterface( xDims->getByIndex(nDim) );
uno::Reference<beans::XPropertySet> xDimProp( xIntDim, uno::UNO_QUERY );
long nDimOrient = ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( xDimProp.is() && nDimOrient == nOrient )
{
@@ -1744,7 +1744,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
if ( nOrient == sheet::DataPilotFieldOrientation_DATA )
{
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString::createFromAscii(DP_PROP_FUNCTION),
+ xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_FUNCTION)),
sheet::GeneralFunction_NONE );
if ( eFunc == sheet::GeneralFunction_AUTO )
{
@@ -1757,12 +1757,12 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
nMask = lcl_FirstSubTotal( xDimProp ); // from first hierarchy
BOOL bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
uno::Any aOrigAny;
try
{
aOrigAny = xDimProp->getPropertyValue(
- rtl::OUString::createFromAscii(DP_PROP_ORIGINAL) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIGINAL)) );
}
catch(uno::Exception&)
{
@@ -1816,7 +1816,7 @@ SCSIZE lcl_FillOldFields( PivotField* pFields,
pFields[nOutCount].nFuncMask = nMask;
pFields[nOutCount].nFuncCount = lcl_CountBits( nMask );
aPos[nOutCount] = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_POSITION) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_POSITION)) );
try
{
@@ -1892,15 +1892,15 @@ BOOL ScDPObject::FillOldParam(ScPivotParam& rParam, BOOL bForFile) const
try
{
rParam.bMakeTotalCol = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND), TRUE );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_COLUMNGRAND)), TRUE );
rParam.bMakeTotalRow = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString::createFromAscii(DP_PROP_ROWGRAND), TRUE );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ROWGRAND)), TRUE );
// following properties may be missing for external sources
rParam.bIgnoreEmptyRows = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString::createFromAscii(DP_PROP_IGNOREEMPTY) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_IGNOREEMPTY)) );
rParam.bDetectCategories = ScUnoHelpFunctions::GetBoolProperty( xProp,
- rtl::OUString::createFromAscii(DP_PROP_REPEATIFEMPTY) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_REPEATIFEMPTY)) );
}
catch(uno::Exception&)
{
@@ -1917,7 +1917,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::createFromAscii(DP_PROP_USEDHIERARCHY) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
if ( nHierarchy >= xHiers->getCount() )
nHierarchy = 0;
rData.mnUsedHier = nHierarchy;
@@ -1935,7 +1935,7 @@ void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans::XProp
if ( xLevProp.is() )
{
rData.mbShowAll = ScUnoHelpFunctions::GetBoolProperty( xLevProp,
- rtl::OUString::createFromAscii(DP_PROP_SHOWEMPTY) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWEMPTY)) );
try
{
@@ -1980,7 +1980,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
{
BOOL bDuplicated = FALSE;
BOOL bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
try
@@ -1988,7 +1988,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
aFieldName = String( xDimName->getName() );
uno::Any aOrigAny = xDimProp->getPropertyValue(
- rtl::OUString::createFromAscii(DP_PROP_ORIGINAL) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIGINAL)) );
uno::Reference<uno::XInterface> xIntOrig;
if ( (aOrigAny >>= xIntOrig) && xIntOrig.is() )
bDuplicated = TRUE;
@@ -1998,7 +1998,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
}
OUString aLayoutName = ScUnoHelpFunctions::GetStringProperty(
- xDimProp, OUString::createFromAscii(SC_UNO_LAYOUTNAME), OUString());
+ xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_LAYOUTNAME)), OUString());
if ( aFieldName.Len() && !bData && !bDuplicated )
{
@@ -2011,7 +2011,7 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
GetMembers(nDim, GetUsedHierarchy(nDim), pNewLabel->maMembers);
lcl_FillLabelData(*pNewLabel, xDimProp);
pNewLabel->mnFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString::createFromAscii(SC_UNO_FLAGS), 0 );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_FLAGS)), 0 );
rParam.maLabelArray.push_back(pNewLabel);
}
}
@@ -2278,7 +2278,7 @@ BOOL ScDPObject::HasRegisteredSources()
if ( xEnAc.is() )
{
uno::Reference<container::XEnumeration> xEnum = xEnAc->createContentEnumeration(
- rtl::OUString::createFromAscii( SCDPSOURCE_SERVICE ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SCDPSOURCE_SERVICE )) );
if ( xEnum.is() && xEnum->hasMoreElements() )
bFound = TRUE;
}
@@ -2299,7 +2299,7 @@ uno::Sequence<rtl::OUString> ScDPObject::GetRegisteredSources()
if ( xEnAc.is() )
{
uno::Reference<container::XEnumeration> xEnum = xEnAc->createContentEnumeration(
- rtl::OUString::createFromAscii( SCDPSOURCE_SERVICE ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SCDPSOURCE_SERVICE )) );
if ( xEnum.is() )
{
while ( xEnum->hasMoreElements() )
@@ -2343,7 +2343,7 @@ uno::Reference<sheet::XDimensionsSupplier> ScDPObject::CreateSource( const ScDPS
if ( xEnAc.is() )
{
uno::Reference<container::XEnumeration> xEnum = xEnAc->createContentEnumeration(
- rtl::OUString::createFromAscii( SCDPSOURCE_SERVICE ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SCDPSOURCE_SERVICE )) );
if ( xEnum.is() )
{
while ( xEnum->hasMoreElements() && !xRet.is() )
@@ -2641,5 +2641,4 @@ bool ScDPCollection::HasDPTable(SCCOL nCol, SCROW nRow, SCTAB nTab) const
return pMergeAttr->HasDPTable();
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 9cf9ce2..d0d33ad 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -410,7 +410,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::createFromAscii(SC_UNO_HAS_HIDDEN_MEMBER));
+ xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_HAS_HIDDEN_MEMBER)));
if ( eDimOrient != sheet::DataPilotFieldOrientation_HIDDEN )
{
@@ -447,7 +447,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::createFromAscii(SC_UNO_LAYOUTNAME), aName );
+ OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_LAYOUTNAME)), aName );
bool bRowFieldHasMember = false;
switch ( eDimOrient )
@@ -546,7 +546,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
try
{
uno::Any aAny = xSrcProp->getPropertyValue(
- rtl::OUString::createFromAscii(SC_UNO_DATADESC) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DATADESC)) );
rtl::OUString aUStr;
aAny >>= aUStr;
aDataDescription = String( aUStr );
@@ -1188,7 +1188,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa
if (xPropSet.is())
{
sal_Int32 nDataFieldCount = ScUnoHelpFunctions::GetLongProperty( xPropSet,
- rtl::OUString::createFromAscii(SC_UNO_DATAFIELDCOUNT) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DATAFIELDCOUNT)) );
if (nDataFieldCount > 0)
aResData.DataFieldIndex = (nRow - nDataStartRow) % nDataFieldCount;
}
@@ -1270,7 +1270,7 @@ bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>&
return false;
sal_Int32 nDataFieldCount = ScUnoHelpFunctions::GetLongProperty( xPropSet,
- rtl::OUString::createFromAscii(SC_UNO_DATAFIELDCOUNT) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DATAFIELDCOUNT)) );
if (nDataFieldCount == 0)
// No data field is present in this datapilot table.
return false;
@@ -2059,5 +2059,4 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index eb44740..e3c6aee 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -178,11 +178,11 @@ void ScDPSaveMember::WriteToSource( const uno::Reference<uno::XInterface>& xMemb
if ( nVisibleMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xMembProp,
- rtl::OUString::createFromAscii(DP_PROP_ISVISIBLE), (BOOL)nVisibleMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISVISIBLE)), (BOOL)nVisibleMode );
if ( nShowDetailsMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xMembProp,
- rtl::OUString::createFromAscii(DP_PROP_SHOWDETAILS), (BOOL)nShowDetailsMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWDETAILS)), (BOOL)nShowDetailsMode );
if (mpLayoutName.get())
ScUnoHelpFunctions::SetOptionalPropertyValue(xMembProp, SC_UNO_LAYOUTNAME, *mpLayoutName);
@@ -569,22 +569,22 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
sheet::DataPilotFieldOrientation eOrient = (sheet::DataPilotFieldOrientation)nOrientation;
aAny <<= eOrient;
- xDimProp->setPropertyValue( rtl::OUString::createFromAscii(DP_PROP_ORIENTATION), aAny );
+ xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)), aAny );
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)nFunction;
aAny <<= eFunc;
- xDimProp->setPropertyValue( rtl::OUString::createFromAscii(DP_PROP_FUNCTION), aAny );
+ xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_FUNCTION)), aAny );
if ( nUsedHierarchy >= 0 )
{
aAny <<= (INT32)nUsedHierarchy;
- xDimProp->setPropertyValue( rtl::OUString::createFromAscii(DP_PROP_USEDHIERARCHY), aAny );
+ xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)), aAny );
}
if ( pReferenceValue )
{
aAny <<= *pReferenceValue;
- xDimProp->setPropertyValue( rtl::OUString::createFromAscii(SC_UNO_REFVALUE), aAny );
+ xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_REFVALUE)), aAny );
}
uno::Sequence<sheet::TableFilterField> aFilter;
@@ -657,11 +657,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::createFromAscii(DP_PROP_SUBTOTALS), aAny );
+ xLevProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SUBTOTALS)), aAny );
}
if ( nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xLevProp,
- rtl::OUString::createFromAscii(DP_PROP_SHOWEMPTY), (BOOL)nShowEmptyMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SHOWEMPTY)), (BOOL)nShowEmptyMode );
if ( pSortInfo )
ScUnoHelpFunctions::SetOptionalPropertyValue(xLevProp, SC_UNO_SORTING, *pSortInfo);
@@ -1066,7 +1066,7 @@ void lcl_ResetOrient( const uno::Reference<sheet::XDimensionsSupplier>& xSource
{
uno::Any aAny;
aAny <<= eOrient;
- xDimProp->setPropertyValue( rtl::OUString::createFromAscii(DP_PROP_ORIENTATION), aAny );
+ xDimProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)), aAny );
}
}
}
@@ -1089,10 +1089,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
{
if ( nIgnoreEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString::createFromAscii(DP_PROP_IGNOREEMPTY), (BOOL)nIgnoreEmptyMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_IGNOREEMPTY)), (BOOL)nIgnoreEmptyMode );
if ( nRepeatEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString::createFromAscii(DP_PROP_REPEATIFEMPTY), (BOOL)nRepeatEmptyMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_REPEATIFEMPTY)), (BOOL)nRepeatEmptyMode );
}
catch(uno::Exception&)
{
@@ -1139,7 +1139,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
if ( xDimProp.is() )
{
bFound = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
//! error checking -- is "IsDataLayoutDimension" property required??
}
}
@@ -1184,10 +1184,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
{
if ( nColumnGrandMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND), (BOOL)nColumnGrandMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_COLUMNGRAND)), (BOOL)nColumnGrandMode );
if ( nRowGrandMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xSourceProp,
- rtl::OUString::createFromAscii(DP_PROP_ROWGRAND), (BOOL)nRowGrandMode );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ROWGRAND)), (BOOL)nRowGrandMode );
}
}
catch(uno::Exception&)
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index 162de21..c956cc7 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -130,7 +130,7 @@ ScDPTableDataCache* ScImportSourceDesc::CreateCache( ScDocument* pDoc , long nID
{
xRowSet = uno::Reference<sdbc::XRowSet>(
comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString::createFromAscii( SC_SERVICE_ROWSET ) ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_ROWSET )) ),
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY );
DBG_ASSERT( xRowProp.is(), "can't get RowSet" );
@@ -142,22 +142,22 @@ ScDPTableDataCache* ScImportSourceDesc::CreateCache( ScDocument* pDoc , long nID
uno::Any aAny;
aAny <<= rtl::OUString( aDBName );
xRowProp->setPropertyValue(
- rtl::OUString::createFromAscii(SC_DBPROP_DATASOURCENAME), aAny );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_DATASOURCENAME)), aAny );
aAny <<= rtl::OUString( aObject );
xRowProp->setPropertyValue(
- rtl::OUString::createFromAscii(SC_DBPROP_COMMAND), aAny );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMAND)), aAny );
aAny <<= nSdbType;
xRowProp->setPropertyValue(
- rtl::OUString::createFromAscii(SC_DBPROP_COMMANDTYPE), aAny );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMANDTYPE)), aAny );
uno::Reference<sdb::XCompletedExecution> xExecute( xRowSet, uno::UNO_QUERY );
if ( xExecute.is() )
{
uno::Reference<task::XInteractionHandler> xHandler(
comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString::createFromAscii( SC_SERVICE_INTHANDLER ) ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_INTHANDLER )) ),
uno::UNO_QUERY);
xExecute->executeWithCompletion( xHandler );
}
@@ -308,7 +308,4 @@ const ScDPCacheTable& ScDatabaseDPData::GetCacheTable() const
// -----------------------------------------------------------------------
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index f6ef0df..a299def 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1732,9 +1732,9 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert
aRet <<= uno::Sequence<sheet::TableFilterField>(0);
}
else if (aNameStr.EqualsAscii(SC_UNO_LAYOUTNAME))
- aRet <<= mpLayoutName.get() ? *mpLayoutName : OUString::createFromAscii("");
+ aRet <<= mpLayoutName.get() ? *mpLayoutName : OUString(RTL_CONSTASCII_USTRINGPARAM(""));
else if (aNameStr.EqualsAscii(SC_UNO_FIELD_SUBTOTALNAME))
- aRet <<= mpSubtotalName.get() ? *mpSubtotalName : OUString::createFromAscii("");
+ aRet <<= mpSubtotalName.get() ? *mpSubtotalName : OUString(RTL_CONSTASCII_USTRINGPARAM(""));
else if (aNameStr.EqualsAscii(SC_UNO_HAS_HIDDEN_MEMBER))
aRet <<= mbHasHiddenMember;
else if (aNameStr.EqualsAscii(SC_UNO_FLAGS))
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx
index 6fb5a50..4a7d9c8 100644
--- a/sc/source/core/data/globalx.cxx
+++ b/sc/source/core/data/globalx.cxx
@@ -146,7 +146,7 @@ String ScGlobal::GetOrdinalSuffix( sal_Int32 nNumber)
::comphelper::getProcessServiceFactory();
Reference< XInterface > xInterface =
xServiceManager->createInstance(
- ::rtl::OUString::createFromAscii("com.sun.star.i18n.OrdinalSuffix"));
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.OrdinalSuffix")));
if (xInterface.is())
xOrdinalSuffix = Reference< i18n::XOrdinalSuffix >( xInterface, UNO_QUERY);
}
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index c02939c..24eef6a 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -93,7 +93,7 @@ bool SplitString( const rtl::OUString &sWhole,
i18n::LocaleDataItem aLocaleItem = ScGlobal::pLocaleData->getLocaleItem();
// Get prefix element
- rtl::OUString sEmpty, sUser = rtl::OUString::createFromAscii( "-" );
+ rtl::OUString sEmpty, sUser = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-" ));
ParseResult aPRPre = ScGlobal::pCharClass->parsePredefinedToken(
KParseType::IDENTNAME, sWhole, 0,
KParseTokens::ANY_LETTER, sUser, KParseTokens::ANY_LETTER, sUser );
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index f3e8734..70ec0cf 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -81,9 +81,9 @@ OUString ScPassHashHelper::getHashURI(ScPasswordHash eHash)
switch (eHash)
{
case PASSHASH_SHA1:
- return OUString::createFromAscii(URI_SHA1);
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(URI_SHA1));
case PASSHASH_XL:
- return OUString::createFromAscii(URI_XLS_LEGACY);
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(URI_XLS_LEGACY));
case PASSHASH_UNSPECIFIED:
default:
;
@@ -522,5 +522,4 @@ void ScTableProtection::setOption(Option eOption, bool bEnabled)
{
mpImpl->setOption(eOption, bEnabled);
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list