summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-04 08:29:36 +0200
committerNoel Grandin <noel@peralex.com>2015-11-04 14:10:44 +0200
commit59b072e22b0610abc7ffdbc75873ef5cbba58de7 (patch)
tree663c2d01a983508f9b22ec87fae29b16ab5a1683 /ucb
parentbaa411b59c3840a4dddf5447a0b4583eb5edea74 (diff)
yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/ucbstore.cxx36
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydata.cxx31
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx29
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx2
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.cxx3
-rw-r--r--ucb/source/ucp/tdoc/tdoc_storage.cxx3
6 files changed, 37 insertions, 67 deletions
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 318c1b14e1f6..9a6698316aae 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -792,9 +792,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
Any aAny =
xRootHierNameAccess->getByHierarchicalName(
aNewKey1 );
- xNewPropNameReplace->replaceByName(
- OUString("Handle"),
- aAny );
+ xNewPropNameReplace->replaceByName( "Handle", aAny );
// ... value
aNewKey1 = aKey;
@@ -802,9 +800,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
aAny =
xRootHierNameAccess->getByHierarchicalName(
aNewKey1 );
- xNewPropNameReplace->replaceByName(
- OUString("Value"),
- aAny );
+ xNewPropNameReplace->replaceByName( "Value", aAny );
// ... state
aNewKey1 = aKey;
@@ -812,9 +808,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
aAny =
xRootHierNameAccess->getByHierarchicalName(
aNewKey1 );
- xNewPropNameReplace->replaceByName(
- OUString("State"),
- aAny );
+ xNewPropNameReplace->replaceByName( "State", aAny );
// ... attributes
aNewKey1 = aKey;
@@ -822,9 +816,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
aAny =
xRootHierNameAccess->getByHierarchicalName(
aNewKey1 );
- xNewPropNameReplace->replaceByName(
- OUString("Attributes"),
- aAny );
+ xNewPropNameReplace->replaceByName( "Attributes", aAny );
// Insert new item.
xNewContainer->insertByName(
@@ -1308,13 +1300,11 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty
}
// Write value
- xNameReplace->replaceByName(
- OUString("Value"),
- aValue );
+ xNameReplace->replaceByName( "Value", aValue );
// Write state ( Now it is a directly set value )
xNameReplace->replaceByName(
- OUString("State"),
+ "State",
makeAny(
sal_Int32(
PropertyState_DIRECT_VALUE ) ) );
@@ -1588,24 +1578,24 @@ void SAL_CALL PersistentPropertySet::addProperty(
// Set handle
xNameReplace->replaceByName(
- OUString("Handle"),
+ "Handle",
makeAny( sal_Int32( -1 ) ) );
// Set default value
xNameReplace->replaceByName(
- OUString("Value"),
+ "Value",
DefaultValue );
// Set state ( always "default" )
xNameReplace->replaceByName(
- OUString("State"),
+ "State",
makeAny(
sal_Int32(
PropertyState_DEFAULT_VALUE ) ) );
// Set attributes
xNameReplace->replaceByName(
- OUString("Attributes"),
+ "Attributes",
makeAny( sal_Int32( Attributes ) ) );
// Insert new item.
@@ -2041,7 +2031,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues(
{
// Write handle
xNameReplace->replaceByName(
- OUString("Handle"),
+ "Handle",
makeAny( rNewValue.Handle ) );
// Save old value
@@ -2052,12 +2042,12 @@ void SAL_CALL PersistentPropertySet::setPropertyValues(
aValueName );
// Write value
xNameReplace->replaceByName(
- OUString("Value"),
+ "Value",
rNewValue.Value );
// Write state ( Now it is a directly set value )
xNameReplace->replaceByName(
- OUString("State"),
+ "State",
makeAny(
sal_Int32(
PropertyState_DIRECT_VALUE ) ) );
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index 366bd2d0d4f5..0e2ff62efdb9 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -328,9 +328,7 @@ bool HierarchyEntry::setData(
}
else
{
- xParentNameAccess->getByName(
- OUString("Children") )
- >>= xNameAccess;
+ xParentNameAccess->getByName("Children") >>= xNameAccess;
}
if ( xNameAccess->hasByName( m_aName ) )
@@ -376,8 +374,7 @@ bool HierarchyEntry::setData(
{
// Append new entry to parents child list,
// which is a set of entries.
- xParentNameAccess->getByName(
- OUString( "Children" ) ) >>= xFac;
+ xParentNameAccess->getByName("Children") >>= xFac;
}
OSL_ENSURE( xFac.is(),
@@ -408,7 +405,7 @@ bool HierarchyEntry::setData(
{
// Set Title value.
xNameReplace->replaceByName(
- OUString("Title"),
+ "Title",
uno::makeAny( rData.getTitle() ) );
// Set TargetURL value.
@@ -424,14 +421,14 @@ bool HierarchyEntry::setData(
= m_xOfficeInstDirs->makeRelocatableURL( aValue );
xNameReplace->replaceByName(
- OUString("TargetURL"),
+ "TargetURL",
uno::makeAny( aValue ) );
// Set Type value.
sal_Int32 nType
= rData.getType() == HierarchyEntryData::LINK ? 0 : 1;
xNameReplace->replaceByName(
- OUString("Type"),
+ "Type",
uno::makeAny( nType ) );
if ( xContainer.is() )
@@ -636,9 +633,7 @@ bool HierarchyEntry::move(
}
else
{
- xOldParentNameAccess->getByName(
- OUString("Children") )
- >>= xOldNameContainer;
+ xOldParentNameAccess->getByName("Children") >>= xOldNameContainer;
}
aEntry = xOldNameContainer->getByName( m_aName );
@@ -715,9 +710,7 @@ bool HierarchyEntry::move(
}
else
{
- xNewParentNameAccess->getByName(
- OUString("Children") )
- >>= xNewNameContainer;
+ xNewParentNameAccess->getByName("Children") >>= xNewNameContainer;
}
}
else
@@ -727,7 +720,7 @@ bool HierarchyEntry::move(
return false;
xNewNameReplace->replaceByName(
- OUString("Title"),
+ "Title",
uno::makeAny( rData.getTitle() ) );
// TargetURL property may contain a reference to the Office
@@ -739,11 +732,11 @@ bool HierarchyEntry::move(
if ( m_xOfficeInstDirs.is() && !aValue.isEmpty() )
aValue = m_xOfficeInstDirs->makeRelocatableURL( aValue );
xNewNameReplace->replaceByName(
- OUString("TargetURL"),
+ "TargetURL",
uno::makeAny( aValue ) );
sal_Int32 nType = rData.getType() == HierarchyEntryData::LINK ? 0 : 1;
xNewNameReplace->replaceByName(
- OUString("Type"),
+ "Type",
uno::makeAny( nType ) );
xNewNameContainer->insertByName( aNewKey, aEntry );
@@ -852,9 +845,7 @@ bool HierarchyEntry::remove()
{
// Append new entry to parents child list,
// which is a set of entries.
- xParentNameAccess->getByName(
- OUString("Children") )
- >>= xContainer;
+ xParentNameAccess->getByName("Children") >>= xContainer;
}
OSL_ENSURE( xContainer.is(),
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 864593a901b9..0e79ffaa38d5 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -2281,8 +2281,7 @@ bool Content::loadData(
try
{
uno::Any aHasEncryptedEntries
- = xPackagePropSet->getPropertyValue(
- OUString( "HasEncryptedEntries" ) );
+ = xPackagePropSet->getPropertyValue( "HasEncryptedEntries" );
if ( !( aHasEncryptedEntries >>= rProps.bHasEncryptedEntries ) )
{
OSL_FAIL( "Content::loadData - "
@@ -2328,9 +2327,7 @@ bool Content::loadData(
// MediaType
try
{
- uno::Any aMediaType
- = xPropSet->getPropertyValue(
- OUString("MediaType") );
+ uno::Any aMediaType = xPropSet->getPropertyValue("MediaType");
if ( !( aMediaType >>= rProps.aMediaType ) )
{
OSL_FAIL( "Content::loadData - Got no MediaType value!" );
@@ -2372,9 +2369,7 @@ bool Content::loadData(
// Size ( only available for streams )
try
{
- uno::Any aSize
- = xPropSet->getPropertyValue(
- OUString("Size") );
+ uno::Any aSize = xPropSet->getPropertyValue("Size");
if ( !( aSize >>= rProps.nSize ) )
{
OSL_FAIL( "Content::loadData - Got no Size value!" );
@@ -2395,9 +2390,7 @@ bool Content::loadData(
// Compressed ( only available for streams )
try
{
- uno::Any aCompressed
- = xPropSet->getPropertyValue(
- OUString("Compressed") );
+ uno::Any aCompressed = xPropSet->getPropertyValue("Compressed");
if ( !( aCompressed >>= rProps.bCompressed ) )
{
OSL_FAIL( "Content::loadData - Got no Compressed value!" );
@@ -2418,9 +2411,7 @@ bool Content::loadData(
// Encrypted ( only available for streams )
try
{
- uno::Any aEncrypted
- = xPropSet->getPropertyValue(
- OUString("Encrypted") );
+ uno::Any aEncrypted = xPropSet->getPropertyValue("Encrypted");
if ( !( aEncrypted >>= rProps.bEncrypted ) )
{
OSL_FAIL( "Content::loadData - Got no Encrypted value!" );
@@ -2514,7 +2505,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream )
try
{
xPackagePropSet->setPropertyValue(
- OUString("EncryptionKey"),
+ "EncryptionKey",
uno::makeAny( m_aProps.aEncryptionKey ) );
m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED;
}
@@ -2639,7 +2630,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream )
if ( m_nModifiedProps & MEDIATYPE_MODIFIED )
{
xPropSet->setPropertyValue(
- OUString("MediaType"),
+ "MediaType",
uno::makeAny( m_aProps.aMediaType ) );
m_nModifiedProps &= ~MEDIATYPE_MODIFIED;
}
@@ -2648,7 +2639,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream )
{
if ( !isFolder() )
xPropSet->setPropertyValue(
- OUString("Compressed"),
+ "Compressed",
uno::makeAny( m_aProps.bCompressed ) );
m_nModifiedProps &= ~COMPRESSED_MODIFIED;
@@ -2658,7 +2649,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream )
{
if ( !isFolder() )
xPropSet->setPropertyValue(
- OUString("Encrypted"),
+ "Encrypted",
uno::makeAny( m_aProps.bEncrypted ) );
m_nModifiedProps &= ~ENCRYPTED_MODIFIED;
@@ -2668,7 +2659,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xStream )
{
if ( !isFolder() )
xPropSet->setPropertyValue(
- OUString("EncryptionKey"),
+ "EncryptionKey",
uno::makeAny( m_aProps.aEncryptionKey ) );
m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED;
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index b50589f6e8e0..b350f31c8c00 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -2383,7 +2383,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData,
// According to MBA, if no mediatype is set, folder and all
// its contents will be lost on save of the document!!!
xPropSet->setPropertyValue(
- OUString( "MediaType" ),
+ "MediaType",
uno::makeAny(
OUString( // @@@ better mediatype
"application/binary" ) ) );
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
index 18084a7d8108..18151f61e774 100644
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
@@ -144,8 +144,7 @@ getDocumentId( const uno::Reference< uno::XInterface > & xDoc )
{
try
{
- uno::Any aValue = xPropSet->getPropertyValue(
- OUString( "RuntimeUID" ) );
+ uno::Any aValue = xPropSet->getPropertyValue("RuntimeUID");
aValue >>= aId;
}
catch ( beans::UnknownPropertyException const & )
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index ea5f1e8acfc5..964fab071f33 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -433,8 +433,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
"No XPropertySet interface!" );
try
{
- uno::Any aPropValue = xPropSet->getPropertyValue(
- OUString( "OpenMode" ) );
+ uno::Any aPropValue = xPropSet->getPropertyValue("OpenMode");
sal_Int32 nOpenMode = 0;
if ( aPropValue >>= nOpenMode )