Tag: cws_src680_reportdesign02
User: oj      
Date: 2007-10-26 11:26:02+0000
Modified:
   dba/reportdesign/source/ui/report/ReportController.cxx

Log:
 #i77086# enable execute button ony when at least one field exists

File Changes:

Directory: /dba/reportdesign/source/ui/report/
==============================================

File [changed]: ReportController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportController.cxx?r1=1.4&r2=1.4.36.1
Delta lines:  +13 -3
--------------------
--- ReportController.cxx        2007-08-03 12:45:38+0000        1.4
+++ ReportController.cxx        2007-10-26 11:26:00+0000        1.4.36.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ReportController.cxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.4.36.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/08/03 12:45:38 $
+ *  last change: $Author: oj $ $Date: 2007/10/26 11:26:00 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -634,6 +634,16 @@
         case SID_EXECUTE_REPORT:
             aReturn.bEnabled = isConnected() && isEditable() && 
m_xReportDefinition.is()
                                              && 
m_xReportDefinition->getCommand().getLength();
+            if ( aReturn.bEnabled )
+            {
+                aReturn.bEnabled = sal_False;
+                   const sal_uInt16 nCount = m_aReportModel->GetPageCount();
+                for (sal_uInt16 i = 0; i < nCount && !aReturn.bEnabled ; ++i)
+                {
+                    const SdrPage* pPage = m_aReportModel->GetPage(i);
+                    aReturn.bEnabled = pPage->GetObjCount() != 0;
+                }
+            }
             break;
                case SID_DELETE:
                        aReturn.bEnabled = isEditable() && 
m_pMyOwnView->HasSelection() && !m_pMyOwnView->isHandleEvent(_nId);




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to