diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-15 11:54:41 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 19:55:37 -0500 |
commit | 98b2c08dff4d00b3e7a2e001c326ebe27dae4549 (patch) | |
tree | a9a4f21cabbf2762391340d08f9c9071b4acee94 /svtools | |
parent | 5ef746c2188703ec34245a2c096063958713dbdd (diff) |
merge vosremoval-reference.diff
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/pch/precompiled_svtools.hxx | 4 | ||||
-rw-r--r-- | svtools/source/misc/templatefoldercache.cxx | 56 |
2 files changed, 30 insertions, 30 deletions
diff --git a/svtools/inc/pch/precompiled_svtools.hxx b/svtools/inc/pch/precompiled_svtools.hxx index fce981e33e08..7aafdc3025e5 100644 --- a/svtools/inc/pch/precompiled_svtools.hxx +++ b/svtools/inc/pch/precompiled_svtools.hxx @@ -385,6 +385,7 @@ #include <rtl/logfile.hxx> #include <rtl/math.hxx> #include <rtl/memory.h> +#include <rtl/ref.hxx> #include <rtl/strbuf.hxx> #include <rtl/string.hxx> #include <rtl/tencinfo.h> @@ -395,6 +396,7 @@ #include <rtl/ustring.hxx> #include <rtl/uuid.h> +#include <salhelper/simplereferenceobject.hxx> #include <salhelper/timer.hxx> #include <sot/clsids.hxx> @@ -425,8 +427,6 @@ #include <vos/mutex.hxx> #include <vos/process.hxx> -#include <vos/ref.hxx> -#include <vos/refernce.hxx> //---MARKER--- diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 7635803c9372..366037c7a1d3 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -39,8 +39,8 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/util/XOfficeInstallationDirectories.hpp> #include <ucbhelper/content.hxx> -#include <vos/ref.hxx> -#include <vos/refernce.hxx> +#include <rtl/ref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <tools/urlobj.hxx> #include <tools/debug.hxx> #include <unotools/pathoptions.hxx> @@ -116,13 +116,13 @@ namespace svt //= TemplateContent //===================================================================== struct TemplateContent; - typedef ::std::vector< ::vos::ORef< TemplateContent > > TemplateFolderContent; + typedef ::std::vector< ::rtl::Reference< TemplateContent > > TemplateFolderContent; typedef TemplateFolderContent::const_iterator ConstFolderIterator; typedef TemplateFolderContent::iterator FolderIterator; /** a struct describing one content in one of the template dirs (or at least it's relevant aspects) */ - struct TemplateContent : public ::vos::OReference + struct TemplateContent : public ::salhelper::SimpleReferenceObject { public: @@ -161,7 +161,7 @@ namespace svt inline TemplateFolderContent::size_type size() const { return m_aSubContents.size(); } - inline void push_back( const ::vos::ORef< TemplateContent >& _rxNewElement ) + inline void push_back( const ::rtl::Reference< TemplateContent >& _rxNewElement ) { m_aSubContents.push_back( _rxNewElement ); } }; @@ -207,12 +207,12 @@ namespace svt //--------------------------------------------------------------------- /// compares two TemplateContent by URL struct TemplateContentURLLess - :public ::std::binary_function < ::vos::ORef< TemplateContent > - , ::vos::ORef< TemplateContent > + :public ::std::binary_function < ::rtl::Reference< TemplateContent > + , ::rtl::Reference< TemplateContent > , bool > { - bool operator() ( const ::vos::ORef< TemplateContent >& _rxLHS, const ::vos::ORef< TemplateContent >& _rxRHS ) const + bool operator() ( const ::rtl::Reference< TemplateContent >& _rxLHS, const ::rtl::Reference< TemplateContent >& _rxRHS ) const { return _rxLHS->getURL() < _rxRHS->getURL() ? true @@ -222,7 +222,7 @@ namespace svt //--------------------------------------------------------------------- /// sorts the sib contents of a TemplateFolderContent - struct SubContentSort : public ::std::unary_function< ::vos::ORef< TemplateContent >, void > + struct SubContentSort : public ::std::unary_function< ::rtl::Reference< TemplateContent >, void > { void operator() ( TemplateFolderContent& _rFolder ) const { @@ -241,9 +241,9 @@ namespace svt ); } - void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const + void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const { - if ( _rxContent.isValid() && _rxContent->size() ) + if ( _rxContent.is() && _rxContent->size() ) { operator()( _rxContent->getSubContents() ); } @@ -253,15 +253,15 @@ namespace svt /** does a deep compare of two template contents */ struct TemplateContentEqual - :public ::std::binary_function < ::vos::ORef< TemplateContent > - , ::vos::ORef< TemplateContent > + :public ::std::binary_function < ::rtl::Reference< TemplateContent > + , ::rtl::Reference< TemplateContent > , bool > { //................................................................. - bool operator() (const ::vos::ORef< TemplateContent >& _rLHS, const ::vos::ORef< TemplateContent >& _rRHS ) + bool operator() (const ::rtl::Reference< TemplateContent >& _rLHS, const ::rtl::Reference< TemplateContent >& _rRHS ) { - if ( !_rLHS.isValid() || !_rRHS.isValid() ) + if ( !_rLHS.is() || !_rRHS.is() ) { DBG_ERROR( "TemplateContentEqual::operator(): invalid contents!" ); return true; @@ -320,12 +320,12 @@ namespace svt //--------------------------------------------------------------------- /// functor which stores the local name of a TemplateContent struct StoreLocalContentName - :public ::std::unary_function< ::vos::ORef< TemplateContent >, void > + :public ::std::unary_function< ::rtl::Reference< TemplateContent >, void > ,public StoreString { StoreLocalContentName( SvStream& _rStorage ) : StoreString( _rStorage ) { } - void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const + void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const { DBG_ERRORFILE( "This method must not be used, the whole URL must be stored!" ); @@ -336,7 +336,7 @@ namespace svt //--------------------------------------------------------------------- struct StoreContentURL - :public ::std::unary_function< ::vos::ORef< TemplateContent >, void > + :public ::std::unary_function< ::rtl::Reference< TemplateContent >, void > ,public StoreString { uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs; @@ -347,7 +347,7 @@ namespace svt xOfficeInstDirs ) : StoreString( _rStorage ), m_xOfficeInstDirs( xOfficeInstDirs ) { } - void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const + void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const { // use the base class operator with the local name of the content String sURL = _rxContent->getURL(); @@ -361,7 +361,7 @@ namespace svt //--------------------------------------------------------------------- /// functor which stores the complete content of a TemplateContent struct StoreFolderContent - :public ::std::unary_function< ::vos::ORef< TemplateContent >, void > + :public ::std::unary_function< ::rtl::Reference< TemplateContent >, void > ,public StorageHelper { uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs; @@ -397,9 +397,9 @@ namespace svt } //................................................................. - void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const + void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const { - if ( _rxContent.isValid() ) + if ( _rxContent.is() ) { operator()( *_rxContent ); } @@ -409,7 +409,7 @@ namespace svt //--------------------------------------------------------------------- /// functor which reads a complete TemplateContent instance struct ReadFolderContent - :public ::std::unary_function< ::vos::ORef< TemplateContent >, void > + :public ::std::unary_function< ::rtl::Reference< TemplateContent >, void > ,public StorageHelper { uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs; @@ -454,9 +454,9 @@ namespace svt } //................................................................. - void operator() ( const ::vos::ORef< TemplateContent >& _rxContent ) const + void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const { - if ( _rxContent.isValid() ) + if ( _rxContent.is() ) { operator()( *_rxContent ); } @@ -501,7 +501,7 @@ namespace svt String implParseSmart( const String& _rPath ); - sal_Bool implReadFolder( const ::vos::ORef< TemplateContent >& _rxRoot ); + sal_Bool implReadFolder( const ::rtl::Reference< TemplateContent >& _rxRoot ); static String getCacheFileName(); static sal_Int32 getMagicNumber(); @@ -628,7 +628,7 @@ namespace svt } //--------------------------------------------------------------------- - sal_Bool TemplateFolderCacheImpl::implReadFolder( const ::vos::ORef< TemplateContent >& _rxRoot ) + sal_Bool TemplateFolderCacheImpl::implReadFolder( const ::rtl::Reference< TemplateContent >& _rxRoot ) { try { @@ -670,7 +670,7 @@ namespace svt INetURLObject aSubContentURL( xContentAccess->queryContentIdentifierString() ); // a new content instance - ::vos::ORef< TemplateContent > xChild = new TemplateContent( aSubContentURL ); + ::rtl::Reference< TemplateContent > xChild = new TemplateContent( aSubContentURL ); // the modified date xChild->setModDate( xRow->getTimestamp( 2 ) ); // date modified |