Tag: cws_src680_oj14 User: oj Date: 2007-05-31 12:05:02+0000 Modified: dba/reportdesign/source/ui/inc/ViewsWindow.hxx dba/reportdesign/source/ui/report/ViewsWindow.cxx dba/reportdesign/source/ui/report/propbrw.cxx
Log: #77283# allow multiple selected controls File Changes: Directory: /dba/reportdesign/source/ui/inc/ =========================================== File [changed]: ViewsWindow.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/ViewsWindow.hxx?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +10 -3 -------------------- --- ViewsWindow.hxx 2007-05-30 16:25:05+0000 1.1.2.3 +++ ViewsWindow.hxx 2007-05-31 12:04:59+0000 1.1.2.4 @@ -6,9 +6,9 @@ * * $RCSfile: ViewsWindow.hxx,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: oj $ $Date: 2007/05/30 16:25:05 $ + * last change: $Author: oj $ $Date: 2007/05/31 12:04:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -67,6 +67,7 @@ #endif #include <list> +#include <vector> #include <boost/shared_ptr.hpp> #include <MarkedSection.hxx> @@ -97,7 +98,7 @@ typedef ::std::pair< ::boost::shared_ptr<OReportSection> , ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> > TReportPair; typedef ::std::pair< TReportPair, TSplitterPair > TSectionPair; - typedef ::std::list< TSectionPair > TSectionsMap; + typedef ::std::vector< TSectionPair > TSectionsMap; struct TReportPairHelper : public ::std::unary_function< TSectionsMap::value_type, ::boost::shared_ptr<OReportSection> > { @@ -165,6 +166,12 @@ ,USHORT _nPosition = USHRT_MAX); USHORT getSectionCount() const; + /** return the section at the given position + * + * \param _nPos + * \return the section at this pos or an empty section + */ + ::boost::shared_ptr<OReportSection> getSection(const USHORT _nPos) const; void showView(USHORT _nPos,BOOL _bShow); Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: ViewsWindow.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ViewsWindow.cxx?r1=1.1.2.7&r2=1.1.2.8 Delta lines: +13 -8 -------------------- --- ViewsWindow.cxx 2007-05-30 16:24:46+0000 1.1.2.7 +++ ViewsWindow.cxx 2007-05-31 12:04:59+0000 1.1.2.8 @@ -4,9 +4,9 @@ * * $RCSfile: ViewsWindow.cxx,v $ * - * $Revision: 1.1.2.7 $ + * $Revision: 1.1.2.8 $ * - * last change: $Author: oj $ $Date: 2007/05/30 16:24:46 $ + * last change: $Author: oj $ $Date: 2007/05/31 12:04:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -756,12 +756,7 @@ { TSectionsMap::iterator aRet = m_aSections.end(); if ( _nPos < m_aSections.size() ) - { - TSectionsMap::iterator aIter = m_aSections.begin(); - for (sal_Int32 i = 0; i < _nPos ; ++i,++aIter) - ; - aRet = aIter; - } + aRet = m_aSections.begin() + _nPos; return aRet; } //------------------------------------------------------------------------ @@ -1151,7 +1146,17 @@ } return nPosition; } +// ----------------------------------------------------------------------------- +::boost::shared_ptr<OReportSection> OViewsWindow::getSection(const USHORT _nPos) const +{ + ::boost::shared_ptr<OReportSection> aReturn; + + if ( _nPos < m_aSections.size() ) + aReturn = m_aSections[_nPos].first.first; + return aReturn; +} +// ----------------------------------------------------------------------------- //============================================================================== } // rptui //============================================================================== File [changed]: propbrw.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/propbrw.cxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +39 -26 --------------------- --- propbrw.cxx 2007-05-09 13:53:12+0000 1.1.2.1 +++ propbrw.cxx 2007-05-31 12:04:59+0000 1.1.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: propbrw.cxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: oj $ $Date: 2007/05/09 13:53:12 $ + * last change: $Author: oj $ $Date: 2007/05/31 12:04:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -110,6 +110,7 @@ #ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> #endif +#include <comphelper/sequence.hxx> #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include <com/sun/star/beans/PropertyValue.hpp> @@ -140,6 +141,7 @@ #ifndef RPTUI_DESIGNVIEW_HXX #include "DesignView.hxx" #endif +#include "ViewsWindow.hxx" #include "UITools.hxx" #ifndef _UNOTOOLS_CONFIGNODE_HXX_ #include <unotools/confignode.hxx> @@ -578,35 +580,46 @@ else m_pView = pNewView; - const SdrMarkList& rMarkList = m_pView->GetMarkedObjectList(); - sal_uInt32 nMarkCount = rMarkList.GetMarkCount(); - - if ( nMarkCount == 1 ) - { - m_xLastSection.clear(); - SdrObject* pDlgEdObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - OObjectBase* pObj = dynamic_cast<OObjectBase*>(pDlgEdObj); - if ( pObj ) - { - if ( pDlgEdObj && pDlgEdObj->IsGroupObject() ) - { - implSetNewObject( CreateCompPropSet( rMarkList ) ); + uno::Sequence< Reference<uno::XInterface> > aMarkedObjects; + OViewsWindow* pViews = m_pView->getSectionWindow()->getViewsWindow(); + const USHORT nSectionCount = pViews->getSectionCount(); + for (USHORT i = 0; i < nSectionCount; ++i) + { + ::boost::shared_ptr<OReportSection> pReportSection = pViews->getSection(i); + if ( pReportSection ) + { + const SdrMarkList& rMarkList = pReportSection->getView()->GetMarkedObjectList(); + aMarkedObjects = ::comphelper::concatSequences(aMarkedObjects,CreateCompPropSet( rMarkList )); } - else // single selection - { - uno::Reference< uno::XInterface > xTemp = CreateComponentPair(pObj); - implSetNewObject( uno::Sequence< uno::Reference< uno::XInterface> >(&xTemp,1) ); } - } - else - { - implSetNewObject( ); - } - } - else if ( nMarkCount > 1 ) // multiple selection + + // if ( nMarkCount == 1 ) + // { + // m_xLastSection.clear(); + // SdrObject* pDlgEdObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); + // OObjectBase* pObj = dynamic_cast<OObjectBase*>(pDlgEdObj); + // if ( pObj ) + // { + // if ( pDlgEdObj && pDlgEdObj->IsGroupObject() ) + // { + // implSetNewObject( CreateCompPropSet( rMarkList ) ); + // } + // else // single selection + // { + // uno::Reference< uno::XInterface > xTemp = CreateComponentPair(pObj); + // implSetNewObject( uno::Sequence< uno::Reference< uno::XInterface> >(&xTemp,1) ); + // } + // } + // else + // { + // implSetNewObject( ); + // } + //} + // else + if ( aMarkedObjects.getLength() ) // multiple selection { m_xLastSection.clear(); - implSetNewObject( CreateCompPropSet( rMarkList ) ); + implSetNewObject( aMarkedObjects ); } else if ( m_xLastSection != m_pView->getSectionWindow()->getSection() ) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
