You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2025/03/20 17:44:09 UTC

(openoffice) branch AOO42X updated: Re-added closing bracket, cleanup

This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 082d8a122a Re-added closing bracket, cleanup
082d8a122a is described below

commit 082d8a122a45b0da03c73faded9b82897058f79d
Author: mseidel <ms...@apache.org>
AuthorDate: Thu Mar 20 18:43:01 2025 +0100

    Re-added closing bracket, cleanup
    
    (cherry picked from commit 093b492c61de4e1fb95c7e65810eaeddbb65f806)
---
 main/reportdesign/source/ui/inc/ReportSection.hxx  | 115 +++++++++++----------
 .../source/ui/report/ReportSection.cxx             | 110 ++++++++++----------
 2 files changed, 113 insertions(+), 112 deletions(-)

diff --git a/main/reportdesign/source/ui/inc/ReportSection.hxx b/main/reportdesign/source/ui/inc/ReportSection.hxx
index ed821f98ae..69bfcb4e90 100644
--- a/main/reportdesign/source/ui/inc/ReportSection.hxx
+++ b/main/reportdesign/source/ui/inc/ReportSection.hxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,19 +7,18 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
 #ifndef REPORT_REPORTSECTION_HXX
 #define REPORT_REPORTSECTION_HXX
 
@@ -37,26 +36,26 @@
 
 namespace rptui
 {
-	class OReportModel;			
-	class OReportPage;			
-	class OSectionView;			
-	class OSectionWindow;	
+	class OReportModel;
+	class OReportPage;
+	class OSectionView;
+	class OSectionWindow;
 
 	class OReportSection :	 public Window
 						,	public ::cppu::BaseMutex
 						,	public ::comphelper::OPropertyChangeListener
-                        ,   public DropTargetHelper
+						,	public DropTargetHelper
 	{
 		OReportPage*				        m_pPage;
 		OSectionView*				        m_pView;
 		OSectionWindow*				        m_pParent;
 		::std::auto_ptr<DlgEdFunc>	        m_pFunc;
-        ::boost::shared_ptr<OReportModel>   m_pModel;
+		::boost::shared_ptr<OReportModel>   m_pModel;
 		::rtl::Reference< comphelper::OPropertyChangeMultiplexer>				            m_pMulti;
 		::rtl::Reference< comphelper::OPropertyChangeMultiplexer>				            m_pReportListener;
-        ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >              m_xSection;
-        sal_Int32                   m_nPaintEntranceCount;
-        
+		::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >              m_xSection;
+		sal_Int32					m_nPaintEntranceCount;
+
 		DlgEdMode					m_eMode;
 		sal_Bool						m_bDialogModelChanged;
 		sal_Bool					m_bInDrag;
@@ -64,19 +63,19 @@ namespace rptui
 		/** fills the section with all control from the report section
 		*/
 		void fill();
-        /** checks all objects if they fit in the new paper width.
-        */
-        void impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_Int32 i_nLeftMargin,sal_Int32 i_nRightMargin);
-
-        OReportSection(OReportSection&);
-        void operator =(OReportSection&);
-    protected:
-        // DropTargetHelper overridables
+		/** checks all objects if they fit in the new paper width.
+		*/
+		void impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_Int32 i_nLeftMargin,sal_Int32 i_nRightMargin);
+
+		OReportSection(OReportSection&);
+		void operator =(OReportSection&);
+	protected:
+		// DropTargetHelper overridables
 		virtual sal_Int8	AcceptDrop( const AcceptDropEvent& _rEvt );
 		virtual sal_Int8	ExecuteDrop( const ExecuteDropEvent& _rEvt );
-        
+
 		// window overrides
-		virtual void        Paint( const Rectangle& rRect );
+		virtual void		Paint( const Rectangle& rRect );
 		virtual void 		MouseMove( const MouseEvent& rMEvt );
 		virtual void		Command( const CommandEvent& rCEvt );
 		virtual void		Resize();
@@ -87,20 +86,20 @@ namespace rptui
 		OReportSection(OSectionWindow* _pParent,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
 		virtual ~OReportSection();
 
-        // window overrides
+		// window overrides
 		virtual void 		MouseButtonDown( const MouseEvent& rMEvt );
-        virtual void 		MouseButtonUp( const MouseEvent& rMEvt );
+		virtual void 		MouseButtonUp( const MouseEvent& rMEvt );
 
 		/** copies the current selection in this section
-            @param  _rAllreadyCopiedObjects This is an out/in put param which contains all already copied objects.
+			@param  _rAllreadyCopiedObjects This is an out/in put param which contains all already copied objects.
 		*/
 		void Copy(::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _rAllreadyCopiedObjects);
 
-        void Copy(::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _rAllreadyCopiedObjects,bool _bEraseAnddNoClone);
+		void Copy(::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _rAllreadyCopiedObjects,bool _bEraseAnddNoClone);
 
 		/** paste a new control in this section
-            @param  _aAllreadyCopiedObjects objects to paste into the section. Only objects are pasted where the name is equal to the section name.
-            @param  _bForce If set to <TRUE/> than the objects will be copied into this section. The name is not compared in this case.
+			@param  _aAllreadyCopiedObjects objects to paste into the section. Only objects are pasted where the name is equal to the section name.
+			@param  _bForce If set to <TRUE/> than the objects will be copied into this section. The name is not compared in this case.
 		*/
 		void Paste(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _aAllreadyCopiedObjects,bool _bForce = false);
 
@@ -126,7 +125,7 @@ namespace rptui
 
 		void			SetDialogModelChanged( sal_Bool bChanged = sal_True ) { m_bDialogModelChanged = bChanged; }
 		sal_Bool			IsDialogModelChanged() const { return m_bDialogModelChanged; }
-		DlgEdMode   	GetMode() const { return m_eMode; }
+		DlgEdMode		GetMode() const { return m_eMode; }
 		void 			SetMode( DlgEdMode m_eMode );
 
 		/** checks if the keycode is known by the child windows
@@ -139,34 +138,36 @@ namespace rptui
 		*/
 		::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent > getCurrentControlModel() const;
 
-        /** fills the vector with all selected control models
-            /param  _rSelection The vector will be filled and will not be cleared before.
-        */
-        void fillControlModelSelection(::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& _rSelection) const;
-
-        /** creates a default object (custom shape)
-        *
-        * @param _sType
-        */
-        void createDefault(const ::rtl::OUString& _sType);
-
-        /** creates a new default custom shape
-        *
-        * \param _sType 
-        * \param _pObj 
-        */
-        void createDefault(const ::rtl::OUString& _sType,SdrObject* _pObj);
-        void stopScrollTimer();
-
-        /** deactivate the currect active ole object if any
-        */
-        void    deactivateOle();
-
-        /** returns true when an ole object is currently active
-        */
-        bool isUiActive() const;
+		/** fills the vector with all selected control models
+			/param  _rSelection The vector will be filled and will not be cleared before.
+		*/
+		void fillControlModelSelection(::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& _rSelection) const;
+
+		/** creates a default object (custom shape)
+		*
+		* @param _sType
+		*/
+		void createDefault(const ::rtl::OUString& _sType);
+
+		/** creates a new default custom shape
+		*
+		* \param _sType
+		* \param _pObj
+		*/
+		void createDefault(const ::rtl::OUString& _sType,SdrObject* _pObj);
+		void stopScrollTimer();
+
+		/** deactivate the current active ole object if any
+		*/
+		void    deactivateOle();
+
+		/** returns true when an ole object is currently active
+		*/
+		bool isUiActive() const;
 	};
 //==================================================================
 }	//rptui
 //==================================================================
 #endif // REPORT_REPORTSECTION_HXX
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/reportdesign/source/ui/report/ReportSection.cxx b/main/reportdesign/source/ui/report/ReportSection.cxx
index 1cc37ab9b2..66bd3a8a48 100644
--- a/main/reportdesign/source/ui/report/ReportSection.cxx
+++ b/main/reportdesign/source/ui/report/ReportSection.cxx
@@ -112,17 +112,17 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
 		OSL_ENSURE(0,"Exception catched!");
 	}
 
-    m_pFunc.reset(new DlgEdFuncSelect( this ));
-    m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( /* m_pParent->getViewsWindow()->getView()->getReportView()->getController().getORB() */ ) );
+	m_pFunc.reset(new DlgEdFuncSelect( this ));
+	m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( /* m_pParent->getViewsWindow()->getView()->getReportView()->getController().getORB() */ ) );
 }
 //------------------------------------------------------------------------------
 OReportSection::~OReportSection()
 {
 	DBG_DTOR( rpt_OReportSection,NULL);
-    m_pPage = NULL;
+	m_pPage = NULL;
 	//m_pModel->GetUndoEnv().RemoveSection(m_xSection.get());
 	if ( m_pMulti.is() )
-    	m_pMulti->dispose();
+		m_pMulti->dispose();
 
 	if ( m_pReportListener.is() )
 		m_pReportListener->dispose();
@@ -134,42 +134,42 @@ OReportSection::~OReportSection()
 			m_pView->EndListening( *m_pModel );
 		m_pView = NULL;
 	}
-    /*m_pModel->DeletePage(m_pPage->GetPageNum());*/
+	/*m_pModel->DeletePage(m_pPage->GetPageNum());*/
 }
 //------------------------------------------------------------------------------
 void OReportSection::Paint( const Rectangle& rRect )
 {
-    Window::Paint(rRect);
+	Window::Paint(rRect);
 
 	if ( m_pView && m_nPaintEntranceCount == 0)
 	{
-        ++m_nPaintEntranceCount;
-         // repaint, get PageView and prepare Region
-        SdrPageView* pPgView = m_pView->GetSdrPageView();
-        const Region aPaintRectRegion(rRect);
+		++m_nPaintEntranceCount;
+		// repaint, get PageView and prepare Region
+		SdrPageView* pPgView = m_pView->GetSdrPageView();
+		const Region aPaintRectRegion(rRect);
 
-        // #i74769#
-        SdrPaintWindow* pTargetPaintWindow = 0;
+		// #i74769#
+		SdrPaintWindow* pTargetPaintWindow = 0;
 
-        // mark repaint start
-        if(pPgView)
-        {
-            pTargetPaintWindow = pPgView->GetView().BeginDrawLayers(this, aPaintRectRegion);
-            OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
-            // draw background self using wallpaper
-            OutputDevice& rTargetOutDev = pTargetPaintWindow->GetTargetOutputDevice();
-            rTargetOutDev.DrawWallpaper(rRect, Wallpaper(pPgView->GetApplicationDocumentColor()));
-        }
+		// mark repaint start
+		if(pPgView)
+		{
+			pTargetPaintWindow = pPgView->GetView().BeginDrawLayers(this, aPaintRectRegion);
+			OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
+			// draw background self using wallpaper
+			OutputDevice& rTargetOutDev = pTargetPaintWindow->GetTargetOutputDevice();
+			rTargetOutDev.DrawWallpaper(rRect, Wallpaper(pPgView->GetApplicationDocumentColor()));
+		}
 
-        // do paint (unbuffered) and mark repaint end
-        if(pPgView)
-        {
-            pPgView->DrawLayer(0, this);
-            pPgView->GetView().EndDrawLayers(*pTargetPaintWindow, true);
-        }
+		// do paint (unbuffered) and mark repaint end
+		if(pPgView)
+		{
+			pPgView->DrawLayer(0, this);
+			pPgView->GetView().EndDrawLayers(*pTargetPaintWindow, true);
+		}
 
 		m_pView->CompleteRedraw(this,aPaintRectRegion);
-        --m_nPaintEntranceCount;
+		--m_nPaintEntranceCount;
 	}
 }
 //------------------------------------------------------------------------------
@@ -188,8 +188,8 @@ void OReportSection::fill()
 
 	m_pReportListener = addStyleListener(m_xSection->getReportDefinition(),this);
 
-    m_pModel = m_pParent->getViewsWindow()->getView()->getReportView()->getController().getSdrModel();
-    m_pPage = m_pModel->getPage(m_xSection);
+	m_pModel = m_pParent->getViewsWindow()->getView()->getReportView()->getController().getSdrModel();
+	m_pPage = m_pModel->getPage(m_xSection);
 
 	m_pView = new OSectionView( m_pModel.get(), this, m_pParent->getViewsWindow()->getView() );
 
@@ -551,29 +551,29 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
             impl_adjustObjectSizePosition(nPaperWidth,nLeftMargin,nRightMargin);
             m_pParent->Invalidate(INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT);
 		}
-
+	}
 }
 void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_Int32 i_nLeftMargin,sal_Int32 i_nRightMargin)
 {
-    try
-    {
-	    sal_Int32 nRightBorder = i_nPaperWidth - i_nRightMargin;
-        const sal_Int32 nCount = m_xSection->getCount();
-        for (sal_Int32 i = 0; i < nCount; ++i)
-        {
-            bool bChanged = false;
-            uno::Reference< report::XReportComponent> xReportComponent(m_xSection->getByIndex(i),uno::UNO_QUERY_THROW);
-            awt::Point aPos = xReportComponent->getPosition();
-            awt::Size aSize = xReportComponent->getSize();
-            SvxShape* pShape = SvxShape::getImplementation( xReportComponent );
-            SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL;
-            if ( pObject )
-            {
+	try
+	{
+		sal_Int32 nRightBorder = i_nPaperWidth - i_nRightMargin;
+		const sal_Int32 nCount = m_xSection->getCount();
+		for (sal_Int32 i = 0; i < nCount; ++i)
+		{
+			bool bChanged = false;
+			uno::Reference< report::XReportComponent> xReportComponent(m_xSection->getByIndex(i),uno::UNO_QUERY_THROW);
+			awt::Point aPos = xReportComponent->getPosition();
+			awt::Size aSize = xReportComponent->getSize();
+			SvxShape* pShape = SvxShape::getImplementation( xReportComponent );
+			SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL;
+			if ( pObject )
+			{
                 OObjectBase* pBase = dynamic_cast<OObjectBase*>(pObject);
                 pBase->EndListening(sal_False);
                 if ( aPos.X < i_nLeftMargin )
                 {
-                    aPos.X  = i_nLeftMargin;
+                    aPos.X = i_nLeftMargin;
                     bChanged = true;
                 }
                 if ( (aPos.X + aSize.Width) > nRightBorder )
@@ -599,19 +599,19 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
                     Rectangle aRet(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize()));
 					aRet.setHeight(aRet.getHeight() + 1);
 					aRet.setWidth(aRet.getWidth() + 1);
-                    if ( m_xSection.is() && (static_cast<sal_uInt32>(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) )
-			            m_xSection->setHeight(aRet.getHeight() + aRet.Top());
+					if ( m_xSection.is() && (static_cast<sal_uInt32>(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) )
+						 m_xSection->setHeight(aRet.getHeight() + aRet.Top());
 
                     pObject->RecalcBoundRect();
                 }
                 pBase->StartListening();
-            }
-        } // for (sal_Int32 i = 0; i < nCount; ++i)
-    }
-    catch(uno::Exception)
-    {
-        OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged(");
-    }
+			}
+		} // for (sal_Int32 i = 0; i < nCount; ++i)
+	}
+	catch(uno::Exception)
+	{
+		OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged(");
+	}
 }
 //------------------------------------------------------------------------------
 sal_Bool OReportSection::handleKeyEvent(const KeyEvent& _rEvent)