User: kz Date: 2008-06-25 14:16:34+0000 Modified: dba/reportdesign/source/ui/report/ReportController.cxx
Log: INTEGRATION: CWS rptwizard01 (1.13.2); FILE MERGED 2008/06/20 09:18:06 lla 1.13.2.3: RESYNC: (1.14-1.16); FILE MERGED 2008/05/21 10:09:48 lla 1.13.2.2: RESYNC: (1.13-1.14); FILE MERGED 2008/04/22 12:23:49 oj 1.13.2.1: #i86908# new interface supported to allow a remote mode 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.17&r2=1.18 Delta lines: +49 -9 -------------------- --- ReportController.cxx 2008-06-25 11:37:04+0000 1.17 +++ ReportController.cxx 2008-06-25 14:16:32+0000 1.18 @@ -283,6 +283,7 @@ ,m_bChartEnabled(false) ,m_bChartEnabledAsked(false) { + m_sMode = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal")); DBG_CTOR( rpt_OReportController,NULL); } // ----------------------------------------------------------------------------- @@ -1318,9 +1319,11 @@ InvalidateAll(); break; case SID_RPT_SHOWREPORTEXPLORER: + if ( isUiVisible() ) m_pMyOwnView->toggleReportExplorer(); break; case SID_FM_ADD_FIELD: + if ( isUiVisible() ) m_pMyOwnView->toggleAddField(); break; case SID_SHOW_PROPERTYBROWSER: @@ -1329,11 +1332,14 @@ else m_pMyOwnView->setCurrentPage(m_sLastActivePage); + if ( isUiVisible() ) + { m_bShowProperties = !m_bShowProperties; if ( aArgs.getLength() == 1 ) aArgs[0].Value >>= m_bShowProperties; m_pMyOwnView->togglePropertyBrowser(m_bShowProperties); + } break; case SID_PROPERTYBROWSER_LAST_PAGE: // nothing to do m_sLastActivePage = m_pMyOwnView->getCurrentPage(); @@ -2094,7 +2100,7 @@ ) { InvalidateFeature(SID_FM_ADD_FIELD); - if ( !m_pMyOwnView->isAddFieldVisible() ) + if ( !m_pMyOwnView->isAddFieldVisible() && isUiVisible() ) m_pMyOwnView->toggleAddField(); } /// TODO: check what we need to notify here TitleHelper @@ -2363,7 +2369,7 @@ m_pGroupsFloater = new OGroupsSortingDialog(getView(),!isEditable(),this); m_pGroupsFloater->AddEventListener(LINK(this,OReportController,EventLstHdl)); } - else + else if ( isUiVisible() ) m_pGroupsFloater->Show(!m_pGroupsFloater->IsVisible()); } // ----------------------------------------------------------------------------- @@ -2729,7 +2735,7 @@ // ----------------------------------------------------------------------------- void OReportController::displayDesignFloater(sal_Bool _bShow) { - if ( m_pGroupsFloater ) + if ( m_pGroupsFloater && isUiVisible() ) { m_pGroupsFloater->Show( m_bGroupFloaterWasVisible && _bShow); } @@ -3677,6 +3683,40 @@ return xTitle->getTitle (); } // ----------------------------------------------------------------------------- +void SAL_CALL OReportController::setMode( const ::rtl::OUString& aMode ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException) +{ + ::osl::MutexGuard aGuard(m_aMutex); + m_sMode = aMode; +} +::rtl::OUString SAL_CALL OReportController::getMode( ) throw (::com::sun::star::uno::RuntimeException) +{ + ::osl::MutexGuard aGuard(m_aMutex); + return m_sMode; +} +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL OReportController::getSupportedModes( ) throw (::com::sun::star::uno::RuntimeException) +{ + static ::rtl::OUString s_sModes[] = { ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("remote")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal")) }; + return uno::Sequence< ::rtl::OUString> (&s_sModes[0],sizeof(s_sModes)/sizeof(s_sModes[0])); +} +::sal_Bool SAL_CALL OReportController::supportsMode( const ::rtl::OUString& aMode ) throw (::com::sun::star::uno::RuntimeException) +{ + uno::Sequence< ::rtl::OUString> aModes = getSupportedModes(); + const ::rtl::OUString* pIter = aModes.getConstArray(); + const ::rtl::OUString* pEnd = pIter + aModes.getLength(); + for(;pIter != pEnd;++pIter) + { + if ( pIter->equals(aMode ) ) + break; + } + return pIter != pEnd; +} +// ----------------------------------------------------------------------------- +bool OReportController::isUiVisible() const +{ + return !m_sMode.equalsAscii("remote"); +} +// ----------------------------------------------------------------------------- void OReportController::impl_fillState_nothrow(const ::rtl::OUString& _sProperty,dbaui::FeatureState& _rState) const { _rState.bEnabled = isEditable(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
