Tag: cws_src680_odbmacros2 User: fs Date: 2008-01-24 10:33:52+0000 Modified: dba/dbaccess/source/ui/app/AppController.cxx
Log: #i49133# make the 'migration scripts and macros' item invisible when it's disabled File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppController.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.50.2.2&r2=1.50.2.3 Delta lines: +9 -4 ------------------- --- AppController.cxx 2008-01-24 10:09:35+0000 1.50.2.2 +++ AppController.cxx 2008-01-24 10:33:50+0000 1.50.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: AppController.cxx,v $ * - * $Revision: 1.50.2.2 $ + * $Revision: 1.50.2.3 $ * - * last change: $Author: fs $ $Date: 2008/01/24 10:09:35 $ + * last change: $Author: fs $ $Date: 2008/01/24 10:33:50 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -682,10 +682,15 @@ aReturn.bEnabled = sal_True; break; case ID_MIGRATE_SCRIPTS: + { // Our document supports embedding scripts into it, if and only if there are no // forms/reports with macros/scripts into them. So, we need to enable migration // if and only if the database document does *not* support embedding scripts. - aReturn.bEnabled = !Reference< XEmbeddedScripts >( m_xModel, UNO_QUERY ).is(); + bool bAvailable = !Reference< XEmbeddedScripts >( m_xModel, UNO_QUERY ).is(); + aReturn.bEnabled = bAvailable; + if ( !bAvailable ) + aReturn.bInvisible = true; + } break; case SID_APP_NEW_FOLDER: aReturn.bEnabled = !isDataSourceReadOnly() && getContainer()->getSelectionCount() <= 1; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
