Tag: cws_src680_oj14 User: oj Date: 2007-05-11 09:24:22+0000 Modified: dba/reportdesign/inc/helpids.hrc dba/reportdesign/source/ui/dlg/dbgsv.log dba/reportdesign/source/ui/inc/DesignView.hxx dba/reportdesign/source/ui/inc/ReportController.hxx dba/reportdesign/source/ui/inc/ReportSection.hxx dba/reportdesign/source/ui/misc/UITools.cxx dba/reportdesign/source/ui/report/DesignView.cxx dba/reportdesign/source/ui/report/ReportController.cxx dba/reportdesign/source/ui/report/makefile.mk dba/reportdesign/util/hidother.src
Log: remove unnescessary tabpage File Changes: Directory: /dba/reportdesign/inc/ ================================= File [changed]: helpids.hrc Url: http://dba.openoffice.org/source/browse/dba/reportdesign/inc/helpids.hrc?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +3 -3 ------------------- --- helpids.hrc 2007-05-10 06:29:35+0000 1.1.2.1 +++ helpids.hrc 2007-05-11 09:24:18+0000 1.1.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: helpids.hrc,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/10 06:29:35 $ + * last change: $Author: oj $ $Date: 2007/05/11 09:24:18 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -100,7 +100,7 @@ #define HID_PROP_PAGEHEADEROPTION (HID_RPT_START + 57) #define HID_PROP_PAGEFOOTEROPTION (HID_RPT_START + 58) #define UID_PROP_DLG_LINE_STYLE (HID_RPT_START + 59) -#define UID_APP_DESIGNVIEW (HID_RPT_START + 60) +// free #define HID_PROP_DATAFIELD (HID_RPT_START + 61) #define HID_PROP_BACKCOLOR (HID_RPT_START + 62) #define HID_PROP_POSITIONX (HID_RPT_START + 63) Directory: /dba/reportdesign/source/ui/dlg/ =========================================== File [changed]: dbgsv.log Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/dlg/dbgsv.log?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +1 -1 ------------------- --- dbgsv.log 2007-05-10 12:14:24+0000 1.1.2.2 +++ dbgsv.log 2007-05-11 09:24:19+0000 1.1.2.3 @@ -1,6 +1,6 @@ ****************************************************************************** dbgsv.log -Thu May 10 08:42:34 2007 +Fri May 11 08:45:57 2007 Error: String::String() : nLen is wrong Error: String::String() : nLen is wrong Directory: /dba/reportdesign/source/ui/inc/ =========================================== File [changed]: DesignView.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/DesignView.hxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +12 -8 -------------------- --- DesignView.hxx 2007-05-09 13:56:51+0000 1.1.2.1 +++ DesignView.hxx 2007-05-11 09:24:19+0000 1.1.2.2 @@ -6,9 +6,9 @@ * * $RCSfile: DesignView.hxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/09 13:56:51 $ + * last change: $Author: oj $ $Date: 2007/05/11 09:24:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -104,20 +104,19 @@ class OUnoObject; class OSectionView; class OReportController; - class OReportTabControl; class PropBrw; class OAddFieldWindow; class OReportModel; class ONavigator; //================================================================== //================================================================== - class ODesignView : public TabPage, public SfxBroadcaster, public IMarkedSection + class ODesignView : public dbaui::ODataView, public SfxBroadcaster, public IMarkedSection { private: Splitter m_aSplitter; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xReportComponent; - OReportTabControl* m_pTabControl; + OReportController* m_pReportController; OScrollWindowHelper* m_pScrollWindow; Window* m_pTaskPane; PropBrw* m_pPropWin; @@ -145,22 +144,27 @@ void operator =(ODesignView&); protected: // return the Rectangle where I can paint myself + virtual void resizeDocumentView(Rectangle& rRect); + // return the Rectangle where I can paint myself virtual void DataChanged( const DataChangedEvent& rDCEvt ); public: - ODesignView(OReportTabControl* pParent); + ODesignView(Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&, + OReportController* _pController); virtual ~ODesignView(); // window overloads - virtual void Resize(); virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual void GetFocus(); // set the view readonly or not virtual void setReadOnly(sal_Bool _bReadOnly); virtual void initialize(); - OReportController* getController() const; + inline OReportController* getController() const { return m_pReportController; } void SetMode( DlgEdMode m_eMode ); void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString()); File [changed]: ReportController.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/ReportController.hxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +5 -5 ------------------- --- ReportController.hxx 2007-05-09 13:58:20+0000 1.1.2.1 +++ ReportController.hxx 2007-05-11 09:24:19+0000 1.1.2.2 @@ -6,9 +6,9 @@ * * $RCSfile: ReportController.hxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/09 13:58:20 $ + * last change: $Author: oj $ $Date: 2007/05/11 09:24:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -113,7 +113,7 @@ class VclWindowEvent; namespace rptui { - class OReportDesignView; + class ODesignView; class OGroupsSortingDialog; class OPropertyMediator; class OReportModel; @@ -137,7 +137,7 @@ OModuleClient m_aModuleClient; ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> m_aCollapsedSections; - OReportDesignView* m_pMyOwnView; // we want to avoid casts + ODesignView* m_pMyOwnView; // we want to avoid casts TransferableDataHelper m_aSystemClipboard; // content of the clipboard TransferableClipboardListener* m_pClipbordNotifier; /// notifier for changes in the clipboard @@ -231,7 +231,7 @@ ,sal_Int32 _nGroupPos ,bool _bShow); - void executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,OReportDesignView>& _pMemfun); + void executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun); void alignControlsWithUndo(USHORT _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection = false); /** opens the file open dialog to allow the user to select a image which will be File [changed]: ReportSection.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/ReportSection.hxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +4 -5 ------------------- --- ReportSection.hxx 2007-05-09 13:59:15+0000 1.1.2.1 +++ ReportSection.hxx 2007-05-11 09:24:19+0000 1.1.2.2 @@ -6,9 +6,9 @@ * * $RCSfile: ReportSection.hxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/09 13:59:15 $ + * last change: $Author: oj $ $Date: 2007/05/11 09:24:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -41,9 +41,6 @@ #ifndef _REPORT_RPTUIPAGE_HXX #include "RptPage.hxx" #endif -#ifndef RPTUI_REPORTDESIGNVIEW_HXX -#include "ReportDesignView.hxx" -#endif #ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_ #include <com/sun/star/beans/NamedValue.hpp> #endif @@ -53,6 +50,7 @@ #ifndef _CPPUHELPER_BASEMUTEX_HXX_ #include "cppuhelper/basemutex.hxx" #endif +#include "ReportDefines.hxx" #ifndef _REPORT_RPTUIFUNC_HXX #include "dlgedfunc.hxx" #endif @@ -62,6 +60,7 @@ #ifndef _RTL_REF_HXX_ #include <rtl/ref.hxx> #endif +#include <boost/shared_ptr.hpp> #include <memory> namespace rptui Directory: /dba/reportdesign/source/ui/misc/ ============================================ File [changed]: UITools.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/misc/UITools.cxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +8 -5 ------------------- --- UITools.cxx 2007-05-09 13:51:00+0000 1.1.2.1 +++ UITools.cxx 2007-05-11 09:24:19+0000 1.1.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: UITools.cxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/09 13:51:00 $ + * last change: $Author: oj $ $Date: 2007/05/11 09:24:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -524,10 +524,13 @@ { if ( _pIgnore != pObjIter && (_bAllObjects || !_rView.IsObjMarked(pObjIter)) - && dynamic_cast<OUnoObject*>(pObjIter) != NULL - && _rRect.IsOver(pObjIter->GetLastBoundRect()) ) + && dynamic_cast<OUnoObject*>(pObjIter) != NULL ) + { + Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect()); + if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) ) pOverlappedObj = pObjIter; } + } return pOverlappedObj; } //---------------------------------------------------------------------------- Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: DesignView.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/DesignView.cxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +71 -44 --------------------- --- DesignView.cxx 2007-05-09 14:05:50+0000 1.1.2.1 +++ DesignView.cxx 2007-05-11 09:24:19+0000 1.1.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: DesignView.cxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/09 14:05:50 $ + * last change: $Author: oj $ $Date: 2007/05/11 09:24:19 $ * * 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 @@ #ifndef REPORT_REPORTSECTION_HXX #include "ReportSection.hxx" #endif -#ifndef RPTUI_REPORTTABCONTROL_HXX -#include "ReportTabControl.hxx" -#endif #ifndef _RPTUI_SLOTID_HRC_ #include "rptui_slotid.hrc" #endif @@ -104,10 +101,12 @@ //================================================================== DBG_NAME( rpt_ODesignView ); //------------------------------------------------------------------------------ -ODesignView::ODesignView( OReportTabControl* pParent) : - TabPage( pParent,WB_DIALOGCONTROL ) +ODesignView::ODesignView( Window* pParent, + const Reference< XMultiServiceFactory >& _rxOrb, + OReportController* _pController) : + ODataView( pParent,_pController,_rxOrb ) ,m_aSplitter(this,WB_HSCROLL) - ,m_pTabControl(pParent) + ,m_pReportController( _pController ) ,m_pPropWin(NULL) ,m_pAddField(NULL) ,m_pCurrentView(NULL) @@ -122,7 +121,7 @@ ,m_bInSplitHandler( FALSE ) { DBG_CTOR( rpt_ODesignView,NULL); - SetUniqueId(UID_APP_DESIGNVIEW); + SetUniqueId(UID_RPT_APP_VIEW); ImplInitSettings(); SetMapMode( MapMode( MAP_100TH_MM ) ); @@ -175,19 +174,55 @@ m_pScrollWindow->initialize(); m_pScrollWindow->Show(); } +//----------------------------------------------------------------------------- +void ODesignView::DataChanged( const DataChangedEvent& rDCEvt ) +{ + ODataView::DataChanged( rDCEvt ); + + if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && + (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + { + ImplInitSettings(); + Invalidate(); + } +} //------------------------------------------------------------------------------ -void ODesignView::Resize() +long ODesignView::PreNotify( NotifyEvent& rNEvt ) { - Window::Resize(); - Rectangle aPlayground( Point( 0, 0), GetSizePixel() ); - if ( !aPlayground.IsEmpty() ) + long nRet = ODataView::PreNotify(rNEvt); + switch(rNEvt.GetType()) + { + case EVENT_KEYINPUT: + //if ( nRet != 1L ) + { + const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); + const KeyCode& rCode = pKeyEvent->GetKeyCode(); + if ( handleKeyCode(rCode) ) + nRet = 1L; + else if ( nRet == 1L && m_pAccel.get() && m_pController ) + { + util::URL aUrl; + aUrl.Complete = m_pAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rCode)); + if ( aUrl.Complete.getLength() && !m_pController->isCommandEnabled(aUrl) ) + nRet = 0L; + } + } + break; + default: + break; + } + + return nRet; +} +//------------------------------------------------------------------------------ +void ODesignView::resizeDocumentView(Rectangle& _rPlayground) +{ + if ( !_rPlayground.IsEmpty() ) { const Size aFLSize = LogicToPixel( Size( 3, 3 ), MAP_APPFONT ); - aPlayground.Move( aFLSize.A(),aFLSize.B() ); - const Size aOldSize = aPlayground.GetSize(); - aPlayground.SetSize( Size(aOldSize.A() - 2*aFLSize.A(), aOldSize.B() - 2*aFLSize.B()) ); + const Size aOldSize = _rPlayground.GetSize(); - const Size aPlaygroundSize( aPlayground.GetSize() ); + const Size aPlaygroundSize( _rPlayground.GetSize() ); // calc the split pos, and forward it to the controller sal_Int32 nSplitPos = getController()->getSplitPos(); @@ -200,33 +235,33 @@ long nMinWidth = static_cast<long>(0.1*aPlaygroundSize.Width()); if ( m_pPropWin && m_pPropWin->IsVisible() ) nMinWidth = m_pPropWin->GetMinOutputSizePixel().Width(); - nSplitPos = static_cast<sal_Int32>(aPlayground.Right() - nMinWidth); + nSplitPos = static_cast<sal_Int32>(_rPlayground.Right() - nMinWidth); getController()->setSplitPos(nSplitPos); } - } // if ( 0 != aPlaygroundSize.Width() ) + } // if ( 0 != _rPlaygroundSize.Width() ) - Size aReportWindowSize(aPlayground.GetWidth(),aPlayground.GetHeight()); + Size aReportWindowSize(_rPlayground.GetWidth(),_rPlayground.GetHeight()); if ( m_aSplitter.IsVisible() ) { // normalize the split pos - Size aSplitSize( m_aSplitter.GetSizePixel().Width(),aPlayground.GetHeight()); + Size aSplitSize( m_aSplitter.GetSizePixel().Width(),_rPlayground.GetHeight()); - Point aTaskPanePos(nSplitPos + aFLSize.A(), aPlayground.Top()); + Point aTaskPanePos(nSplitPos + aFLSize.A(), _rPlayground.Top()); //long nTest = m_pPropWin->GetMinOutputSizePixel().Width(); if ( m_pPropWin && (aPlaygroundSize.Width() - aTaskPanePos.X()) < m_pPropWin->GetMinOutputSizePixel().Width() ) { aTaskPanePos.X() = aPlaygroundSize.Width() - m_pPropWin->GetMinOutputSizePixel().Width(); nSplitPos = aTaskPanePos.X() - aFLSize.A(); } - Point aSplitPos( nSplitPos,aPlayground.Top() ); + Point aSplitPos( nSplitPos,_rPlayground.Top() ); Size aTaskPaneSize(aPlaygroundSize.Width() - aTaskPanePos.X(),aReportWindowSize.Height() ); // set the size of the splitter m_aSplitter.SetPosSizePixel( aSplitPos, aSplitSize ); - m_aSplitter.SetDragRectPixel( aPlayground ); + m_aSplitter.SetDragRectPixel( _rPlayground ); - aReportWindowSize = Size(aSplitPos.X() - aPlayground.Left() - aFLSize.A(),aPlayground.GetHeight()); + aReportWindowSize = Size(aSplitPos.X() - _rPlayground.Left() - aFLSize.A(),_rPlayground.GetHeight()); // set the size of the task pane @@ -244,10 +279,14 @@ // set the size of the report window m_pScrollWindow->SetPosSizePixel( - aPlayground.TopLeft() + _rPlayground.TopLeft() ,aReportWindowSize ); } + // just for completeness: there is no space left, we occupied it all ... + _rPlayground.SetPos( _rPlayground.BottomRight() ); + _rPlayground.SetSize( Size( 0, 0 ) ); + } // ----------------------------------------------------------------------------- // set the view readonly or not @@ -383,6 +422,11 @@ m_pScrollWindow->addSection(_xSection,_sColorEntry,_nPosition); } // ----------------------------------------------------------------------------- +void ODesignView::GetFocus() +{ + Window::GetFocus(); +} +// ----------------------------------------------------------------------------- void ODesignView::ImplInitSettings() { SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() )); @@ -390,18 +434,6 @@ SetTextFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() ); } //----------------------------------------------------------------------------- -void ODesignView::DataChanged( const DataChangedEvent& rDCEvt ) -{ - Window::DataChanged( rDCEvt ); - - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) - { - ImplInitSettings(); - Invalidate(); - } -} -//----------------------------------------------------------------------------- IMPL_LINK( ODesignView, SplitHdl, void*, ) { m_bInSplitHandler = sal_True; @@ -582,11 +614,6 @@ ::boost::shared_ptr<OReportSection> pMarkedSection = getMarkedSection(); return pMarkedSection.get() && pMarkedSection->getView()->IsAlignPossible(); } -// ----------------------------------------------------------------------------- -OReportController* ODesignView::getController() const -{ - return m_pTabControl ? m_pTabControl->getReportView()->getController() : NULL; -} // ------------------------------------------------------------------------- sal_Int32 ODesignView::getMaxMarkerWidth(sal_Bool _bWithEnd) const { @@ -637,7 +664,7 @@ const uno::Sequence< beans::PropertyValue> aArgs; getController()->executeChecked(SID_SELECT_REPORT,aArgs); } - TabPage::MouseButtonDown(rMEvt); + ODataView::MouseButtonDown(rMEvt); } // ----------------------------------------------------------------------------- uno::Any ODesignView::getCurrentlyShownProperty() const File [changed]: ReportController.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportController.cxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +61 -74 --------------------- --- ReportController.cxx 2007-05-09 13:49:50+0000 1.1.2.1 +++ ReportController.cxx 2007-05-11 09:24:19+0000 1.1.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: ReportController.cxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/09 13:49:50 $ + * last change: $Author: oj $ $Date: 2007/05/11 09:24:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -172,9 +172,7 @@ #include <com/sun/star/frame/status/FontHeight.hpp> #include <com/sun/star/report/XFormattedField.hpp> -#ifndef RPTUI_REPORTDESIGNVIEW_HXX -#include "ReportDesignView.hxx" -#endif +#include "DesignView.hxx" #ifndef _RPTUI_MODULE_HELPER_RPT_HXX_ #include "ModuleHelper.hxx" #endif @@ -223,9 +221,6 @@ #ifndef _RPTUI_DLGRESID_HRC #include "RptResId.hrc" #endif -#ifndef RPTUI_REPORTTABCONTROL_HXX -#include "ReportTabControl.hxx" -#endif #ifndef _SVX_SVXENUM_HXX #include <svx/svxenum.hxx> #endif @@ -297,7 +292,7 @@ using namespace ::comphelper; // ----------------------------------------------------------------------------- -uno::Reference< report::XReportControlFormat> lcl_getReportControlFormat(const Sequence< PropertyValue >& aArgs,OReportDesignView* _pView,uno::Reference< awt::XWindow>& _xWindow) +uno::Reference< report::XReportControlFormat> lcl_getReportControlFormat(const Sequence< PropertyValue >& aArgs,ODesignView* _pView,uno::Reference< awt::XWindow>& _xWindow) { uno::Reference< report::XReportControlFormat> xReportControlFormat; if ( aArgs.getLength() ) @@ -444,7 +439,7 @@ { } if ( m_pMyOwnView ) - EndListening(*(m_pMyOwnView->getBroadcaster())); + EndListening(*(m_pMyOwnView)); m_pView = NULL; m_pMyOwnView = NULL; } @@ -458,28 +453,26 @@ if ( !getView() ) return aReturn; - sal_Bool bDesignMode = m_pMyOwnView->getReportTabControl()->GetCurPageId() == REPORT_DESIGN_VIEW; - switch (_nId) { case SID_RPT_TEXTDOCUMENT: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getMimeType() == MIMETYPE_OASIS_OPENDOCUMENT_TEXT); break; case SID_RPT_SPREEDSHEET: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getMimeType() == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET); break; case SID_REPORTHEADER_WITHOUT_UNDO: case SID_REPORTFOOTER_WITHOUT_UNDO: case SID_REPORTHEADERFOOTER: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getReportHeaderOn()); break; case SID_PAGEHEADER_WITHOUT_UNDO: case SID_PAGEFOOTER_WITHOUT_UNDO: case SID_PAGEHEADERFOOTER: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getPageHeaderOn()); break; case SID_GROUP_APPEND: @@ -488,26 +481,26 @@ case SID_GROUPHEADER: case SID_GROUPFOOTER_WITHOUT_UNDO: case SID_GROUPFOOTER: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); break; case SID_ADD_CONTROL_PAIR: - aReturn.bEnabled = bDesignMode && isEditable() && m_pMyOwnView->getMarkedSection().get() != NULL; + aReturn.bEnabled = isEditable() && m_pMyOwnView->getMarkedSection().get() != NULL; break; case SID_REDO: case SID_UNDO: aReturn = OReportController_BASE::GetState(_nId); - aReturn.bEnabled = aReturn.bEnabled && bDesignMode; + aReturn.bEnabled = aReturn.bEnabled; break; case SID_OBJECT_RESIZING: case SID_OBJECT_SMALLESTWIDTH: case SID_OBJECT_SMALLESTHEIGHT: case SID_OBJECT_GREATESTWIDTH: case SID_OBJECT_GREATESTHEIGHT: - aReturn.bEnabled = bDesignMode && isEditable() && m_pMyOwnView->HasSelection() && m_pMyOwnView->isAlignPossible(); + aReturn.bEnabled = isEditable() && m_pMyOwnView->HasSelection() && m_pMyOwnView->isAlignPossible(); break; case SID_DISTRIBUTION: - aReturn.bEnabled = bDesignMode && isEditable() && m_pMyOwnView->HasSelection(); + aReturn.bEnabled = isEditable() && m_pMyOwnView->HasSelection(); if ( aReturn.bEnabled ) { OSectionView* pSectionView = getCurrentSectionView(); @@ -523,7 +516,7 @@ case SID_FRAME_TO_BOTTOM: case SID_OBJECT_HEAVEN: case SID_OBJECT_HELL: - aReturn.bEnabled = bDesignMode && isEditable() && m_pMyOwnView->HasSelection(); + aReturn.bEnabled = isEditable() && m_pMyOwnView->HasSelection(); if ( aReturn.bEnabled ) { uno::Reference< report::XShape> xShape(m_pMyOwnView->getCurrentControlModel(),uno::UNO_QUERY); @@ -563,22 +556,22 @@ case SID_SECTION_ALIGN_UP: case SID_SECTION_ALIGN_MIDDLE: case SID_SECTION_ALIGN_DOWN: - aReturn.bEnabled = bDesignMode && isEditable() && m_pMyOwnView->HasSelection() && m_pMyOwnView->isAlignPossible(); + aReturn.bEnabled = isEditable() && m_pMyOwnView->HasSelection() && m_pMyOwnView->isAlignPossible(); break; case SID_CUT: - aReturn.bEnabled = bDesignMode && isEditable() && m_pMyOwnView->HasSelection() && !m_pMyOwnView->isHandleEvent(_nId); + aReturn.bEnabled = isEditable() && m_pMyOwnView->HasSelection() && !m_pMyOwnView->isHandleEvent(_nId); break; case SID_COPY: - aReturn.bEnabled = bDesignMode && m_pMyOwnView->HasSelection() && !m_pMyOwnView->isHandleEvent(_nId); + aReturn.bEnabled = m_pMyOwnView->HasSelection() && !m_pMyOwnView->isHandleEvent(_nId); break; case SID_PASTE: - aReturn.bEnabled = bDesignMode && isEditable() && !m_pMyOwnView->isHandleEvent(_nId) && m_pMyOwnView->IsPasteAllowed(); + aReturn.bEnabled = isEditable() && !m_pMyOwnView->isHandleEvent(_nId) && m_pMyOwnView->IsPasteAllowed(); break; case SID_SELECTALL: - aReturn.bEnabled = bDesignMode && !m_pMyOwnView->isHandleEvent(_nId); + aReturn.bEnabled = !m_pMyOwnView->isHandleEvent(_nId); break; case SID_SELECTALL_IN_SECTION: - aReturn.bEnabled = bDesignMode && !m_pMyOwnView->isHandleEvent(_nId); + aReturn.bEnabled = !m_pMyOwnView->isHandleEvent(_nId); if ( aReturn.bEnabled ) aReturn.bEnabled = getCurrentSectionView() != NULL; break; @@ -586,60 +579,60 @@ aReturn.bEnabled = m_pMyOwnView->GetMode() == RPTUI_INSERT; break; case SID_RPT_NEW_FUNCTION: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); break; case SID_SELECT: case SID_SELECT_REPORT: - aReturn.bEnabled = bDesignMode; + aReturn.bEnabled = sal_True; break; case SID_EXECUTE_REPORT: - aReturn.bEnabled = bDesignMode && isConnected(); + aReturn.bEnabled = isConnected(); break; case SID_DELETE: - aReturn.bEnabled = bDesignMode && isEditable() && m_pMyOwnView->HasSelection() && !m_pMyOwnView->isHandleEvent(_nId); + aReturn.bEnabled = isEditable() && m_pMyOwnView->HasSelection() && !m_pMyOwnView->isHandleEvent(_nId); { ::rtl::OUString sText = String(ModuleRes(RID_STR_DELETE)); aReturn.sTitle = sText; } break; case SID_GRID_VISIBLE: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_bGridVisible; break; case SID_GRID_USE: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_bGridUse; break; case SID_HELPLINES_MOVE: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_bHelplinesMove; break; case SID_RULER: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_bShowRuler; break; case SID_OBJECT_SELECT: - aReturn.bEnabled = bDesignMode; + aReturn.bEnabled = sal_True; aReturn.bChecked = m_pMyOwnView->GetMode() == RPTUI_SELECT; break; case SID_FM_FIXEDTEXT: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_DLG_FIXEDTEXT; break; case SID_INSERT_HFIXEDLINE: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_DLG_HFIXEDLINE; break; case SID_INSERT_VFIXEDLINE: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_DLG_VFIXEDLINE; break; case SID_FM_EDIT: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_DLG_FORMATTEDFIELD; break; case SID_FM_IMAGECONTROL: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_DLG_IMAGECONTROL; break; case SID_DRAWTBX_CS_BASIC: @@ -761,28 +754,28 @@ case SID_DRAWTBX_CS_CALLOUT5: case SID_DRAWTBX_CS_CALLOUT6: case SID_DRAWTBX_CS_CALLOUT7: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); aReturn.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE; break; case SID_RPT_SHOWREPORTEXPLORER: - aReturn.bEnabled = bDesignMode && m_xReportDefinition.is(); + aReturn.bEnabled = m_xReportDefinition.is(); aReturn.bChecked = m_pMyOwnView && m_pMyOwnView->isReportExplorerVisible(); break; case SID_FM_ADD_FIELD: - aReturn.bEnabled = bDesignMode && isConnected() && isEditable() && m_xReportDefinition.is() + aReturn.bEnabled = isConnected() && isEditable() && m_xReportDefinition.is() && m_xReportDefinition->getCommand().getLength(); aReturn.bChecked = m_pMyOwnView && m_pMyOwnView->isAddFieldVisible(); break; case SID_SHOW_PROPERTYBROWSER: - aReturn.bEnabled = bDesignMode; + aReturn.bEnabled = sal_True; aReturn.bChecked = m_bShowProperties; break; case SID_PROPERTYBROWSER_LAST_PAGE: - aReturn.bEnabled = bDesignMode; + aReturn.bEnabled = sal_True; aReturn.aValue <<= m_sLastActivePage; break; case SID_SPLIT_POSITION: - aReturn.bEnabled = bDesignMode; + aReturn.bEnabled = sal_True; aReturn.aValue <<= getSplitPos(); break; case SID_SAVEDOC: @@ -792,14 +785,13 @@ aReturn.bEnabled = isConnected() && isEditable(); break; case SID_EDITDOC: - aReturn.bChecked = bDesignMode && isEditable(); + aReturn.bChecked = isEditable(); break; case SID_PAGEDIALOG: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); break; case SID_BACKGROUND_COLOR: - aReturn.bEnabled = bDesignMode && isEditable(); - if ( bDesignMode ) + aReturn.bEnabled = isEditable(); { uno::Reference< report::XReportComponent > xReportComponent(m_pMyOwnView->getCurrentControlModel()); uno::Reference< report::XReportControlFormat> xReportControlFormat(xReportComponent,uno::UNO_QUERY); @@ -812,8 +804,7 @@ } break; case SID_ATTR_CHAR_COLOR_BACKGROUND: - aReturn.bEnabled = bDesignMode && isEditable(); - if ( bDesignMode ) + aReturn.bEnabled = isEditable(); { uno::Reference<report::XSection> xSection = m_pMyOwnView->getCurrentSection(); if ( xSection.is() ) @@ -831,20 +822,20 @@ } break; case SID_SORTINGANDGROUPING: - aReturn.bEnabled = bDesignMode; + aReturn.bEnabled = sal_True; aReturn.bChecked = m_pGroupsFloater && m_pGroupsFloater->IsVisible(); break; case SID_ATTR_CHAR_WEIGHT: case SID_ATTR_CHAR_POSTURE: case SID_ATTR_CHAR_UNDERLINE: - aReturn.bEnabled = bDesignMode && m_xReportDefinition.is() && isEditable() && m_pMyOwnView->getCurrentControlModel().is(); + aReturn.bEnabled = m_xReportDefinition.is() && isEditable() && m_pMyOwnView->getCurrentControlModel().is(); aReturn.bChecked = isFormatCommandEnabled(_nId,uno::Reference< report::XReportControlFormat>(m_pMyOwnView->getCurrentControlModel(),uno::UNO_QUERY)); break; case SID_ATTR_CHAR_COLOR: case SID_ATTR_CHAR_COLOR2: { uno::Reference< report::XReportControlFormat> xReportControlFormat(m_pMyOwnView->getCurrentControlModel(),uno::UNO_QUERY); - aReturn.bEnabled = bDesignMode && isEditable() && xReportControlFormat.is(); + aReturn.bEnabled = isEditable() && xReportControlFormat.is(); if ( aReturn.bEnabled ) { try @@ -859,7 +850,7 @@ } break; case SID_ATTR_CHAR_FONT: - aReturn.bEnabled = bDesignMode && m_xReportDefinition.is() && isEditable(); + aReturn.bEnabled = m_xReportDefinition.is() && isEditable(); if ( aReturn.bEnabled ) { uno::Reference< report::XReportControlModel> xControlModel(m_pMyOwnView->getCurrentControlModel(),uno::UNO_QUERY); @@ -878,7 +869,7 @@ } break; case SID_ATTR_CHAR_FONTHEIGHT: - aReturn.bEnabled = bDesignMode && m_xReportDefinition.is() && isEditable(); + aReturn.bEnabled = m_xReportDefinition.is() && isEditable(); if ( aReturn.bEnabled ) { uno::Reference< report::XReportControlModel> xControlModel(m_pMyOwnView->getCurrentControlModel(),uno::UNO_QUERY); @@ -901,7 +892,7 @@ case SID_ATTR_PARA_ADJUST_LEFT: case SID_ATTR_PARA_ADJUST_CENTER: case SID_ATTR_PARA_ADJUST_RIGHT: - aReturn.bEnabled = bDesignMode && m_xReportDefinition.is() && isEditable(); + aReturn.bEnabled = m_xReportDefinition.is() && isEditable(); if ( aReturn.bEnabled ) { uno::Reference< report::XReportControlModel> xControlModel(m_pMyOwnView->getCurrentControlModel(),uno::UNO_QUERY); @@ -926,15 +917,13 @@ break; case SID_INSERT_GRAPHIC: - aReturn.bEnabled = bDesignMode && m_xReportDefinition.is() && isEditable() && m_pMyOwnView->getCurrentSection().is(); + aReturn.bEnabled = m_xReportDefinition.is() && isEditable() && m_pMyOwnView->getCurrentSection().is(); break; case SID_CHAR_DLG: case SID_SETCONTROLDEFAULTS: - aReturn.bEnabled = bDesignMode && m_xReportDefinition.is() && isEditable() && m_pMyOwnView->getCurrentControlModel().is(); + aReturn.bEnabled = m_xReportDefinition.is() && isEditable() && m_pMyOwnView->getCurrentControlModel().is(); break; case SID_CONDITIONALFORMATTING: - aReturn.bEnabled = bDesignMode; - if ( aReturn.bEnabled ) { uno::Reference< report::XFormattedField> xFormattedField(m_pMyOwnView->getCurrentControlModel(),uno::UNO_QUERY); aReturn.bEnabled = xFormattedField.is(); @@ -942,18 +931,16 @@ break; case SID_INSERT_FLD_PGNUMBER: case SID_DATETIME: - aReturn.bEnabled = bDesignMode && m_xReportDefinition.is() && isEditable() && m_pMyOwnView->getCurrentSection().is(); + aReturn.bEnabled = m_xReportDefinition.is() && isEditable() && m_pMyOwnView->getCurrentSection().is(); break; case SID_INSERT_DIAGRAM: - aReturn.bEnabled = bDesignMode && isEditable(); + aReturn.bEnabled = isEditable(); break; case SID_EXPORTDOC: case SID_EXPORTDOCASPDF: aReturn.bEnabled = m_xReportDefinition.is(); break; case SID_PRINTPREVIEW: - //aReturn.bEnabled = m_xReportDefinition.is(); - //aReturn.bChecked = bDesignMode; aReturn.bEnabled = sal_False; break; default: @@ -1044,13 +1031,13 @@ updateFloater(); break; case SID_CUT: - executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fun(&OReportDesignView::Cut)); + executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fun(&ODesignView::Cut)); break; case SID_COPY: m_pMyOwnView->Copy(); break; case SID_PASTE: - executeMethodWithUndo(RID_STR_UNDO_PASTE,::std::mem_fun(&OReportDesignView::Paste)); + executeMethodWithUndo(RID_STR_UNDO_PASTE,::std::mem_fun(&ODesignView::Paste)); break; case SID_FRAME_TO_TOP: @@ -1150,7 +1137,7 @@ } } else - executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fun(&OReportDesignView::Delete)); + executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fun(&ODesignView::Delete)); break; case SID_GRID_USE: m_pMyOwnView->setGridSnap(m_bGridUse = !m_bGridUse); @@ -1733,8 +1720,8 @@ // ----------------------------------------------------------------------------- sal_Bool OReportController::Construct(Window* pParent) { - m_pMyOwnView = new OReportDesignView(pParent,getORB(),this); - StartListening(*(m_pMyOwnView->getBroadcaster())); + m_pMyOwnView = new ODesignView(pParent,getORB(),this); + StartListening(*(m_pMyOwnView)); m_pView = m_pMyOwnView; // now that we have a view we can create the clipboard listener @@ -2701,7 +2688,7 @@ } } // ----------------------------------------------------------------------------- -void OReportController::executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,OReportDesignView>& _pMemfun) +void OReportController::executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun) { const String sComment = String((ModuleRes(_nUndoStrId))); m_aUndoManager.EnterListAction(sComment,String()); File [changed]: makefile.mk Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/makefile.mk?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +2 -4 ------------------- --- makefile.mk 2007-05-09 13:53:00+0000 1.1.2.1 +++ makefile.mk 2007-05-11 09:24:19+0000 1.1.2.2 @@ -4,9 +4,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.1.2.1 $ +# $Revision: 1.1.2.2 $ # -# last change: $Author: oj $ $Date: 2007/05/09 13:53:00 $ +# last change: $Author: oj $ $Date: 2007/05/11 09:24:19 $ # # The Contents of this file are made available subject to # the terms of GNU Lesser General Public License Version 2.1. @@ -49,7 +49,6 @@ SLOFILES =\ $(SLO)$/ReportController.obj \ $(SLO)$/ReportSection.obj \ - $(SLO)$/ReportDesignView.obj \ $(SLO)$/SectionView.obj \ $(SLO)$/ViewsWindow.obj \ $(SLO)$/SectionsWindow.obj \ @@ -60,7 +59,6 @@ $(SLO)$/dlgedfac.obj \ $(SLO)$/dlgedclip.obj \ $(SLO)$/ReportWindow.obj \ - $(SLO)$/ReportTabControl.obj \ $(SLO)$/DesignView.obj \ $(SLO)$/propbrw.obj Directory: /dba/reportdesign/util/ ================================== File [changed]: hidother.src Url: http://dba.openoffice.org/source/browse/dba/reportdesign/util/hidother.src?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +2 -3 ------------------- --- hidother.src 2007-05-09 13:59:24+0000 1.1.2.1 +++ hidother.src 2007-05-11 09:24:20+0000 1.1.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: hidother.src,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/09 13:59:24 $ + * last change: $Author: oj $ $Date: 2007/05/11 09:24:20 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -95,7 +95,6 @@ hidspecial HID_PROP_PAGEHEADEROPTION { HelpId = HID_PROP_PAGEHEADEROPTION; }; hidspecial HID_PROP_PAGEFOOTEROPTION { HelpId = HID_PROP_PAGEFOOTEROPTION; }; hidspecial UID_PROP_DLG_LINE_STYLE { HelpId = UID_PROP_DLG_LINE_STYLE; }; -hidspecial UID_APP_DESIGNVIEW { HelpId = UID_APP_DESIGNVIEW; }; hidspecial HID_PROP_POSITIONX { HelpId = HID_PROP_POSITIONX; }; hidspecial HID_PROP_POSITIONY { HelpId = HID_PROP_POSITIONY; }; hidspecial HID_PROP_WIDTH { HelpId = HID_PROP_WIDTH; }; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
