Tag: cws_src680_oj14
User: fs      
Date: 2007-06-20 14:24:00+0000
Modified:
   dba/reportdesign/source/ui/dlg/PageNumber.cxx
   dba/reportdesign/source/ui/inspection/GeometryHandler.cxx
   dba/reportdesign/source/ui/report/ReportController.cxx
   dba/reportdesign/source/ui/report/ReportSection.cxx
   dba/reportdesign/source/ui/report/ReportWindow.cxx
   dba/reportdesign/source/ui/report/ViewsWindow.cxx

Log:
 in the course of #i78685#, renamed lcl_foo to foo

File Changes:

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

File [changed]: PageNumber.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/dlg/PageNumber.cxx?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +8 -8
-------------------
--- PageNumber.cxx      2007-05-09 13:52:30+0000        1.1.2.1
+++ PageNumber.cxx      2007-06-20 14:23:57+0000        1.1.2.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: PageNumber.cxx,v $
  *
- *  $Revision: 1.1.2.1 $
+ *  $Revision: 1.1.2.2 $
  *
- *  last change: $Author: oj $ $Date: 2007/05/09 13:52:30 $
+ *  last change: $Author: fs $ $Date: 2007/06/20 14:23:57 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -137,22 +137,22 @@
                        sal_Int32 nControlMaxSize = 3000;
                        sal_Int32 nPosX = 0;
                        sal_Int32 nPos2X = 0;
-                       awt::Size aRptSize = 
lcl_getStyleProperty<awt::Size>(m_xHoldAlive,PROPERTY_PAPERSIZE);
+                       awt::Size aRptSize = 
getStyleProperty<awt::Size>(m_xHoldAlive,PROPERTY_PAPERSIZE);
                        switch ( m_aAlignmentLst.GetSelectEntryPos() )
                        {
                                case 0: // left
-                                       nPosX = 
lcl_getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN);
+                                       nPosX = 
getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN);
                                        break;
                                case 1: // middle
-                                       nPosX = 
lcl_getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN) + 
(aRptSize.Width - 
lcl_getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN) - 
lcl_getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - 
nControlMaxSize) / 2;
+                                       nPosX = 
getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN) + (aRptSize.Width 
- getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN) - 
getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - 
nControlMaxSize) / 2;
                                        break;
                                case 2: // right
-                                       nPosX = (aRptSize.Width - 
lcl_getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - 
nControlMaxSize);
+                                       nPosX = (aRptSize.Width - 
getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - 
nControlMaxSize);
                                        break;
                                case 3: // inner
                                case 4: // outer
-                                       nPosX = 
lcl_getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN);
-                                       nPos2X = (aRptSize.Width - 
lcl_getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - 
nControlMaxSize);
+                                       nPosX = 
getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN);
+                                       nPos2X = (aRptSize.Width - 
getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - 
nControlMaxSize);
                                        break;
                 default:
                     break;

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

File [changed]: GeometryHandler.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inspection/GeometryHandler.cxx?r1=1.1.2.12&r2=1.1.2.13
Delta lines:  +7 -7
-------------------
--- GeometryHandler.cxx 2007-06-18 12:50:02+0000        1.1.2.12
+++ GeometryHandler.cxx 2007-06-20 14:23:57+0000        1.1.2.13
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: GeometryHandler.cxx,v $
  *
- *  $Revision: 1.1.2.12 $
+ *  $Revision: 1.1.2.13 $
  *
- *  last change: $Author: fs $ $Date: 2007/06/18 12:50:02 $
+ *  last change: $Author: fs $ $Date: 2007/06/20 14:23:57 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -657,9 +657,9 @@
             OSL_ENSURE(xReport.is(),"Why is the report definition NULL!");
             if ( xReport.is() )
             {
-                const awt::Size aSize = 
lcl_getStyleProperty<awt::Size>(xReport,PROPERTY_PAPERSIZE);
-                const sal_Int32 nLeftMargin = 
lcl_getStyleProperty<sal_Int32>(xReport,PROPERTY_LEFTMARGIN);
-                       const sal_Int32 nRightMargin = 
lcl_getStyleProperty<sal_Int32>(xReport,PROPERTY_RIGHTMARGIN);
+                const awt::Size aSize = 
getStyleProperty<awt::Size>(xReport,PROPERTY_PAPERSIZE);
+                const sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(xReport,PROPERTY_LEFTMARGIN);
+                       const sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(xReport,PROPERTY_RIGHTMARGIN);
                 switch(nId)
                 {
                     case PROPERTY_ID_POSITIONX:
@@ -817,7 +817,7 @@
                 sal_Int32 nPosX = 0;
                 aPropertyValue >>= nPosX;
                 uno::Reference< report::XReportComponent> 
xSourceReportComponent(m_xReportComponent,uno::UNO_QUERY);
-                nPosX += 
lcl_getStyleProperty<sal_Int32>(xSourceReportComponent->getSection()->getReportDefinition(),PROPERTY_LEFTMARGIN);
+                nPosX += 
getStyleProperty<sal_Int32>(xSourceReportComponent->getSection()->getReportDefinition(),PROPERTY_LEFTMARGIN);
                 aPropertyValue <<= nPosX;
             }
             break;
@@ -907,7 +907,7 @@
                 sal_Int32 nPosX = 0;
                 aTemp >>= nPosX;
                 uno::Reference< report::XReportComponent> 
xSourceReportComponent(m_xReportComponent,uno::UNO_QUERY);
-                nPosX -= 
lcl_getStyleProperty<sal_Int32>(xSourceReportComponent->getSection()->getReportDefinition(),PROPERTY_LEFTMARGIN);
+                nPosX -= 
getStyleProperty<sal_Int32>(xSourceReportComponent->getSection()->getReportDefinition(),PROPERTY_LEFTMARGIN);
                 aTemp <<= nPosX;
                 aControlValue = 
m_xFormComponentHandler->convertToControlValue(PropertyName, aTemp, 
_rControlValueType);
             }

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.1.2.27&r2=1.1.2.28
Delta lines:  +131 -130
-----------------------
--- ReportController.cxx        2007-06-11 07:03:43+0000        1.1.2.27
+++ ReportController.cxx        2007-06-20 14:23:57+0000        1.1.2.28
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ReportController.cxx,v $
  *
- *  $Revision: 1.1.2.27 $
+ *  $Revision: 1.1.2.28 $
  *
- *  last change: $Author: fs $ $Date: 2007/06/11 07:03:43 $
+ *  last change: $Author: fs $ $Date: 2007/06/20 14:23:57 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -288,19 +288,19 @@
 #include <cppuhelper/exc_hlp.hxx>
 
 using namespace ::com::sun::star;
-using namespace ::uno;
-using namespace ::io;
-using namespace ::beans;
-using namespace ::frame;
-using namespace ::util;
-using namespace ::lang;
-using namespace ::container;
-using namespace ::sdbcx;
-using namespace ::sdbc;
-using namespace ::sdb;
-using namespace ::ui;
-using namespace ::dialogs;
-using namespace ::util;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::sdbcx;
+using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::sdb;
+using namespace ::com::sun::star::ui;
+using namespace ::com::sun::star::ui::dialogs;
+using namespace ::com::sun::star::util;
 using namespace ::dbtools;
 using namespace ::rptui;
 using namespace ::dbaui;
@@ -2618,11 +2618,11 @@
                {
                        //view::PaperFormat eUnoPaperFormat = 
m_xReportDefinition->getPaperFormat();
                        
//pDescriptor->Put(SfxAllEnumItem(RPTUI_ID_START,lcl_convertPaperFormat(eUnoPaperFormat)));
-            
pDescriptor->Put(SvxSizeItem(RPTUI_ID_SIZE,VCLSize(lcl_getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE))));
-                       
pDescriptor->Put(SvxLRSpaceItem(lcl_getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_LEFTMARGIN)
-                                            
,lcl_getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN),0,0,RPTUI_ID_LRSPACE));
-                       
pDescriptor->Put(SvxULSpaceItem(static_cast<USHORT>(lcl_getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_TOPMARGIN))
-                                            
,static_cast<USHORT>(lcl_getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BOTTOMMARGIN)),RPTUI_ID_ULSPACE));
+            
pDescriptor->Put(SvxSizeItem(RPTUI_ID_SIZE,VCLSize(getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE))));
+                       
pDescriptor->Put(SvxLRSpaceItem(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_LEFTMARGIN)
+                                            
,getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN),0,0,RPTUI_ID_LRSPACE));
+                       
pDescriptor->Put(SvxULSpaceItem(static_cast<USHORT>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_TOPMARGIN))
+                                            
,static_cast<USHORT>(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BOTTOMMARGIN)),RPTUI_ID_ULSPACE));
                        
pDescriptor->Put(SfxUInt16Item(SID_ATTR_METRIC,static_cast<UINT16>(eUserMetric)));
 
             uno::Reference< style::XStyle> 
xPageStyle(lcl_usedStyle(m_xReportDefinition));
@@ -2631,12 +2631,12 @@
                 SvxPageItem aPageItem(RPTUI_ID_PAGE);
                 aPageItem.SetDescName(xPageStyle->getName());
                 
-                //style::PageStyleLayout ePageStyleLayout = 
lcl_getStyleProperty<style::PageStyleLayout>(m_xReportDefinition,PROPERTY_PAGESTYLELAYOUT);
+                //style::PageStyleLayout ePageStyleLayout = 
getStyleProperty<style::PageStyleLayout>(m_xReportDefinition,PROPERTY_PAGESTYLELAYOUT);
                    aPageItem.SetPageUsage(SVX_PAGE_ALL);
-                   
aPageItem.SetLandscape(lcl_getStyleProperty<sal_Bool>(m_xReportDefinition,PROPERTY_ISLANDSCAPE));
-                   
aPageItem.SetNumType((SvxNumType)lcl_getStyleProperty<sal_Int16>(m_xReportDefinition,PROPERTY_NUMBERINGTYPE));
+                   
aPageItem.SetLandscape(getStyleProperty<sal_Bool>(m_xReportDefinition,PROPERTY_ISLANDSCAPE));
+                   
aPageItem.SetNumType((SvxNumType)getStyleProperty<sal_Int16>(m_xReportDefinition,PROPERTY_NUMBERINGTYPE));
                 pDescriptor->Put(aPageItem);
-                
pDescriptor->Put(SvxBrushItem(::Color(lcl_getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BACKCOLOR)),RPTUI_ID_BRUSH));
+                
pDescriptor->Put(SvxBrushItem(::Color(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BACKCOLOR)),RPTUI_ID_BRUSH));
             }
                }
 
@@ -2664,30 +2664,30 @@
                         const Size aPaperSize = static_cast<const 
SvxSizeItem*>(pItem)->GetSize();
                         //view::PaperFormat eUnoPaperFormat = 
lcl_convertPaperFormat(SvxPaperInfo::GetSvxPaper(aPaperSize,MAP_100TH_MM,TRUE));
                         //m_xReportDefinition->setPaperFormat(eUnoPaperFormat);
-                                               
lcl_setStyleProperty(m_xReportDefinition,PROPERTY_PAPERSIZE,AWTSize(aPaperSize));
+                                               
setStyleProperty(m_xReportDefinition,PROPERTY_PAPERSIZE,AWTSize(aPaperSize));
                     }
 
                                        if ( SFX_ITEM_SET == 
pSet->GetItemState( RPTUI_ID_LRSPACE,sal_True,&pItem))
                                        {
-                                               
lcl_setStyleProperty(m_xReportDefinition,PROPERTY_LEFTMARGIN,static_cast<const 
SvxLRSpaceItem*>(pItem)->GetLeft());
-                                               
lcl_setStyleProperty(m_xReportDefinition,PROPERTY_RIGHTMARGIN,static_cast<const 
SvxLRSpaceItem*>(pItem)->GetRight());
+                                               
setStyleProperty(m_xReportDefinition,PROPERTY_LEFTMARGIN,static_cast<const 
SvxLRSpaceItem*>(pItem)->GetLeft());
+                                               
setStyleProperty(m_xReportDefinition,PROPERTY_RIGHTMARGIN,static_cast<const 
SvxLRSpaceItem*>(pItem)->GetRight());
                                        }
                                        if ( SFX_ITEM_SET == 
pSet->GetItemState( RPTUI_ID_ULSPACE,sal_True,&pItem))
                                        {
-                                               
lcl_setStyleProperty(m_xReportDefinition,PROPERTY_TOPMARGIN,static_cast<const 
SvxULSpaceItem*>(pItem)->GetUpper());
-                                               
lcl_setStyleProperty(m_xReportDefinition,PROPERTY_BOTTOMMARGIN,static_cast<const
 SvxULSpaceItem*>(pItem)->GetLower());
+                                               
setStyleProperty(m_xReportDefinition,PROPERTY_TOPMARGIN,static_cast<const 
SvxULSpaceItem*>(pItem)->GetUpper());
+                                               
setStyleProperty(m_xReportDefinition,PROPERTY_BOTTOMMARGIN,static_cast<const 
SvxULSpaceItem*>(pItem)->GetLower());
                                        }
                     if ( SFX_ITEM_SET == pSet->GetItemState( 
RPTUI_ID_PAGE,sal_True,&pItem))
                                        {
                         const SvxPageItem* pPageItem = static_cast<const 
SvxPageItem*>(pItem);
-                        
lcl_setStyleProperty(m_xReportDefinition,PROPERTY_ISLANDSCAPE,static_cast<sal_Bool>(pPageItem->IsLandscape()));
-                        
lcl_setStyleProperty(m_xReportDefinition,PROPERTY_NUMBERINGTYPE,static_cast<sal_Int16>(pPageItem->GetNumType()));
+                        
setStyleProperty(m_xReportDefinition,PROPERTY_ISLANDSCAPE,static_cast<sal_Bool>(pPageItem->IsLandscape()));
+                        
setStyleProperty(m_xReportDefinition,PROPERTY_NUMBERINGTYPE,static_cast<sal_Int16>(pPageItem->GetNumType()));
                     }
                     if ( SFX_ITEM_SET == pSet->GetItemState( 
RPTUI_ID_BRUSH,sal_True,&pItem))
                     {
                         ::Color aBackColor = static_cast<const 
SvxBrushItem*>(pItem)->GetColor();
-                        
lcl_setStyleProperty(m_xReportDefinition,PROPERTY_BACKTRANSPARENT,aBackColor == 
COL_TRANSPARENT);
-                        
lcl_setStyleProperty(m_xReportDefinition,PROPERTY_BACKCOLOR,aBackColor.GetColor());
+                        
setStyleProperty(m_xReportDefinition,PROPERTY_BACKTRANSPARENT,aBackColor == 
COL_TRANSPARENT);
+                        
setStyleProperty(m_xReportDefinition,PROPERTY_BACKCOLOR,aBackColor.GetColor());
                     }
                     getUndoMgr()->LeaveListAction();
                                }
@@ -3080,7 +3080,7 @@
         m_aReportModel = 
reportdesign::OReportDefinition::getSdrModel(m_xReportDefinition);
         if ( m_aReportModel )
         {
-            m_aReportModel->attachController(this);
+            m_aReportModel->attachController( *this );
             m_aReportModel->SetNotifyUndoActionHdl(LINK( this, 
OReportController, NotifyUndoActionHdl ));
         }
     }
@@ -3181,9 +3181,9 @@
 
     OSL_ENSURE(pReportSection->getSection() == _xSection,"Invalid section 
after marking the corrct one.");
 
-    sal_Int32 nLeftMargin = 
lcl_getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_LEFTMARGIN);
-    const sal_Int32 nRightMargin = 
lcl_getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN);
-    const sal_Int32 nPaperWidth = 
lcl_getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE).Width - 
nRightMargin;
+    sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_LEFTMARGIN);
+    const sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN);
+    const sal_Int32 nPaperWidth = 
getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE).Width - 
nRightMargin;
     awt::Point aPos = 
aMap.getUnpackedValueOrDefault(PROPERTY_POSITION,awt::Point(nLeftMargin,0));
     if ( aPos.X < nLeftMargin )
         aPos.X = nLeftMargin;
@@ -3323,7 +3323,7 @@
             m_pMyOwnView->setMarked(xSection,sal_True);
             pReportSection[0] = m_pMyOwnView->getMarkedSection();
 
-            sal_Int32 nLeftMargin = 
lcl_getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_LEFTMARGIN);
+            sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_LEFTMARGIN);
             awt::Point aPos = 
aMap.getUnpackedValueOrDefault(PROPERTY_POSITION,awt::Point(nLeftMargin,0));
             if ( aPos.X < nLeftMargin )
                 aPos.X = nLeftMargin;
@@ -3442,8 +3442,8 @@
                    pControl[0] = NULL;
                    pControl[1] = NULL;
             //m_pMyOwnView->GetModel()->GetUndoEnv().Lock();
-            const sal_Int32 nRightMargin = 
lcl_getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN);
-            const sal_Int32 nPaperWidth = 
lcl_getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE).Width - 
nRightMargin;
+            const sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN);
+            const sal_Int32 nPaperWidth = 
getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE).Width - 
nRightMargin;
                    OSectionView* pSectionViews[2];
                    pSectionViews[0] = pReportSection[1]->getView();
                    pSectionViews[1] = pReportSection[0]->getView();
@@ -3591,9 +3591,12 @@
                                             
,PROPERTY_PAGEHEADERON,PROPERTY_PAGEFOOTERON
                                             ,PROPERTY_COMMAND, 
PROPERTY_COMMANDTYPE
     };
+
+    void (SAL_CALL XPropertySet::*pPropertyListenerAction)( const 
::rtl::OUString&, const uno::Reference< XPropertyChangeListener >& ) =
+        _bAdd ? &XPropertySet::addPropertyChangeListener : 
&XPropertySet::removePropertyChangeListener;
+
     for (size_t i = 0; i < sizeof(aProps)/sizeof(aProps[0]); ++i)
-               _bAdd ? 
m_xReportDefinition->addPropertyChangeListener(aProps[i], 
static_cast<XPropertyChangeListener*>(this))
-        : m_xReportDefinition->removePropertyChangeListener(aProps[i], 
static_cast<XPropertyChangeListener*>(this));
+        (m_xReportDefinition.get()->*pPropertyListenerAction)( aProps[i], 
static_cast< XPropertyChangeListener* >( this ) );
 
     OXUndoEnvironment& rUndoEnv = m_aReportModel->GetUndoEnv();
     uno::Reference< XPropertyChangeListener > xUndo = &rUndoEnv;
@@ -3605,13 +3608,14 @@
     for(;pIter != pEnd;++pIter)
     {
         if ( ::std::find(pPropsBegin,pPropsEnd,pIter->Name) == pPropsEnd )
-            _bAdd ? 
m_xReportDefinition->addPropertyChangeListener(pIter->Name,xUndo)
-            : 
m_xReportDefinition->removePropertyChangeListener(pIter->Name,xUndo);
+            (m_xReportDefinition.get()->*pPropertyListenerAction)( 
pIter->Name, xUndo );
     }
     
-    _bAdd ? rUndoEnv.AddElement(m_xReportDefinition->getStyleFamilies()) : 
rUndoEnv.RemoveElement(m_xReportDefinition->getStyleFamilies());
+    void (OXUndoEnvironment::*pElementUndoFunction)( const uno::Reference< 
uno::XInterface >& ) =
+        _bAdd ? &OXUndoEnvironment::AddElement : 
&OXUndoEnvironment::RemoveElement;
 
-    _bAdd ? rUndoEnv.AddElement(m_xReportDefinition->getFunctions()) : 
rUndoEnv.RemoveElement(m_xReportDefinition->getFunctions());
+    (rUndoEnv.*pElementUndoFunction)( m_xReportDefinition->getStyleFamilies() 
);
+    (rUndoEnv.*pElementUndoFunction)( m_xReportDefinition->getFunctions() );
     
     if ( m_xReportDefinition->getPageHeaderOn() && _bAdd )
                
m_pMyOwnView->addSection(m_xReportDefinition->getPageHeader(),DBPAGEHEADER);
@@ -3625,14 +3629,11 @@
        for (sal_Int32 i=0;i<nCount ; ++i)
        {
                uno::Reference< report::XGroup > 
xGroup(xGroups->getByIndex(i),uno::UNO_QUERY);
-               _bAdd ? xGroup->addPropertyChangeListener(PROPERTY_HEADERON, 
static_cast<XPropertyChangeListener*>(this))
-            : xGroup->removePropertyChangeListener(PROPERTY_HEADERON, 
static_cast<XPropertyChangeListener*>(this));
-               _bAdd ? xGroup->addPropertyChangeListener(PROPERTY_FOOTERON, 
static_cast<XPropertyChangeListener*>(this))
-            : xGroup->removePropertyChangeListener(PROPERTY_FOOTERON, 
static_cast<XPropertyChangeListener*>(this));
-
-        _bAdd ? rUndoEnv.AddElement(xGroup) : rUndoEnv.RemoveElement(xGroup);
-        _bAdd ? rUndoEnv.AddElement(xGroup->getFunctions()) : 
rUndoEnv.RemoveElement(xGroup->getFunctions());
-        //xGroup->addPropertyChangeListener(::rtl::OUString(),rUndoEnv);
+        (xGroup.get()->*pPropertyListenerAction)( PROPERTY_HEADERON, 
static_cast< XPropertyChangeListener* >( this ) );
+        (xGroup.get()->*pPropertyListenerAction)( PROPERTY_FOOTERON, 
static_cast< XPropertyChangeListener* >( this ) );
+
+        (rUndoEnv.*pElementUndoFunction)( xGroup );
+        (rUndoEnv.*pElementUndoFunction)( xGroup->getFunctions() );
                if ( xGroup->getHeaderOn() && _bAdd )
                        
m_pMyOwnView->addSection(xGroup->getHeader(),DBGROUPHEADER);
        } // for (sal_Int32 i=0;i<nCount ; ++i)

File [changed]: ReportSection.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportSection.cxx?r1=1.1.2.8&r2=1.1.2.9
Delta lines:  +9 -9
-------------------
--- ReportSection.cxx   2007-06-06 10:15:35+0000        1.1.2.8
+++ ReportSection.cxx   2007-06-20 14:23:57+0000        1.1.2.9
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ReportSection.cxx,v $
  *
- *  $Revision: 1.1.2.8 $
+ *  $Revision: 1.1.2.9 $
  *
- *  last change: $Author: oj $ $Date: 2007/06/06 10:15:35 $
+ *  last change: $Author: fs $ $Date: 2007/06/20 14:23:57 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -187,11 +187,11 @@
        if ( m_xSection.is() && m_pPage && m_pView )
        {
                uno::Reference<report::XReportDefinition> xReportDefinition = 
m_xSection->getReportDefinition();
-               m_pPage->SetSize( Size( 
lcl_getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,2*m_xSection->getHeight())
 );
+               m_pPage->SetSize( Size( 
getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,2*m_xSection->getHeight())
 );
                const Size aPageSize = m_pPage->GetSize();
                
-               const sal_Int32 nLeftMargin = 
lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
-               const sal_Int32 nRightMargin = 
lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
+               const sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
+               const sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
                m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), 
Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) );
         // PixelToLogic(Size(0,m_pParent->getTotalHeight(this)) ).Height()
        }
@@ -230,8 +230,8 @@
        m_pView->SetPageVisible();
        m_pView->SetApplicationDocumentColor(m_xSection->getBackColor());
 
-    const sal_Int32 nLeftMargin = 
lcl_getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_LEFTMARGIN);
-       const sal_Int32 nRightMargin = 
lcl_getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_RIGHTMARGIN);
+    const sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_LEFTMARGIN);
+       const sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_RIGHTMARGIN);
        m_pPage->SetLftBorder(nLeftMargin);
        m_pPage->SetRgtBorder(nRightMargin);
 
@@ -529,13 +529,13 @@
                {
             if ( _rEvent.PropertyName == PROPERTY_LEFTMARGIN )
             {
-                const sal_Int32 nLeftMargin = 
lcl_getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_LEFTMARGIN);
+                const sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_LEFTMARGIN);
                    m_pPage->SetLftBorder(nLeftMargin);
                 
//m_pView->GetSdrPageView()->SetPageOrigin(Point(nLeftMargin,0));
             }
             else if ( _rEvent.PropertyName == PROPERTY_RIGHTMARGIN )
             {
-                const sal_Int32 nRightMargin = 
lcl_getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_RIGHTMARGIN);
+                const sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_RIGHTMARGIN);
                    m_pPage->SetRgtBorder(nRightMargin);
             }
 

File [changed]: ReportWindow.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportWindow.cxx?r1=1.1.2.6&r2=1.1.2.7
Delta lines:  +6 -6
-------------------
--- ReportWindow.cxx    2007-06-05 11:45:43+0000        1.1.2.6
+++ ReportWindow.cxx    2007-06-20 14:23:57+0000        1.1.2.7
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ReportWindow.cxx,v $
  *
- *  $Revision: 1.1.2.6 $
+ *  $Revision: 1.1.2.7 $
  *
- *  last change: $Author: oj $ $Date: 2007/06/05 11:45:43 $
+ *  last change: $Author: fs $ $Date: 2007/06/20 14:23:57 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -235,7 +235,7 @@
        sal_Int32 nWidth = 0;
        if ( m_pViews && !m_pViews->empty() )
        {
-               const sal_Int32 nPaperWidth = 
lcl_getStyleProperty<awt::Size>(m_pView->getController()->getReportDefinition(),PROPERTY_PAPERSIZE).Width;
+               const sal_Int32 nPaperWidth = 
getStyleProperty<awt::Size>(m_pView->getController()->getReportDefinition(),PROPERTY_PAPERSIZE).Width;
                const Size aPageSize = 
LogicToPixel(Size(nPaperWidth,0),MAP_100TH_MM);
                nWidth = aPageSize.Width()
                                + REPORT_ENDMARKER_WIDTH + 
REPORT_STARTMARKER_WIDTH;
@@ -252,9 +252,9 @@
                
                Point aStartPoint(REPORT_STARTMARKER_WIDTH,0);
                uno::Reference<report::XReportDefinition> xReportDefinition = 
getReportView()->getController()->getReportDefinition();
-               const sal_Int32 nPaperWidth = 
lcl_getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
-               sal_Int32 nLeftMargin = 
lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
-               sal_Int32 nRightMargin = 
lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
+               const sal_Int32 nPaperWidth = 
getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
+               sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
+               sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
                Size aPageSize = LogicToPixel(Size(nPaperWidth,0),MAP_100TH_MM);
                nLeftMargin = 
LogicToPixel(Size(nLeftMargin,0),MAP_100TH_MM).Width();
                nRightMargin = 
LogicToPixel(Size(nRightMargin,0),MAP_100TH_MM).Width();

File [changed]: ViewsWindow.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ViewsWindow.cxx?r1=1.1.2.9&r2=1.1.2.10
Delta lines:  +9 -9
-------------------
--- ViewsWindow.cxx     2007-06-05 11:45:44+0000        1.1.2.9
+++ ViewsWindow.cxx     2007-06-20 14:23:57+0000        1.1.2.10
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ViewsWindow.cxx,v $
  *
- *  $Revision: 1.1.2.9 $
+ *  $Revision: 1.1.2.10 $
  *
- *  last change: $Author: oj $ $Date: 2007/06/05 11:45:44 $
+ *  last change: $Author: fs $ $Date: 2007/06/20 14:23:57 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -255,9 +255,9 @@
        uno::Reference<report::XReportDefinition> xReportDefinition = 
getView()->getReportView()->getController()->getReportDefinition();
        if ( !xReportDefinition.is() )
                return;
-       //sal_Int32 nLeftMargin = 
lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
-       sal_Int32 nRightMargin = 
lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
-       const sal_Int32 nPaperWidth = 
lcl_getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
+       //sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
+       sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
+       const sal_Int32 nPaperWidth = 
getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
        const Size aOrignalSize = 
LogicToPixel(Size(nPaperWidth,0),MAP_100TH_MM);
        nRightMargin = LogicToPixel(Size(nRightMargin,0),MAP_100TH_MM).Width();
        
@@ -932,8 +932,8 @@
                 try
                 {
                     uno::Reference<report::XReportDefinition> 
xReportDefinition = xSection->getReportDefinition();
-                               
_rBound.Union(Rectangle(lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN),0,
-                                                                       
lcl_getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width  - 
lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN),
+                               
_rBound.Union(Rectangle(getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN),0,
+                                                                       
getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width  - 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN),
                                                                        
xSection->getHeight()));
                 }
                 catch(uno::Exception){}
@@ -968,8 +968,8 @@
                 eCompareMode = (ControlModification::CENTER_VERTICAL == 
_nControlModification) ?  RectangleLess::POS_CENTER_VERTICAL :  
RectangleLess::POS_CENTER_HORIZONTAL; 
                 uno::Reference<report::XSection> xSection = 
m_aSections.begin()->first.first->getSection();
                 uno::Reference<report::XReportDefinition> xReportDefinition = 
xSection->getReportDefinition();
-                           aRefPoint = 
Rectangle(lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN),0,
-                                                                       
lcl_getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width  - 
lcl_getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN),
+                           aRefPoint = 
Rectangle(getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN),0,
+                                                                       
getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width  - 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN),
                                                                        
xSection->getHeight()).Center();
             }
             break;




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

Reply via email to