summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-22 12:41:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-22 12:37:51 +0000
commite010834dc1a82fcb80dc23025001a752a0fb60a4 (patch)
tree16d3256e1b9965486f7540ffb7133274575de516 /ucb
parent6a18fdceb5e6a2f2f9029ec767b405b4475a19e0 (diff)
remove some more global OUStrings
Change-Id: Ic02754f98bfda3b7cd8c06857123d363a96e8d0e Reviewed-on: https://gerrit.libreoffice.org/31071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx61
-rw-r--r--ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx27
-rw-r--r--ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.hxx15
3 files changed, 38 insertions, 65 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 6b0a8fc7fc6d..44e9aa78ab43 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -376,12 +376,6 @@ class CCRS_PropertySetInfo :
Sequence< css::beans::Property >*
m_pProperties;
- //some helping variables ( names for my special properties )
- static OUString m_aPropertyNameForCount;
- static OUString m_aPropertyNameForFinalCount;
- static OUString m_aPropertyNameForFetchSize;
- static OUString m_aPropertyNameForFetchDirection;
-
long m_nFetchSizePropertyHandle;
long m_nFetchDirectionPropertyHandle;
@@ -433,10 +427,11 @@ public:
throw( RuntimeException, std::exception ) override;
};
-OUString CCRS_PropertySetInfo::m_aPropertyNameForCount( "RowCount" );
-OUString CCRS_PropertySetInfo::m_aPropertyNameForFinalCount( "IsRowCountFinal" );
-OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchSize( "FetchSize" );
-OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchDirection( "FetchDirection" );
+//some helping variables ( names for my special properties )
+static const char g_sPropertyNameForCount[] = "RowCount";
+static const char g_sPropertyNameForFinalCount[] = "IsRowCountFinal";
+static const char g_sPropertyNameForFetchSize[] = "FetchSize";
+static const char g_sPropertyNameForFetchDirection[] = "FetchDirection";
CCRS_PropertySetInfo::CCRS_PropertySetInfo(
Reference< XPropertySetInfo > const & xInfo )
@@ -447,8 +442,8 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
//initialize list of properties:
// it is required, that the received xInfo contains the two
- // properties with names 'm_aPropertyNameForCount' and
- // 'm_aPropertyNameForFinalCount'
+ // properties with names 'g_sPropertyNameForCount' and
+ // 'g_sPropertyNameForFinalCount'
if( xInfo.is() )
{
@@ -462,8 +457,8 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
}
//ensure, that we haven't got the Properties 'FetchSize' and 'Direction' twice:
- sal_Int32 nFetchSize = impl_getPos( m_aPropertyNameForFetchSize );
- sal_Int32 nFetchDirection = impl_getPos( m_aPropertyNameForFetchDirection );
+ sal_Int32 nFetchSize = impl_getPos( g_sPropertyNameForFetchSize );
+ sal_Int32 nFetchDirection = impl_getPos( g_sPropertyNameForFetchDirection );
sal_Int32 nDeleted = 0;
if( nFetchSize != -1 )
nDeleted++;
@@ -483,7 +478,7 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
}
{
Property& rMyProp = (*m_pProperties)[ nOrigProps - nDeleted ];
- rMyProp.Name = m_aPropertyNameForFetchSize;
+ rMyProp.Name = g_sPropertyNameForFetchSize;
rMyProp.Type = cppu::UnoType<sal_Int32>::get();
rMyProp.Attributes = PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT;
@@ -497,7 +492,7 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
}
{
Property& rMyProp = (*m_pProperties)[ nOrigProps - nDeleted + 1 ];
- rMyProp.Name = m_aPropertyNameForFetchDirection;
+ rMyProp.Name = g_sPropertyNameForFetchDirection;
rMyProp.Type = cppu::UnoType<sal_Bool>::get();
rMyProp.Attributes = PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT;
@@ -619,10 +614,10 @@ bool SAL_CALL CCRS_PropertySetInfo
bool SAL_CALL CCRS_PropertySetInfo
::impl_isMyPropertyName( const OUString& rPropertyName )
{
- return ( rPropertyName == m_aPropertyNameForCount
- || rPropertyName == m_aPropertyNameForFinalCount
- || rPropertyName == m_aPropertyNameForFetchSize
- || rPropertyName == m_aPropertyNameForFetchDirection );
+ return ( rPropertyName == g_sPropertyNameForCount
+ || rPropertyName == g_sPropertyNameForFinalCount
+ || rPropertyName == g_sPropertyNameForFetchSize
+ || rPropertyName == g_sPropertyNameForFetchDirection );
}
sal_Int32 SAL_CALL CCRS_PropertySetInfo
@@ -1027,8 +1022,7 @@ void SAL_CALL CachedContentResultSet
//'RowCount' and 'IsRowCountFinal' are readonly!
throw IllegalArgumentException();
}
- if( aProp.Name == CCRS_PropertySetInfo
- ::m_aPropertyNameForFetchDirection )
+ if( aProp.Name == g_sPropertyNameForFetchDirection )
{
//check value
sal_Int32 nNew;
@@ -1065,8 +1059,7 @@ void SAL_CALL CachedContentResultSet
//send PropertyChangeEvent to listeners
impl_notifyPropertyChangeListeners( aEvt );
}
- else if( aProp.Name == CCRS_PropertySetInfo
- ::m_aPropertyNameForFetchSize )
+ else if( aProp.Name == g_sPropertyNameForFetchSize )
{
//check value
sal_Int32 nNew;
@@ -1133,22 +1126,22 @@ Any SAL_CALL CachedContentResultSet
//throws UnknownPropertyException, if so
Any aValue;
- if( rPropertyName == CCRS_PropertySetInfo::m_aPropertyNameForCount )
+ if( rPropertyName == g_sPropertyNameForCount )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
aValue <<= m_nKnownCount;
}
- else if( rPropertyName == CCRS_PropertySetInfo::m_aPropertyNameForFinalCount )
+ else if( rPropertyName == g_sPropertyNameForFinalCount )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
aValue <<= m_bFinalCount;
}
- else if( rPropertyName == CCRS_PropertySetInfo::m_aPropertyNameForFetchSize )
+ else if( rPropertyName == g_sPropertyNameForFetchSize )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
aValue <<= m_nFetchSize;
}
- else if( rPropertyName == CCRS_PropertySetInfo::m_aPropertyNameForFetchDirection )
+ else if( rPropertyName == g_sPropertyNameForFetchDirection )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
aValue <<= m_nFetchDirection;
@@ -1204,15 +1197,12 @@ void SAL_CALL CachedContentResultSet
::impl_isMyPropertyName( rEvt.PropertyName ) )
{
//don't notify foreign events on fetchsize and fetchdirection
- if( aEvt.PropertyName == CCRS_PropertySetInfo
- ::m_aPropertyNameForFetchSize
- || aEvt.PropertyName == CCRS_PropertySetInfo
- ::m_aPropertyNameForFetchDirection )
+ if( aEvt.PropertyName == g_sPropertyNameForFetchSize
+ || aEvt.PropertyName == g_sPropertyNameForFetchDirection )
return;
//adjust my props 'RowCount' and 'IsRowCountFinal'
- if( aEvt.PropertyName == CCRS_PropertySetInfo
- ::m_aPropertyNameForCount )
+ if( aEvt.PropertyName == g_sPropertyNameForCount )
{//RowCount changed
//check value
@@ -1225,8 +1215,7 @@ void SAL_CALL CachedContentResultSet
impl_changeRowCount( m_nKnownCount, nNew );
}
- else if( aEvt.PropertyName == CCRS_PropertySetInfo
- ::m_aPropertyNameForFinalCount )
+ else if( aEvt.PropertyName == g_sPropertyNameForFinalCount )
{//IsRowCountFinal changed
//check value
diff --git a/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx
index f312d50df046..a1a2c7a1c2cb 100644
--- a/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx
+++ b/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx
@@ -46,21 +46,20 @@ struct UCBDeadPropertyValueParseContext
~UCBDeadPropertyValueParseContext() { delete pType; delete pValue; }
};
-// static
-const OUString UCBDeadPropertyValue::aTypeString("string");
-const OUString UCBDeadPropertyValue::aTypeLong("long");
-const OUString UCBDeadPropertyValue::aTypeShort("short");
-const OUString UCBDeadPropertyValue::aTypeBoolean("boolean");
-const OUString UCBDeadPropertyValue::aTypeChar("char");
-const OUString UCBDeadPropertyValue::aTypeByte("byte");
-const OUString UCBDeadPropertyValue::aTypeHyper("hyper");
-const OUString UCBDeadPropertyValue::aTypeFloat("float");
-const OUString UCBDeadPropertyValue::aTypeDouble("double");
+static const char aTypeString[] = "string";
+static const char aTypeLong[] = "long";
+static const char aTypeShort[] = "short";
+static const char aTypeBoolean[] = "boolean";
+static const char aTypeChar[] = "char";
+static const char aTypeByte[] = "byte";
+static const char aTypeHyper[] = "hyper";
+static const char aTypeFloat[] = "float";
+static const char aTypeDouble[] = "double";
+
+static const char aXMLPre[] = "<ucbprop><type>";
+static const char aXMLMid[] = "</type><value>";
+static const char aXMLEnd[] = "</value></ucbprop>";
-// static
-const OUString UCBDeadPropertyValue::aXMLPre("<ucbprop><type>");
-const OUString UCBDeadPropertyValue::aXMLMid("</type><value>");
-const OUString UCBDeadPropertyValue::aXMLEnd("</value></ucbprop>");
#define STATE_TOP (1)
diff --git a/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.hxx b/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.hxx
index f0c93bee9c38..b93c142d5d25 100644
--- a/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.hxx
+++ b/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.hxx
@@ -37,21 +37,6 @@ namespace webdav_ucp
class UCBDeadPropertyValue
{
-private:
- static const OUString aTypeString;
- static const OUString aTypeLong;
- static const OUString aTypeShort;
- static const OUString aTypeBoolean;
- static const OUString aTypeChar;
- static const OUString aTypeByte;
- static const OUString aTypeHyper;
- static const OUString aTypeFloat;
- static const OUString aTypeDouble;
-
- static const OUString aXMLPre;
- static const OUString aXMLMid;
- static const OUString aXMLEnd;
-
public:
static bool supportsType( const css::uno::Type & rType );