Tag: cws_src680_oj14 User: oj Date: 06/04/25 06:00:37 Modified: /dba/dbaccess/source/ui/app/ AppController.cxx, AppController.hxx, AppControllerDnD.cxx, AppControllerGen.cxx, AppDetailPageHelper.cxx, AppDetailView.cxx, AppDetailView.hxx, AppIconControl.cxx, AppSwapWindow.cxx, AppTitleWindow.cxx
Log: new include 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.22.4.4&r2=1.22.4.5 Delta lines: +21 -7 -------------------- --- AppController.cxx 20 Mar 2006 13:52:03 -0000 1.22.4.4 +++ AppController.cxx 25 Apr 2006 13:00:30 -0000 1.22.4.5 @@ -4,9 +4,9 @@ * * $RCSfile: AppController.cxx,v $ * - * $Revision: 1.22.4.4 $ + * $Revision: 1.22.4.5 $ * - * last change: $Author: oj $ $Date: 2006/03/20 13:52:03 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:30 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -61,6 +61,9 @@ #ifndef _COM_SUN_STAR_SDB_XBOOKMARKSSUPPLIER_HPP_ #include <com/sun/star/sdb/XBookmarksSupplier.hpp> #endif +#ifndef _COM_SUN_STAR_CONTAINER_XCONTENTENUMERATIONACCESS_HPP_ +#include <com/sun/star/container/XContentEnumerationAccess.hpp> +#endif #ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_ #include <com/sun/star/sdbcx/XAppend.hpp> #endif @@ -243,9 +246,6 @@ #ifndef _DBACCESS_SLOTID_HRC_ #include "dbaccess_slotid.hrc" #endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" -#endif #include <algorithm> #include <functional> @@ -662,8 +662,22 @@ case SID_NEWDOC: case SID_APP_NEW_FORM: case ID_DOCUMENT_CREATE_REPWIZ: - case SID_APP_NEW_REPORT: aReturn.bEnabled = !isDataSourceReadOnly() && SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SWRITER); + break; + case SID_APP_NEW_REPORT: + aReturn.bEnabled = !isDataSourceReadOnly() + && SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SWRITER); + if ( aReturn.bEnabled ) + { + Reference< XContentEnumerationAccess > xEnumAccess(m_xServiceFactory, UNO_QUERY); + Reference< XEnumeration > xEnumDrivers; + if ( aReturn.bEnabled = xEnumAccess.is() ) + { + static ::rtl::OUString s_sReportDesign(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ReportDesign")); + xEnumDrivers = xEnumAccess->createContentEnumeration(s_sReportDesign); + aReturn.bEnabled = xEnumDrivers.is() && xEnumDrivers->hasMoreElements(); + } + } break; case SID_DB_APP_VIEW_TABLES: aReturn.bEnabled = sal_True; File [changed]: AppController.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.hxx?r1=1.12.4.2&r2=1.12.4.3 Delta lines: +7 -4 ------------------- --- AppController.hxx 3 Jan 2006 13:18:14 -0000 1.12.4.2 +++ AppController.hxx 25 Apr 2006 13:00:31 -0000 1.12.4.3 @@ -4,9 +4,9 @@ * * $RCSfile: AppController.hxx,v $ * - * $Revision: 1.12.4.2 $ + * $Revision: 1.12.4.3 $ * - * last change: $Author: oj $ $Date: 2006/01/03 13:18:14 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:31 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -90,6 +90,9 @@ #ifndef _DBAUI_COMMON_TYPES_HXX_ #include "commontypes.hxx" #endif +#ifndef _DBAUI_MODULE_DBU_HXX_ +#include "moduledbu.hxx" +#endif #include <memory> File [changed]: AppControllerDnD.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerDnD.cxx?r1=1.12.4.4&r2=1.12.4.5 Delta lines: +3 -6 ------------------- --- AppControllerDnD.cxx 20 Mar 2006 13:52:15 -0000 1.12.4.4 +++ AppControllerDnD.cxx 25 Apr 2006 13:00:31 -0000 1.12.4.5 @@ -4,9 +4,9 @@ * * $RCSfile: AppControllerDnD.cxx,v $ * - * $Revision: 1.12.4.4 $ + * $Revision: 1.12.4.5 $ * - * last change: $Author: oj $ $Date: 2006/03/20 13:52:15 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:31 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -95,9 +95,6 @@ #endif #ifndef _URLOBJ_HXX #include <tools/urlobj.hxx> -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" #endif #ifndef _UNOTOOLS_UCBHELPER_HXX #include <unotools/ucbhelper.hxx> File [changed]: AppControllerGen.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.14.4.3&r2=1.14.4.4 Delta lines: +2 -5 ------------------- --- AppControllerGen.cxx 20 Mar 2006 07:48:06 -0000 1.14.4.3 +++ AppControllerGen.cxx 25 Apr 2006 13:00:32 -0000 1.14.4.4 @@ -4,9 +4,9 @@ * * $RCSfile: AppControllerGen.cxx,v $ * - * $Revision: 1.14.4.3 $ + * $Revision: 1.14.4.4 $ * - * last change: $Author: oj $ $Date: 2006/03/20 07:48:06 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:32 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -68,9 +68,6 @@ #endif #ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include <connectivity/dbtools.hxx> -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" #endif #ifndef _DBHELPER_DBEXCEPTION_HXX_ #include <connectivity/dbexception.hxx> File [changed]: AppDetailPageHelper.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx?r1=1.9.4.3&r2=1.9.4.4 Delta lines: +6 -3 ------------------- --- AppDetailPageHelper.cxx 20 Mar 2006 13:52:30 -0000 1.9.4.3 +++ AppDetailPageHelper.cxx 25 Apr 2006 13:00:32 -0000 1.9.4.4 @@ -4,9 +4,9 @@ * * $RCSfile: AppDetailPageHelper.cxx,v $ * - * $Revision: 1.9.4.3 $ + * $Revision: 1.9.4.4 $ * - * last change: $Author: oj $ $Date: 2006/03/20 13:52:30 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:32 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -34,6 +34,9 @@ ************************************************************************/ #ifndef DBAUI_APPDETAILPAGEHELPER_HXX #include "AppDetailPageHelper.hxx" +#endif +#ifndef _DBAUI_MODULE_DBU_HXX_ +#include "moduledbu.hxx" #endif #ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> File [changed]: AppDetailView.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailView.cxx?r1=1.12.4.3&r2=1.12.4.4 Delta lines: +30 -16 --------------------- --- AppDetailView.cxx 20 Mar 2006 13:53:01 -0000 1.12.4.3 +++ AppDetailView.cxx 25 Apr 2006 13:00:33 -0000 1.12.4.4 @@ -4,9 +4,9 @@ * * $RCSfile: AppDetailView.cxx,v $ * - * $Revision: 1.12.4.3 $ + * $Revision: 1.12.4.4 $ * - * last change: $Author: oj $ $Date: 2006/03/20 13:53:01 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:33 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -83,9 +83,6 @@ #ifndef DBAUI_APPDETAILPAGEHELPER_HXX #include "AppDetailPageHelper.hxx" #endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" -#endif #ifndef _SV_SVAPP_HXX //autogen #include <vcl/svapp.hxx> #endif @@ -95,9 +92,13 @@ #ifndef DBAUI_ICONTROLLER_HXX #include "IController.hxx" #endif +#ifndef _DBAUI_MODULE_DBU_HXX_ +#include "moduledbu.hxx" +#endif #ifndef _SVTOOLS_LOCALRESACCESS_HXX_ #include <svtools/localresaccess.hxx> #endif +#include <algorithm> using namespace ::dbaui; @@ -469,11 +470,30 @@ m_aFL.SetPosSizePixel( Point(nHalfOutputWidth , 0), Size(aFLSize.Width(), nOutputHeight ) ); } // ----------------------------------------------------------------------------- -void OTasksWindow::fillCreationNew( const TResourceStruct& _rList ) +struct TResourcePairFunctor : public ::std::unary_function< ::std::pair<String, TResourcePair>, bool> +{ + IController* pController; + + TResourcePairFunctor(IController* _pController):pController(_pController){} + + bool operator() (const ::std::pair<String, TResourcePair>& lhs) const + { + ::com::sun::star::util::URL aUrl; + aUrl.Complete = lhs.second.first; + return !pController->isCommandEnabled(aUrl); + } +}; + +// ----------------------------------------------------------------------------- +void OTasksWindow::fillCreationNew( TResourceStruct& _rList ) { DBG_CHKTHIS(OTasksWindow,NULL); Clear(); + TResourcePairFunctor aFunctor(getDetailView()->getBorderWin()->getView()->getCommandController()); + _rList.erase(::std::remove_if(_rList.begin(),_rList.end(),aFunctor),_rList.end()); + + try { Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(getDetailView()->getBorderWin()->getView()->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))),UNO_QUERY); @@ -518,6 +538,7 @@ m_aDescription.Show(); m_aFL.Show(); m_aCreation.updateHelpText(); + Enable(!_rList.empty()); } // ----------------------------------------------------------------------------- void OTasksWindow::Clear() @@ -635,14 +656,10 @@ aList.push_back( TResourceStruct::value_type(ModuleRes(RID_STR_NEW_TABLE),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewTable")),RID_STR_TABLES_HELP_TEXT_DESIGN))); aList.push_back( TResourceStruct::value_type(ModuleRes(RID_STR_NEW_TABLE_AUTO),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewTableAutoPilot")),RID_STR_TABLES_HELP_TEXT_WIZARD))); - ::com::sun::star::util::URL aUrl; - aUrl.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewView")); - if ( getBorderWin()->getView()->getCommandController()->isCommandEnabled(aUrl) ) - aList.push_back( TResourceStruct::value_type(ModuleRes(RID_STR_NEW_VIEW),TResourcePair(aUrl.Complete,RID_STR_VIEWS_HELP_TEXT_DESIGN))); + aList.push_back( TResourceStruct::value_type(ModuleRes(RID_STR_NEW_VIEW),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewView")),RID_STR_VIEWS_HELP_TEXT_DESIGN))); // aList.push_back( TResourceStruct::value_type(ModuleRes(RID_STR_NEW_VIEW_AUTO),TResourcePair(ID_NEW_VIEW_DESIGN_AUTO_PILOT,RID_STR_VIEWS_HELP_TEXT_WIZARD))); static_cast<OTasksWindow*>(m_aTasks.getChildWindow())->fillCreationNew( aList ); - static_cast<OTasksWindow*>(m_aTasks.getChildWindow())->Enable(static_cast<OAppBorderWindow*>(GetParent())->getView()->getCommandController()->isCommandEnabled(ID_NEW_TABLE_DESIGN)); m_pControlHelper->createTablesPage(_xConnection); m_aContainer.setTitle(RID_STR_TABLES_CONTAINER); @@ -663,7 +680,6 @@ aList.push_back( TResourceStruct::value_type(ModuleRes(RID_STR_NEW_FORM_AUTO),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewFormAutoPilot")),RID_STR_FORMS_HELP_TEXT_WIZARD))); nTitleId = RID_STR_FORMS_CONTAINER; - static_cast<OTasksWindow*>(m_aTasks.getChildWindow())->Enable(static_cast<OAppBorderWindow*>(GetParent())->getView()->getCommandController()->isCommandEnabled(SID_APP_NEW_FORM)); } break; case E_REPORT: @@ -672,7 +688,6 @@ aList.push_back( TResourceStruct::value_type(ModuleRes(RID_STR_NEW_REPORT_AUTO),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewReportAutoPilot")),RID_STR_REPORTS_HELP_TEXT_WIZARD))); nTitleId = RID_STR_REPORTS_CONTAINER; - static_cast<OTasksWindow*>(m_aTasks.getChildWindow())->Enable(static_cast<OAppBorderWindow*>(GetParent())->getView()->getCommandController()->isCommandEnabled(ID_DOCUMENT_CREATE_REPWIZ)); } break; case E_QUERY: @@ -682,7 +697,6 @@ aList.push_back( TResourceStruct::value_type(ModuleRes(RID_STR_NEW_QUERY_SQL),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewQuerySql")),RID_STR_QUERIES_HELP_TEXT_SQL))); nTitleId = RID_STR_QUERIES_CONTAINER; - static_cast<OTasksWindow*>(m_aTasks.getChildWindow())->Enable(static_cast<OAppBorderWindow*>(GetParent())->getView()->getCommandController()->isCommandEnabled(ID_NEW_QUERY_DESIGN)); } break; default: File [changed]: AppDetailView.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailView.hxx?r1=1.11&r2=1.11.56.1 Delta lines: +4 -4 ------------------- --- AppDetailView.hxx 3 Jan 2006 16:16:14 -0000 1.11 +++ AppDetailView.hxx 25 Apr 2006 13:00:33 -0000 1.11.56.1 @@ -4,9 +4,9 @@ * * $RCSfile: AppDetailView.hxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.11.56.1 $ * - * last change: $Author: kz $ $Date: 2006/01/03 16:16:14 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:33 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -148,7 +148,7 @@ @param _rList The strings and the id of the images and help texts to add. */ - void fillCreationNew( const TResourceStruct& _rList ); + void fillCreationNew( TResourceStruct& _rList ); void Clear(); void setHelpText(USHORT _nId); File [changed]: AppIconControl.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppIconControl.cxx?r1=1.7.4.2&r2=1.7.4.3 Delta lines: +6 -6 ------------------- --- AppIconControl.cxx 20 Mar 2006 07:48:07 -0000 1.7.4.2 +++ AppIconControl.cxx 25 Apr 2006 13:00:34 -0000 1.7.4.3 @@ -4,9 +4,9 @@ * * $RCSfile: AppIconControl.cxx,v $ * - * $Revision: 1.7.4.2 $ + * $Revision: 1.7.4.3 $ * - * last change: $Author: oj $ $Date: 2006/03/20 07:48:07 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:34 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -41,14 +41,14 @@ #ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" #endif +#ifndef _DBAUI_MODULE_DBU_HXX_ +#include "moduledbu.hxx" +#endif #ifndef _DBU_APP_HRC_ #include "dbu_app.hrc" #endif #ifndef _IMAGE_HXX //autogen #include <vcl/image.hxx> -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" #endif #ifndef _DBACCESS_UI_CALLBACKS_HXX_ #include "callbacks.hxx" File [changed]: AppSwapWindow.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppSwapWindow.cxx?r1=1.6.4.3&r2=1.6.4.4 Delta lines: +3 -6 ------------------- --- AppSwapWindow.cxx 20 Mar 2006 13:53:44 -0000 1.6.4.3 +++ AppSwapWindow.cxx 25 Apr 2006 13:00:34 -0000 1.6.4.4 @@ -4,9 +4,9 @@ * * $RCSfile: AppSwapWindow.cxx,v $ * - * $Revision: 1.6.4.3 $ + * $Revision: 1.6.4.4 $ * - * last change: $Author: oj $ $Date: 2006/03/20 13:53:44 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:34 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -49,9 +49,6 @@ #endif #ifndef DBAUI_IAPPELEMENTNOTIFICATION_HXX #include "IAppElementNotification.hxx" -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" #endif #ifndef _SV_SVAPP_HXX #include <vcl/svapp.hxx> File [changed]: AppTitleWindow.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppTitleWindow.cxx?r1=1.6.4.3&r2=1.6.4.4 Delta lines: +6 -6 ------------------- --- AppTitleWindow.cxx 20 Mar 2006 13:54:24 -0000 1.6.4.3 +++ AppTitleWindow.cxx 25 Apr 2006 13:00:35 -0000 1.6.4.4 @@ -4,9 +4,9 @@ * * $RCSfile: AppTitleWindow.cxx,v $ * - * $Revision: 1.6.4.3 $ + * $Revision: 1.6.4.4 $ * - * last change: $Author: oj $ $Date: 2006/03/20 13:54:24 $ + * last change: $Author: oj $ $Date: 2006/04/25 13:00:35 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -35,12 +35,12 @@ #ifndef DBAUI_TITLE_WINDOW_HXX #include "AppTitleWindow.hxx" #endif +#ifndef _DBAUI_MODULE_DBU_HXX_ +#include "moduledbu.hxx" +#endif #include "memory" #ifndef _SV_SVAPP_HXX //autogen #include <vcl/svapp.hxx> -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" #endif #ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
