LCOV - code coverage report
Current view: top level - ucb/source/ucp/tdoc - tdoc_provider.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 83 171 48.5 %
Date: 2014-11-03 Functions: 17 27 63.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : /**************************************************************************
      22             :                                 TODO
      23             :  **************************************************************************
      24             : 
      25             :  *************************************************************************/
      26             : 
      27             : #include "rtl/ustrbuf.hxx"
      28             : 
      29             : #include "com/sun/star/container/XNameAccess.hpp"
      30             : #include "com/sun/star/embed/XStorage.hpp"
      31             : 
      32             : #include "comphelper/processfactory.hxx"
      33             : #include "ucbhelper/contentidentifier.hxx"
      34             : 
      35             : #include "tdoc_provider.hxx"
      36             : #include "tdoc_content.hxx"
      37             : #include "tdoc_uri.hxx"
      38             : #include "tdoc_docmgr.hxx"
      39             : #include "tdoc_storage.hxx"
      40             : 
      41             : using namespace com::sun::star;
      42             : using namespace tdoc_ucp;
      43             : 
      44             : 
      45             : 
      46             : 
      47             : // ContentProvider Implementation.
      48             : 
      49             : 
      50             : 
      51             : 
      52          96 : ContentProvider::ContentProvider(
      53             :             const uno::Reference< uno::XComponentContext >& rxContext )
      54             : : ::ucbhelper::ContentProviderImplHelper( rxContext ),
      55          96 :   m_xDocsMgr( new OfficeDocumentsManager( rxContext, this ) ),
      56         192 :   m_xStgElemFac( new StorageElementFactory( rxContext, m_xDocsMgr ) )
      57             : {
      58          96 : }
      59             : 
      60             : 
      61             : // virtual
      62         276 : ContentProvider::~ContentProvider()
      63             : {
      64          92 :     if ( m_xDocsMgr.is() )
      65          92 :         m_xDocsMgr->destroy();
      66         184 : }
      67             : 
      68             : 
      69             : 
      70             : // XInterface methods.
      71       18522 : void SAL_CALL ContentProvider::acquire()
      72             :     throw()
      73             : {
      74       18522 :     OWeakObject::acquire();
      75       18522 : }
      76             : 
      77       18504 : void SAL_CALL ContentProvider::release()
      78             :     throw()
      79             : {
      80       18504 :     OWeakObject::release();
      81       18504 : }
      82             : 
      83        2026 : css::uno::Any SAL_CALL ContentProvider::queryInterface( const css::uno::Type & rType )
      84             :     throw( css::uno::RuntimeException, std::exception )
      85             : {
      86             :     css::uno::Any aRet = cppu::queryInterface( rType,
      87             :                                                (static_cast< lang::XTypeProvider* >(this)),
      88             :                                                (static_cast< lang::XServiceInfo* >(this)),
      89             :                                                (static_cast< ucb::XContentProvider* >(this)),
      90             :                                                (static_cast< frame::XTransientDocumentsDocumentContentFactory* >(this))
      91        2026 :                                                );
      92        2026 :     return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
      93             : }
      94             : 
      95             : // XTypeProvider methods.
      96             : 
      97             : 
      98             : 
      99           0 : XTYPEPROVIDER_IMPL_4( ContentProvider,
     100             :                       lang::XTypeProvider,
     101             :                       lang::XServiceInfo,
     102             :                       ucb::XContentProvider,
     103             :                       frame::XTransientDocumentsDocumentContentFactory );
     104             : 
     105             : 
     106             : 
     107             : // XServiceInfo methods.
     108             : 
     109             : 
     110             : 
     111         404 : XSERVICEINFO_IMPL_1_CTX(
     112             :     ContentProvider,
     113             :     OUString( "com.sun.star.comp.ucb.TransientDocumentsContentProvider" ),
     114             :     OUString( TDOC_CONTENT_PROVIDER_SERVICE_NAME ) );
     115             : 
     116             : 
     117             : 
     118             : // Service factory implementation.
     119             : 
     120             : 
     121             : 
     122          96 : ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider );
     123             : 
     124             : 
     125             : 
     126             : // XContentProvider methods.
     127             : 
     128             : 
     129             : 
     130             : // virtual
     131             : uno::Reference< ucb::XContent > SAL_CALL
     132         328 : ContentProvider::queryContent(
     133             :         const uno::Reference< ucb::XContentIdentifier >& Identifier )
     134             :     throw( ucb::IllegalIdentifierException, uno::RuntimeException, std::exception )
     135             : {
     136         328 :     Uri aUri( Identifier->getContentIdentifier() );
     137         328 :     if ( !aUri.isValid() )
     138             :         throw ucb::IllegalIdentifierException(
     139             :             OUString( "Invalid URL!" ),
     140           0 :             Identifier );
     141             : 
     142             :     // Normalize URI.
     143             :     uno::Reference< ucb::XContentIdentifier > xCanonicId
     144         656 :         = new ::ucbhelper::ContentIdentifier( aUri.getUri() );
     145             : 
     146         656 :     osl::MutexGuard aGuard( m_aMutex );
     147             : 
     148             :     // Check, if a content with given id already exists...
     149             :     uno::Reference< ucb::XContent > xContent
     150         328 :         = queryExistingContent( xCanonicId ).get();
     151             : 
     152         328 :     if ( !xContent.is() )
     153             :     {
     154             :         // Create a new content.
     155         328 :         xContent = Content::create( m_xContext, this, xCanonicId );
     156         328 :         registerNewContent( xContent );
     157             :     }
     158             : 
     159         656 :     return xContent;
     160             : }
     161             : 
     162             : 
     163             : 
     164             : // XTransientDocumentsDocumentContentFactory methods.
     165             : 
     166             : 
     167             : 
     168             : // virtual
     169             : uno::Reference< ucb::XContent > SAL_CALL
     170         296 : ContentProvider::createDocumentContent(
     171             :         const uno::Reference< frame::XModel >& Model )
     172             :     throw ( lang::IllegalArgumentException, uno::RuntimeException, std::exception )
     173             : {
     174             :     // model -> id -> content identifier -> queryContent
     175         296 :     if ( m_xDocsMgr.is() )
     176             :     {
     177         296 :         OUString aDocId = m_xDocsMgr->queryDocumentId( Model );
     178         296 :         if ( !aDocId.isEmpty() )
     179             :         {
     180         296 :             OUStringBuffer aBuffer;
     181         296 :             aBuffer.appendAscii( TDOC_URL_SCHEME ":/" );
     182         296 :             aBuffer.append( aDocId );
     183             : 
     184             :             uno::Reference< ucb::XContentIdentifier > xId
     185         592 :                 = new ::ucbhelper::ContentIdentifier( aBuffer.makeStringAndClear() );
     186             : 
     187         592 :             osl::MutexGuard aGuard( m_aMutex );
     188             : 
     189             :             // Check, if a content with given id already exists...
     190             :             uno::Reference< ucb::XContent > xContent
     191         592 :                 = queryExistingContent( xId ).get();
     192             : 
     193         296 :             if ( !xContent.is() )
     194             :             {
     195             :                 // Create a new content.
     196         296 :                 xContent = Content::create( m_xContext, this, xId );
     197             :             }
     198             : 
     199         296 :             if ( xContent.is() )
     200         592 :                 return xContent;
     201             : 
     202             :             // no content.
     203             :             throw lang::IllegalArgumentException(
     204             :                 OUString(
     205             :                     "Illegal Content Identifier!" ),
     206             :                 static_cast< cppu::OWeakObject * >( this ),
     207         296 :                 1 );
     208             :         }
     209             :         else
     210             :         {
     211             :             throw lang::IllegalArgumentException(
     212             :                 OUString(
     213             :                     "Unable to obtain document id from model!" ),
     214             :                 static_cast< cppu::OWeakObject * >( this ),
     215           0 :                 1 );
     216         296 :         }
     217             :      }
     218             :      else
     219             :      {
     220             :         throw lang::IllegalArgumentException(
     221             :             OUString(
     222             :                 "No Document Manager!" ),
     223             :             static_cast< cppu::OWeakObject * >( this ),
     224           0 :             1 );
     225             :      }
     226             : }
     227             : 
     228             : 
     229             : 
     230             : // interface OfficeDocumentsEventListener
     231             : 
     232             : 
     233             : 
     234             : // virtual
     235        1409 : void ContentProvider::notifyDocumentClosed( const OUString & rDocId )
     236             : {
     237        1409 :     osl::MutexGuard aGuard( getContentListMutex() );
     238             : 
     239        2818 :     ::ucbhelper::ContentRefList aAllContents;
     240        1409 :     queryExistingContents( aAllContents );
     241             : 
     242        1409 :     ::ucbhelper::ContentRefList::const_iterator it  = aAllContents.begin();
     243        1409 :     ::ucbhelper::ContentRefList::const_iterator end = aAllContents.end();
     244             : 
     245             :     // Notify all content objects related to the closed doc.
     246             : 
     247        1409 :     bool bFoundDocumentContent = false;
     248        2818 :     rtl::Reference< Content > xRoot;
     249             : 
     250        2818 :     while ( it != end )
     251             :     {
     252           0 :         Uri aUri( (*it)->getIdentifier()->getContentIdentifier() );
     253             :         OSL_ENSURE( aUri.isValid(),
     254             :                     "ContentProvider::notifyDocumentClosed - Invalid URI!" );
     255             : 
     256           0 :         if ( !bFoundDocumentContent )
     257             :         {
     258           0 :             if ( aUri.isRoot() )
     259             :             {
     260           0 :                 xRoot = static_cast< Content * >( (*it).get() );
     261             :             }
     262           0 :             else if ( aUri.isDocument() )
     263             :             {
     264           0 :                 if ( aUri.getDocumentId() == rDocId )
     265             :                 {
     266           0 :                     bFoundDocumentContent = true;
     267             : 
     268             :                     // document content will notify removal of child itself;
     269             :                     // no need for the root to propagate this.
     270           0 :                     xRoot.clear();
     271             :                 }
     272             :             }
     273             :         }
     274             : 
     275           0 :         if ( aUri.getDocumentId() == rDocId )
     276             :         {
     277             :             // Inform content.
     278             :             rtl::Reference< Content > xContent
     279           0 :                 = static_cast< Content * >( (*it).get() );
     280             : 
     281           0 :             xContent->notifyDocumentClosed();
     282             :         }
     283             : 
     284           0 :         ++it;
     285           0 :     }
     286             : 
     287        1409 :     if ( xRoot.is() )
     288             :     {
     289             :         // No document content found for rDocId but root content
     290             :         // instantiated. Root content must announce document removal
     291             :         // to content event listeners.
     292           0 :         xRoot->notifyChildRemoved( rDocId );
     293        1409 :     }
     294        1409 : }
     295             : 
     296             : 
     297             : // virtual
     298        1403 : void ContentProvider::notifyDocumentOpened( const OUString & rDocId )
     299             : {
     300        1403 :     osl::MutexGuard aGuard( getContentListMutex() );
     301             : 
     302        2806 :     ::ucbhelper::ContentRefList aAllContents;
     303        1403 :     queryExistingContents( aAllContents );
     304             : 
     305        1403 :     ::ucbhelper::ContentRefList::const_iterator it  = aAllContents.begin();
     306        1403 :     ::ucbhelper::ContentRefList::const_iterator end = aAllContents.end();
     307             : 
     308             :     // Find root content. If instantiated let it propagate document insertion.
     309             : 
     310        2806 :     while ( it != end )
     311             :     {
     312           0 :         Uri aUri( (*it)->getIdentifier()->getContentIdentifier() );
     313             :         OSL_ENSURE( aUri.isValid(),
     314             :                     "ContentProvider::notifyDocumentOpened - Invalid URI!" );
     315             : 
     316           0 :         if ( aUri.isRoot() )
     317             :         {
     318             :             rtl::Reference< Content > xRoot
     319           0 :                 = static_cast< Content * >( (*it).get() );
     320           0 :             xRoot->notifyChildInserted( rDocId );
     321             : 
     322             :             // Done.
     323           0 :             break;
     324             :         }
     325             : 
     326           0 :         ++it;
     327        1403 :     }
     328        1403 : }
     329             : 
     330             : 
     331             : 
     332             : // Non-UNO
     333             : 
     334             : 
     335             : 
     336             : uno::Reference< embed::XStorage >
     337         624 : ContentProvider::queryStorage( const OUString & rUri,
     338             :                                StorageAccessMode eMode ) const
     339             : {
     340         624 :     if ( m_xStgElemFac.is() )
     341             :     {
     342             :         try
     343             :         {
     344         624 :             return m_xStgElemFac->createStorage( rUri, eMode );
     345             :         }
     346           0 :         catch ( embed::InvalidStorageException const & )
     347             :         {
     348             :             OSL_FAIL( "Caught InvalidStorageException!" );
     349             :         }
     350           0 :         catch ( lang::IllegalArgumentException const & )
     351             :         {
     352             :             OSL_FAIL( "Caught IllegalArgumentException!" );
     353             :         }
     354           0 :         catch ( io::IOException const & )
     355             :         {
     356             :             // Okay to happen, for instance when the storage does not exist.
     357             :             //OSL_ENSURE( false, "Caught IOException!" );
     358             :         }
     359           0 :         catch ( embed::StorageWrappedTargetException const & )
     360             :         {
     361             :             OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
     362             :         }
     363             :     }
     364           0 :     return uno::Reference< embed::XStorage >();
     365             : }
     366             : 
     367             : 
     368             : uno::Reference< embed::XStorage >
     369           0 : ContentProvider::queryStorageClone( const OUString & rUri ) const
     370             : {
     371           0 :     if ( m_xStgElemFac.is() )
     372             :     {
     373             :         try
     374             :         {
     375           0 :             Uri aUri( rUri );
     376             :             uno::Reference< embed::XStorage > xParentStorage
     377           0 :                 = m_xStgElemFac->createStorage( aUri.getParentUri(), READ );
     378             :             uno::Reference< embed::XStorage > xStorage
     379           0 :                 = m_xStgElemFac->createTemporaryStorage();
     380             : 
     381           0 :             xParentStorage->copyStorageElementLastCommitTo(
     382           0 :                                 aUri.getDecodedName(), xStorage );
     383           0 :             return xStorage;
     384             :         }
     385           0 :         catch ( embed::InvalidStorageException const & )
     386             :         {
     387             :             OSL_FAIL( "Caught InvalidStorageException!" );
     388             :         }
     389           0 :         catch ( lang::IllegalArgumentException const & )
     390             :         {
     391             :             OSL_FAIL( "Caught IllegalArgumentException!" );
     392             :         }
     393           0 :         catch ( io::IOException const & )
     394             :         {
     395             :             // Okay to happen, for instance when the storage does not exist.
     396             :             //OSL_ENSURE( false, "Caught IOException!" );
     397             :         }
     398           0 :         catch ( embed::StorageWrappedTargetException const & )
     399             :         {
     400             :             OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
     401             :         }
     402             :     }
     403             : 
     404           0 :     return uno::Reference< embed::XStorage >();
     405             : }
     406             : 
     407             : 
     408             : uno::Reference< io::XInputStream >
     409           0 : ContentProvider::queryInputStream( const OUString & rUri,
     410             :                                    const OUString & rPassword ) const
     411             :     throw ( packages::WrongPasswordException, css::uno::RuntimeException )
     412             : {
     413           0 :     if ( m_xStgElemFac.is() )
     414             :     {
     415             :         try
     416             :         {
     417           0 :             return m_xStgElemFac->createInputStream( rUri, rPassword );
     418             :         }
     419           0 :         catch ( embed::InvalidStorageException const & )
     420             :         {
     421             :             OSL_FAIL( "Caught InvalidStorageException!" );
     422             :         }
     423           0 :         catch ( lang::IllegalArgumentException const & )
     424             :         {
     425             :             OSL_FAIL( "Caught IllegalArgumentException!" );
     426             :         }
     427           0 :         catch ( io::IOException const & )
     428             :         {
     429             :             OSL_FAIL( "Caught IOException!" );
     430             :         }
     431           0 :         catch ( embed::StorageWrappedTargetException const & )
     432             :         {
     433             :             OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
     434             :         }
     435             : //        catch ( packages::WrongPasswordException const & )
     436             : //        {
     437             : //            // the key provided is wrong; rethrow; to be handled by caller.
     438             : //            throw;
     439             : //        }
     440             :     }
     441           0 :     return uno::Reference< io::XInputStream >();
     442             : }
     443             : 
     444             : 
     445             : uno::Reference< io::XOutputStream >
     446           0 : ContentProvider::queryOutputStream( const OUString & rUri,
     447             :                                     const OUString & rPassword,
     448             :                                     bool bTruncate ) const
     449             :     throw ( packages::WrongPasswordException,
     450             :             uno::RuntimeException )
     451             : {
     452           0 :     if ( m_xStgElemFac.is() )
     453             :     {
     454             :         try
     455             :         {
     456             :             return
     457           0 :                 m_xStgElemFac->createOutputStream( rUri, rPassword, bTruncate );
     458             :         }
     459           0 :         catch ( embed::InvalidStorageException const & )
     460             :         {
     461             :             OSL_FAIL( "Caught InvalidStorageException!" );
     462             :         }
     463           0 :         catch ( lang::IllegalArgumentException const & )
     464             :         {
     465             :             OSL_FAIL( "Caught IllegalArgumentException!" );
     466             :         }
     467           0 :         catch ( io::IOException const & )
     468             :         {
     469             :             // Okay to happen, for instance when the storage does not exist.
     470             :             //OSL_ENSURE( false, "Caught IOException!" );
     471             :         }
     472           0 :         catch ( embed::StorageWrappedTargetException const & )
     473             :         {
     474             :             OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
     475             :         }
     476             : //        catch ( packages::WrongPasswordException const & )
     477             : //        {
     478             : //            // the key provided is wrong; rethrow; to be handled by caller.
     479             : //            throw;
     480             : //        }
     481             :     }
     482           0 :     return uno::Reference< io::XOutputStream >();
     483             : }
     484             : 
     485             : 
     486             : uno::Reference< io::XStream >
     487           0 : ContentProvider::queryStream( const OUString & rUri,
     488             :                               const OUString & rPassword,
     489             :                               bool bTruncate ) const
     490             :     throw ( packages::WrongPasswordException, uno::RuntimeException )
     491             : {
     492           0 :     if ( m_xStgElemFac.is() )
     493             :     {
     494             :         try
     495             :         {
     496           0 :             return m_xStgElemFac->createStream( rUri, rPassword, bTruncate );
     497             :         }
     498           0 :         catch ( embed::InvalidStorageException const & )
     499             :         {
     500             :             OSL_FAIL( "Caught InvalidStorageException!" );
     501             :         }
     502           0 :         catch ( lang::IllegalArgumentException const & )
     503             :         {
     504             :             OSL_FAIL( "Caught IllegalArgumentException!" );
     505             :         }
     506           0 :         catch ( io::IOException const & )
     507             :         {
     508             :             // Okay to happen, for instance when the storage does not exist.
     509             :             //OSL_ENSURE( false, "Caught IOException!" );
     510             :         }
     511           0 :         catch ( embed::StorageWrappedTargetException const & )
     512             :         {
     513             :             OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
     514             :         }
     515             : //        catch ( packages::WrongPasswordException const & )
     516             : //        {
     517             : //            // the key provided is wrong; rethrow; to be handled by caller.
     518             : //            throw;
     519             : //        }
     520             :     }
     521           0 :     return uno::Reference< io::XStream >();
     522             : }
     523             : 
     524             : 
     525           0 : bool ContentProvider::queryNamesOfChildren(
     526             :     const OUString & rUri, uno::Sequence< OUString > & rNames ) const
     527             : {
     528           0 :     Uri aUri( rUri );
     529           0 :     if ( aUri.isRoot() )
     530             :     {
     531             :         // special handling for root, which has no storage, but children.
     532           0 :         if ( m_xDocsMgr.is() )
     533             :         {
     534           0 :             rNames = m_xDocsMgr->queryDocuments();
     535           0 :             return true;
     536             :         }
     537             :     }
     538             :     else
     539             :     {
     540           0 :         if ( m_xStgElemFac.is() )
     541             :         {
     542             :             try
     543             :             {
     544             :                 uno::Reference< embed::XStorage > xStorage
     545           0 :                     = m_xStgElemFac->createStorage( rUri, READ );
     546             : 
     547             :                 OSL_ENSURE( xStorage.is(), "Got no Storage!" );
     548             : 
     549           0 :                 if ( xStorage.is() )
     550             :                 {
     551             :                     uno::Reference< container::XNameAccess > xNA(
     552           0 :                         xStorage, uno::UNO_QUERY );
     553             : 
     554             :                     OSL_ENSURE( xNA.is(), "Got no css.container.XNameAccess!" );
     555           0 :                     if ( xNA.is() )
     556             :                     {
     557           0 :                         rNames = xNA->getElementNames();
     558           0 :                         return true;
     559           0 :                     }
     560           0 :                 }
     561             :             }
     562           0 :             catch ( embed::InvalidStorageException const & )
     563             :             {
     564             :                 OSL_FAIL( "Caught InvalidStorageException!" );
     565             :             }
     566           0 :             catch ( lang::IllegalArgumentException const & )
     567             :             {
     568             :                 OSL_FAIL( "Caught IllegalArgumentException!" );
     569             :             }
     570           0 :             catch ( io::IOException const & )
     571             :             {
     572             :                 // Okay to happen, for instance if the storage does not exist.
     573             :                 //OSL_ENSURE( false, "Caught IOException!" );
     574             :             }
     575           0 :             catch ( embed::StorageWrappedTargetException const & )
     576             :             {
     577             :                 OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
     578             :             }
     579             :         }
     580             :     }
     581           0 :     return false;
     582             : }
     583             : 
     584             : 
     585             : OUString
     586         624 : ContentProvider::queryStorageTitle( const OUString & rUri ) const
     587             : {
     588         624 :     OUString aTitle;
     589             : 
     590        1248 :     Uri aUri( rUri );
     591         624 :     if ( aUri.isRoot() )
     592             :     {
     593             :         // always empty.
     594           0 :         aTitle = OUString();
     595             :     }
     596         624 :     else if ( aUri.isDocument() )
     597             :     {
     598             :         // for documents, title shall not be derived from URL. It shall
     599             :         // be somethimg more 'speaking' than just the document UID.
     600         624 :         if ( m_xDocsMgr.is() )
     601         624 :             aTitle = m_xDocsMgr->queryStorageTitle( aUri.getDocumentId() );
     602             :     }
     603             :     else
     604             :     {
     605             :         // derive title from URL
     606           0 :         aTitle = aUri.getDecodedName();
     607             :     }
     608             : 
     609             :     OSL_ENSURE( !aTitle.isEmpty() || aUri.isRoot(),
     610             :                 "ContentProvider::queryStorageTitle - empty title!" );
     611        1248 :     return aTitle;
     612             : }
     613             : 
     614             : 
     615             : uno::Reference< frame::XModel >
     616         328 : ContentProvider::queryDocumentModel( const OUString & rUri ) const
     617             : {
     618         328 :     uno::Reference< frame::XModel > xModel;
     619             : 
     620         328 :     if ( m_xDocsMgr.is() )
     621             :     {
     622         328 :         Uri aUri( rUri );
     623         328 :         xModel = m_xDocsMgr->queryDocumentModel( aUri.getDocumentId() );
     624             :     }
     625             : 
     626             :     OSL_ENSURE( xModel.is(),
     627             :                 "ContentProvider::queryDocumentModel - no model!" );
     628         328 :     return xModel;
     629             : }
     630             : 
     631             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10