Tag: cws_dev300_rptchart02
User: oj      
Date: 2008-04-03 12:01:49+0000
Modified:
   dba/reportdesign/source/ui/inc/ReportSection.hxx
   dba/reportdesign/source/ui/inc/dlgedfunc.hxx
   dba/reportdesign/source/ui/inspection/DataProviderHandler.cxx
   dba/reportdesign/source/ui/report/ReportController.cxx
   dba/reportdesign/source/ui/report/ReportSection.cxx

Log:
 handle delete key properly when ole object is  ui active

File Changes:

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

File [changed]: ReportSection.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/ReportSection.hxx?r1=1.4.92.1&r2=1.4.92.2
Delta lines:  +4 -0
-------------------
--- ReportSection.hxx   2008-04-03 06:35:19+0000        1.4.92.1
+++ ReportSection.hxx   2008-04-03 12:01:45+0000        1.4.92.2
@@ -187,6 +187,10 @@
         /** deactivate the currect active ole object if any
         */
         void    deactivateOle();
+
+        /** returns true when an ole object is currently active
+        */
+        bool isUiActive() const;
        };
 //==================================================================
 }      //rptui

File [changed]: dlgedfunc.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/dlgedfunc.hxx?r1=1.5.22.1&r2=1.5.22.2
Delta lines:  +2 -0
-------------------
--- dlgedfunc.hxx       2008-04-03 06:35:20+0000        1.5.22.1
+++ dlgedfunc.hxx       2008-04-03 12:01:46+0000        1.5.22.2
@@ -123,6 +123,8 @@
     /** deactivate all ole object
     */
     void    deactivateOle(bool _bSelect = false);
+
+    inline bool isUiActive() const { return m_bUiActive; }
 protected:
     void colorizeOverlappedObject(SdrObject* _pOverlappedObj);
     void unColorizeOverlappedObj();

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

File [changed]: DataProviderHandler.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inspection/DataProviderHandler.cxx?r1=1.2.4.1&r2=1.2.4.2
Delta lines:  +30 -27
---------------------
--- DataProviderHandler.cxx     2008-03-12 09:45:18+0000        1.2.4.1
+++ DataProviderHandler.cxx     2008-04-03 12:01:46+0000        1.2.4.2
@@ -459,6 +459,8 @@
 
     if ( ActuatingPropertyName == PROPERTY_COMMAND )
     {
+        if ( NewValue != OldValue )
+        {
         uno::Reference< report::XReportDefinition> xReport = 
m_xReportComponent->getSection()->getReportDefinition();
         bool bDoEnableMasterDetailFields = xReport.is() && 
xReport->getCommand().getLength() && m_xDataProvider->getCommand().getLength();
         InspectorUI->enablePropertyUIElements( PROPERTY_DETAILFIELDS, 
inspection::PropertyLineElement::PrimaryButton, bDoEnableMasterDetailFields );
@@ -484,6 +486,7 @@
         if ( !bModified )
             xReport->setModified(sal_False);
     }
+    }
     else
     {
         const sal_Int32 nId = 
m_pInfoService->getPropertyId(ActuatingPropertyName);

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.12.4.1&r2=1.12.4.2
Delta lines:  +6 -0
-------------------
--- ReportController.cxx        2008-04-03 06:35:21+0000        1.12.4.1
+++ ReportController.cxx        2008-04-03 12:01:46+0000        1.12.4.2
@@ -623,6 +623,12 @@
             break;
                case SID_DELETE:
                        aReturn.bEnabled = isEditable() && 
m_pMyOwnView->HasSelection() && !m_pMyOwnView->isHandleEvent(_nId);
+            if ( aReturn.bEnabled )
+            {
+                ::boost::shared_ptr<OReportSection> pSection = 
m_pMyOwnView->getMarkedSection();
+                if ( pSection )
+                    aReturn.bEnabled = !pSection->isUiActive();
+            }
             {
                 ::rtl::OUString sText = String(ModuleRes(RID_STR_DELETE));
                 aReturn.sTitle = sText;

File [changed]: ReportSection.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportSection.cxx?r1=1.8.4.2&r2=1.8.4.3
Delta lines:  +5 -0
-------------------
--- ReportSection.cxx   2008-04-03 06:35:21+0000        1.8.4.2
+++ ReportSection.cxx   2008-04-03 12:01:46+0000        1.8.4.3
@@ -834,6 +834,11 @@
     m_pFunc->stopScrollTimer();
 }
 // 
-----------------------------------------------------------------------------
+bool OReportSection::isUiActive() const
+{
+    return m_pFunc->isUiActive();
+}
+// 
-----------------------------------------------------------------------------
 // 
=============================================================================
 }
 // 
=============================================================================




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

Reply via email to