diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-10-17 17:07:36 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-10-17 17:12:17 +0200 |
commit | 4901bdf4c4971e9b8235ab9bfbd0ee1088d51b45 (patch) | |
tree | 3ef9df749c805a1c997c30b914f2a49bb759a737 | |
parent | a3f899125e6d619e185d5e8317d3abd6ac541c14 (diff) |
Revert "CMIS: use another name to show than the one extracted from the base URL"
The commit makes LO unusable, it fails during startup, smoketest fails as well.
This reverts commit cd1a12dc552e9d34c7481c83b07a6f6af0e8762b.
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 22 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 8 |
2 files changed, 5 insertions, 25 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index c335aea69ad4..777929dfc806 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -55,7 +55,6 @@ #include <com/sun/star/document/XStorageChangeListener.hpp> #include <com/sun/star/document/XActionLockable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/beans/XPropertySetInfo.hpp> #include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/script/provider/XScriptProviderFactory.hpp> #include <com/sun/star/script/provider/XScriptProvider.hpp> @@ -66,7 +65,6 @@ #include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/frame/XTransientDocumentsDocumentContentFactory.hpp> -#include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <comphelper/enumhelper.hxx> // can be removed when this is a "real" service #include <cppuhelper/interfacecontainer.hxx> @@ -3771,23 +3769,9 @@ css::uno::Reference< css::frame::XUntitledNumbers > SfxBaseModel::impl_getUntitl SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium(); if ( pMedium ) { - ::ucbhelper::Content aContent( pMedium->GetName(), com::sun::star::uno::Reference < ucb::XCommandEnvironment >() ); - com::sun::star::uno::Reference < beans::XPropertySetInfo > xProps = aContent.getProperties(); - if ( xProps.is() ) - { - ::rtl::OUString aServerTitle( RTL_CONSTASCII_USTRINGPARAM("TitleOnServer") ); - if ( xProps->hasPropertyByName( aServerTitle ) ) - { - uno::Any aAny = aContent.getPropertyValue( aServerTitle ); - aAny >>= aResult; - } - } - else - { - SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairedDocItem, SfxBoolItem, SID_REPAIRPACKAGE, sal_False ); - if ( pRepairedDocItem && pRepairedDocItem->GetValue() ) - aResult += String( SfxResId(STR_REPAIREDDOCUMENT) ); - } + SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairedDocItem, SfxBoolItem, SID_REPAIRPACKAGE, sal_False ); + if ( pRepairedDocItem && pRepairedDocItem->GetValue() ) + aResult += String( SfxResId(STR_REPAIREDDOCUMENT) ); } if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (pMedium && pMedium->IsReadOnly()) ) diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index f765f1947069..d72041e5e9b6 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -126,9 +126,6 @@ namespace cmis for( sal_Int32 n = 0; n < nProps; ++n ) { const beans::Property& rProp = pProps[ n ]; -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "Property: %s\n", rtl::OUStringToOString( rProp.Name, RTL_TEXTENCODING_UTF8 ).getStr() ); -#endif if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ) { @@ -144,9 +141,8 @@ namespace cmis else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TitleOnServer" ) ) ) + else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) { - // TODO Set the path instead of the name xRow->appendString( rProp, rtl::OUString::createFromAscii( m_pObject->getName().c_str() ) ); } else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsReadOnly" ) ) ) @@ -358,7 +354,7 @@ namespace cmis beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TitleOnServer" ) ), + beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ) ), |