diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-07 15:19:05 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-07 15:19:05 +0100 |
commit | 02e1029d8c6a1532de630d0dc74e869306a562a1 (patch) | |
tree | 381c84bdf49d3d19f5e6b3edf058a4809516a2b7 /sw/source/ui/dbui | |
parent | e260bc439164e1cd7317842b5f3f6c5bb91e290f (diff) |
fwk162: #i115902# review usage of SfxObjectShellRef, SfxObjecShellLock
Diffstat (limited to 'sw/source/ui/dbui')
-rw-r--r-- | sw/source/ui/dbui/dbmgr.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index d1e370fd87ef..94d7c8c2f057 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1508,7 +1508,8 @@ ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource, if(!xSource.is()) { uno::Reference<XChild> xChild(xConnection, UNO_QUERY); - xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY); + if ( xChild.is() ) + xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY); } if(xSource.is() && xConnection.is() && xColumn.is() && pNFmtr) { @@ -2876,7 +2877,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, try { // create a target docshell to put the merged document into - SfxObjectShellLock xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellRef xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTargetDocShell->DoInitNew( 0 ); SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); |