summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-01-18 15:20:33 +0000
committerKurt Zenker <kz@openoffice.org>2005-01-18 15:20:33 +0000
commit1e870a64d6e58028386e905a5b03d80307125404 (patch)
treedfdf94b7f8c72193b802811623b3dd0b4c20eb18 /sfx2
parent420bee89a32beee989c2f4c6aa3c14aec4b0496a (diff)
INTEGRATION: CWS fwkbugfix04 (1.94.6); FILE MERGED
2005/01/14 12:50:55 mba 1.94.6.5: #i38655#: check for macros also after import of binary formats 2005/01/06 17:44:50 mba 1.94.6.4: RESYNC: (1.97-1.99); FILE MERGED 2004/12/08 15:16:57 mba 1.94.6.3: RESYNC: (1.94-1.97); FILE MERGED 2004/12/06 18:04:24 mba 1.94.6.2: #i38334#: get rid of all code based on SfxConfigManager 2004/12/02 16:44:34 mba 1.94.6.1: #i37963#: incorrect check for existence of macros
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewfrm.cxx51
1 files changed, 17 insertions, 34 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 3e27c7ad3598..1a0f534186ab 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewfrm.cxx,v $
*
- * $Revision: 1.99 $
+ * $Revision: 1.100 $
*
- * last change: $Author: as $ $Date: 2004-12-07 13:37:14 $
+ * last change: $Author: kz $ $Date: 2005-01-18 16:20:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -190,11 +190,9 @@ using namespace ::com::sun::star::lang;
#include "docfac.hxx"
#include "ipclient.hxx"
#include "sfxresid.hxx"
-#include "cfgmgr.hxx"
#include "appbas.hxx"
#include "objitem.hxx"
#include "viewfac.hxx"
-#include "stbmgr.hxx"
#include "event.hxx"
#include "fltfnc.hxx"
#include "docfile.hxx"
@@ -213,11 +211,7 @@ using namespace ::com::sun::star::lang;
#include "progress.hxx"
#include "workwin.hxx"
#include "helper.hxx"
-#include "tbxconf.hxx"
-#include "mnumgr.hxx"
-#include "virtmenu.hxx"
#include "macro.hxx"
-#include "tbxcust.hxx"
#include "minfitem.hxx"
#include "../appl/app.hrc"
//-------------------------------------------------------------------------
@@ -930,7 +924,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
pFrame->InsertDocument(xNewObj.Is() ? xNewObj : xOldObj );
}
- DELETEZ( pView->pImp->pMenuBar );
+ //DELETEZ( pView->pImp->pMenuBar );
pView->GetBindings().LEAVEREGISTRATIONS();
pView->GetDispatcher()->LockUI_Impl( sal_False );
}
@@ -3000,8 +2994,11 @@ void SfxViewFrame::StateView_Impl
void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
{
if ( GetViewShell() && GetViewShell()->GetVerbs().getLength() && !GetObjectShell()->IsInPlaceActive() )
- ;
- //rSet.Put(SfxVerbListItem(USHORT( SID_OBJECT ), GetViewShell()->GetVerbs() ));
+ {
+ uno::Any aAny;
+ aAny <<= GetViewShell()->GetVerbs();
+ rSet.Put( SfxUnoAnyItem( USHORT( SID_OBJECT ), aAny ) );
+ }
else
rSet.DisableItem( SID_OBJECT );
}
@@ -3878,7 +3875,7 @@ void SfxViewFrame::ToolboxExec_Impl( SfxRequest &rReq )
sal_uInt16 nTbxID = 0;
SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, sal_False);
BOOL bShow = sal_False;
-
+ /*
if ( nSID == SID_TOGGLE_MENUBAR )
{
SfxTopViewFrame* pTopView = PTR_CAST( SfxTopViewFrame, GetTopViewFrame() );
@@ -3923,7 +3920,7 @@ void SfxViewFrame::ToolboxExec_Impl( SfxRequest &rReq )
pViewFrame->GetDispatcher()->Update_Impl(sal_True);
pViewFrame = SfxViewFrame::GetNext(*pViewFrame);
}
- }
+ }*/
if ( !pShowItem )
rReq.AppendItem( SfxBoolItem( nSID, bShow ) );
@@ -3935,6 +3932,7 @@ void SfxViewFrame::ToolboxExec_Impl( SfxRequest &rReq )
void SfxViewFrame::ToolboxState_Impl( SfxItemSet &rSet )
{
+ /*
SfxWhichIter aIter(rSet);
for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
@@ -3990,7 +3988,7 @@ void SfxViewFrame::ToolboxState_Impl( SfxItemSet &rSet )
default:
DBG_ERROR( "invalid ObjectBar`s SID" );
}
- }
+ }*/
}
//--------------------------------------------------------------------
@@ -4059,11 +4057,6 @@ SfxChildWindow* SfxViewFrame::GetChildWindow(USHORT nId)
return pWork ? pWork->GetChildWindow_Impl(nId) : NULL;
}
-SfxAcceleratorManager* SfxViewFrame::GetAcceleratorManager()
-{
- return GetObjectShell()->GetAccMgr_Impl();
-}
-
SfxMacro* SfxViewFrame::GetRecordingMacro_Impl()
{
return pImp->pMacro;
@@ -4071,27 +4064,17 @@ SfxMacro* SfxViewFrame::GetRecordingMacro_Impl()
void SfxViewFrame::UpdateDocument_Impl()
{
- BOOL bHasMacros = FALSE;
- uno::Reference < embed::XStorage > xStor = GetObjectShell()->GetStorage();
- try
- {
- bHasMacros = xStor->isStorageElement( String::CreateFromAscii("Basic") );
- }
- catch ( uno::Exception& )
- {
- // if no element "Basic" exists, Exception is thrown
- }
-
- if ( bHasMacros )
- GetObjectShell()->AdjustMacroMode( String() );
+ SfxObjectShell* pDoc = GetObjectShell();
+ if ( pDoc->HasMacros_Impl() )
+ pDoc->AdjustMacroMode( String() );
else
{
// if macros will be added by the user later, the security check is obsolete
- GetObjectShell()->Get_Impl()->nMacroMode = ::com::sun::star::document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN;
+ pDoc->Get_Impl()->nMacroMode = ::com::sun::star::document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN;
}
// check if document depends from a template
- GetObjectShell()->UpdateFromTemplate_Impl();
+ pDoc->UpdateFromTemplate_Impl();
}
BOOL SfxViewFrame::ClearEventFlag_Impl()