summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objxtor.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
commit091e4aee3386f3bfee081dc8646494e0eb97f88a (patch)
treedd79298b4e8729ca7dc874274d4a33ea88fe107d /sfx2/source/doc/objxtor.cxx
parentf0681adbf092e2b455db52535f2df882bc87343a (diff)
parent224bd63b3fa459baa0a6bb5cd03f5dc2ca475d82 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: avmedia/source/framework/mediacontrol.cxx connectivity/source/commontools/DateConversion.cxx desktop/source/deployment/registry/component/dp_component.cxx editeng/inc/editeng/numitem.hxx editeng/inc/editeng/txtrange.hxx editeng/source/editeng/editobj.cxx editeng/source/editeng/editview.cxx editeng/source/editeng/eehtml.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/misc/txtrange.cxx editeng/source/outliner/outlin2.cxx editeng/source/outliner/outlvw.cxx framework/source/layoutmanager/layoutmanager.cxx linguistic/source/lngsvcmgr.hxx sfx2/source/appl/app.cxx sfx2/source/appl/app.src sfx2/source/appl/appbas.cxx sfx2/source/appl/appcfg.cxx sfx2/source/appl/appdde.cxx sfx2/source/appl/appmain.cxx sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/appl/childwin.cxx sfx2/source/appl/fileobj.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/workwin.cxx sfx2/source/control/dispatch.cxx sfx2/source/control/macro.cxx sfx2/source/control/objface.cxx sfx2/source/control/request.cxx sfx2/source/control/shell.cxx sfx2/source/control/statcach.cxx sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/dialog/mailmodel.cxx sfx2/source/dialog/mailmodelapi.cxx sfx2/source/dialog/mgetempl.cxx sfx2/source/dialog/splitwin.cxx sfx2/source/dialog/styledlg.cxx sfx2/source/dialog/tabdlg.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/dialog/tplcitem.cxx sfx2/source/dialog/tplpitem.cxx sfx2/source/doc/doctempl.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/new.cxx sfx2/source/doc/objcont.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/objxtor.cxx sfx2/source/inc/appdata.hxx sfx2/source/inc/helpid.hrc sfx2/source/inc/sfxlocal.hrc sfx2/source/inc/statcach.hxx sfx2/source/inc/templdgi.hxx sfx2/source/inc/virtmenu.hxx sfx2/source/inc/workwin.hxx sfx2/source/menu/mnumgr.cxx sfx2/source/menu/virtmenu.cxx sfx2/source/statbar/stbitem.cxx sfx2/source/view/frame.cxx sfx2/source/view/frame2.cxx sfx2/source/view/orgmgr.cxx sfx2/source/view/printer.cxx sfx2/source/view/prnmon.cxx sfx2/source/view/sfxbasecontroller.cxx sfx2/source/view/viewfrm.cxx sfx2/source/view/viewfrm2.cxx sfx2/source/view/viewprn.cxx sfx2/source/view/viewsh.cxx svx/inc/svx/svditer.hxx svx/source/dialog/sdstring.src svx/source/form/fmpage.cxx svx/source/form/formcontroller.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svditer.cxx svx/source/svdraw/svdview.cxx xmloff/source/forms/elementimport.cxx
Diffstat (limited to 'sfx2/source/doc/objxtor.cxx')
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/objxtor.cxx50
1 files changed, 36 insertions, 14 deletions
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index d09bad7feea3..fc6856fdb083 100644..100755
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -49,7 +49,7 @@
#include <svl/eitem.hxx>
#include <tools/rtti.hxx>
#include <svl/lstner.hxx>
-#include <sfxhelp.hxx>
+#include <sfx2/sfxhelp.hxx>
#include <basic/sbstar.hxx>
#include <svl/stritem.hxx>
#include <basic/sbx.hxx>
@@ -87,7 +87,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/viewfrm.hxx>
-#include "sfxresid.hxx"
+#include "sfx2/sfxresid.hxx"
#include "objshimp.hxx"
#include "appbas.hxx"
#include "sfxtypes.hxx"
@@ -98,8 +98,8 @@
#include "appdata.hxx"
#include <sfx2/appuno.hxx>
#include <sfx2/sfxsids.hrc>
-#include "basmgr.hxx"
-#include "QuerySaveDocument.hxx"
+#include "sfx2/basmgr.hxx"
+#include "sfx2/QuerySaveDocument.hxx"
#include "helpid.hrc"
#include <sfx2/msg.hxx>
#include "appbaslib.hxx"
@@ -197,11 +197,11 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
if ( mpDoc->Get_Impl()->bHiddenLockedByAPI )
{
- mpDoc->Get_Impl()->bHiddenLockedByAPI = FALSE;
- mpDoc->OwnerLock(FALSE);
+ mpDoc->Get_Impl()->bHiddenLockedByAPI = sal_False;
+ mpDoc->OwnerLock(sal_False);
}
else if ( !mpDoc->Get_Impl()->bClosing )
- // GCC crashes when already in the destructor, so first query the Flag
+ // GCC stuerzt ab, wenn schon im dtor, also vorher Flag abfragen
mpDoc->DoClose();
}
@@ -816,11 +816,33 @@ void SfxObjectShell::InitBasicManager_Impl()
*/
{
- DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicManager->isValid(), "Local BasicManager already exists");
- pImp->bBasicInitialized = TRUE;
-
+ /* #163556# (DR) - Handling of recursive calls while creating the Bacic
+ manager.
+
+ It is possible that (while creating the Basic manager) the code that
+ imports the Basic storage wants to access the Basic manager again.
+ Especially in VBA compatibility mode, there is code that wants to
+ access the "VBA Globals" object which is stored as global UNO constant
+ in the Basic manager.
+
+ To achieve correct handling of the recursive calls of this function
+ from lcl_getBasicManagerForDocument(), the implementation of the
+ function BasicManagerRepository::getDocumentBasicManager() has been
+ changed to return the Basic manager currently under construction, when
+ called repeatedly.
+
+ The variable pImp->bBasicInitialized will be set to sal_True after
+ construction now, to ensure that the recursive call of the function
+ lcl_getBasicManagerForDocument() will be routed into this function too.
+
+ Calling BasicManagerHolder::reset() twice is not a big problem, as it
+ does not take ownership but stores only the raw pointer. Owner of all
+ Basic managers is the global BasicManagerRepository instance.
+ */
+ DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicManager->isValid(), "Lokaler BasicManager bereits vorhanden");
pImp->pBasicManager->reset( BasicManagerRepository::getDocumentBasicManager( GetModel() ) );
DBG_ASSERT( pImp->pBasicManager->isValid(), "SfxObjectShell::InitBasicManager_Impl: did not get a BasicManager!" );
+ pImp->bBasicInitialized = sal_True;
}
//--------------------------------------------------------------------
@@ -846,7 +868,7 @@ SfxObjectShell* SfxObjectShell::GetObjectShell()
//--------------------------------------------------------------------
-SEQUENCE< OUSTRING > SfxObjectShell::GetEventNames()
+uno::Sequence< ::rtl::OUString > SfxObjectShell::GetEventNames()
{
static uno::Sequence< ::rtl::OUString >* pEventNameContainer = NULL;
@@ -936,7 +958,7 @@ String SfxObjectShell::GetServiceNameFromFactory( const String& rFact )
String aPrefix = String::CreateFromAscii( "private:factory/" );
if ( aPrefix.Len() == aFact.Match( aPrefix ) )
aFact.Erase( 0, aPrefix.Len() );
- USHORT nPos = aFact.Search( '?' );
+ sal_uInt16 nPos = aFact.Search( '?' );
String aParam;
if ( nPos != STRING_NOTFOUND )
{
@@ -1035,8 +1057,8 @@ Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxIte
{
uno::Sequence < beans::PropertyValue > aProps;
TransformItems( SID_OPENDOC, rSet, aProps );
- SFX_ITEMSET_ARG(&rSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE);
- SFX_ITEMSET_ARG(&rSet, pTargetItem, SfxStringItem, SID_TARGETNAME, FALSE);
+ SFX_ITEMSET_ARG(&rSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False);
+ SFX_ITEMSET_ARG(&rSet, pTargetItem, SfxStringItem, SID_TARGETNAME, sal_False);
::rtl::OUString aURL;
::rtl::OUString aTarget(RTL_CONSTASCII_USTRINGPARAM("_blank"));
if ( pFileNameItem )