summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-01-11 12:29:42 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-01-11 12:29:42 +0000
commit78876a6c0ccc308346a51b35dc3ed6ad7abdeec5 (patch)
tree854da1bf18f9cb2f3930ed53b4971eca80151067 /sfx2
parent984b2bbb27c7692831c8f5dfc7000dd8c829ffe7 (diff)
INTEGRATION: CWS sb19 (1.58.42); FILE MERGED
2004/12/09 05:54:14 sb 1.58.42.3: RESYNC: (1.59-1.61); FILE MERGED 2004/10/28 15:39:26 sb 1.58.42.2: RESYNC: (1.58-1.59); FILE MERGED 2004/10/26 15:46:52 mba 1.58.42.1: #110407#: remove static BaseURL
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/doctempl.cxx42
1 files changed, 11 insertions, 31 deletions
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index dcbde755e2e5..af8f396b0070 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: doctempl.cxx,v $
*
- * $Revision: 1.62 $
+ * $Revision: 1.63 $
*
- * last change: $Author: vg $ $Date: 2004-12-23 09:11:34 $
+ * last change: $Author: rt $ $Date: 2005-01-11 13:29:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -266,7 +266,6 @@ class DocTempl_EntryData_Impl
{
RegionData_Impl* mpParent;
SfxObjectShellLock mxObjShell;
- uno::Reference< embed::XStorage > mxStorage;
OUString maTitle;
OUString maOwnURL;
OUString maTargetURL;
@@ -1903,33 +1902,18 @@ SfxObjectShellRef DocTempl_EntryData_Impl::CreateObjectShell()
}
else if (pFilter)
{
- delete pMed;
mbDidConvert=sal_False;
- try
+ mxObjShell = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_ORGANIZER );
+ if ( mxObjShell.Is() )
{
- mxStorage = ::comphelper::OStorageHelper::GetStorageFromURL(
- aTargetURL,
- embed::ElementModes::READWRITE | embed::ElementModes::NOCREATE );
-
- if ( mxStorage.is() )
+ mxObjShell->DoInitNew(0);
+ // TODO/LATER: make sure that we don't use binary templates!
+ if( mxObjShell->LoadFrom( *pMed ) )
{
- mxObjShell = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_ORGANIZER );
- if ( mxObjShell.Is() )
- {
- mxObjShell->DoInitNew(0);
- // TODO/LATER: make sure that we don't use binary templates!
- if( mxObjShell->LoadFrom( mxStorage ) )
- {
- mxObjShell->DoSaveCompleted( mxStorage );
- }
- else
- mxObjShell.Clear();
- }
+ mxObjShell->DoSaveCompleted( pMed );
}
- }
- catch( uno::Exception& )
- {
- // TODO: probably needs error handling
+ else
+ mxObjShell.Clear();
}
}
}
@@ -1961,7 +1945,7 @@ BOOL DocTempl_EntryData_Impl::DeleteObjectShell()
{
if( mxObjShell->Save() )
{
- uno::Reference< embed::XTransactedObject > xTransacted( mxStorage, uno::UNO_QUERY );
+ uno::Reference< embed::XTransactedObject > xTransacted( mxObjShell->GetStorage(), uno::UNO_QUERY );
DBG_ASSERT( xTransacted.is(), "Storage must implement XTransactedObject!\n" );
if ( xTransacted.is() )
{
@@ -1981,10 +1965,6 @@ BOOL DocTempl_EntryData_Impl::DeleteObjectShell()
if( bRet )
{
mxObjShell.Clear();
-
- // disposing can be controlled by refcounting
- // while the storage doesn't come outside of this class
- mxStorage = uno::Reference< embed::XStorage >();
}
}
return bRet;