summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorOcke.Janssen <Ocke.Janssen@oracle.com>2011-02-01 13:42:47 +0100
committerOcke.Janssen <Ocke.Janssen@oracle.com>2011-02-01 13:42:47 +0100
commitbee746960f3d94d92e71006a7365a26669f52f8c (patch)
tree85be519854c16b7e3069d445b70b6afda4dda4d2 /reportdesign
parenta6f0350550d96ba8e00e79325a260a63a5899107 (diff)
dba34d: limit invalidate calls
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/inc/ReportSection.hxx4
-rw-r--r--reportdesign/source/ui/inc/ReportWindow.hxx9
-rw-r--r--reportdesign/source/ui/misc/ColorListener.cxx16
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx4
-rw-r--r--reportdesign/source/ui/report/EndMarker.cxx5
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx161
-rw-r--r--reportdesign/source/ui/report/ReportWindow.cxx13
-rw-r--r--reportdesign/source/ui/report/SectionView.cxx1
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx35
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx19
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx23
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx6
12 files changed, 163 insertions, 133 deletions
diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx
index a95fd72b7f40..00f3480f6964 100644
--- a/reportdesign/source/ui/inc/ReportSection.hxx
+++ b/reportdesign/source/ui/inc/ReportSection.hxx
@@ -59,6 +59,7 @@ namespace rptui
::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;
DlgEdMode m_eMode;
BOOL m_bDialogModelChanged;
@@ -67,6 +68,9 @@ 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&);
diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx
index 4267bc0ef6e4..9e7f7c6a8f90 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -36,6 +36,7 @@
#include <vector>
#include <boost/shared_ptr.hpp>
+#include <comphelper/propmultiplex.hxx>
#include <MarkedSection.hxx>
#include "ViewsWindow.hxx"
@@ -54,12 +55,16 @@ namespace rptui
class DlgEdFunc;
class DlgEdFactory;
- class OReportWindow : public Window, public IMarkedSection
+ class OReportWindow : public Window
+ , public IMarkedSection
+ , public ::cppu::BaseMutex
+ , public ::comphelper::OPropertyChangeListener
{
Ruler m_aHRuler;
ODesignView* m_pView;
OScrollWindowHelper* m_pParent;
OViewsWindow m_aViewsWindow;
+ ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener;
::std::auto_ptr<DlgEdFactory>
m_pObjFac;
@@ -72,6 +77,8 @@ namespace rptui
void operator =(OReportWindow&);
protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ // OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& _rEvent) throw( ::com::sun::star::uno::RuntimeException);
public:
OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView);
virtual ~OReportWindow();
diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx
index 2a53a5937095..78d7b8dba0fb 100644
--- a/reportdesign/source/ui/misc/ColorListener.cxx
+++ b/reportdesign/source/ui/misc/ColorListener.cxx
@@ -82,15 +82,21 @@ void OColorListener::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------------
void OColorListener::setCollapsed(sal_Bool _bCollapsed)
{
- m_bCollapsed = _bCollapsed;
- if ( m_aCollapsedLink.IsSet() )
- m_aCollapsedLink.Call(this);
+ if ( m_bCollapsed != _bCollapsed )
+ {
+ m_bCollapsed = _bCollapsed;
+ if ( m_aCollapsedLink.IsSet() )
+ m_aCollapsedLink.Call(this);
+ }
}
// -----------------------------------------------------------------------------
void OColorListener::setMarked(sal_Bool _bMark)
{
- m_bMarked = _bMark;
- Invalidate();
+ if ( m_bMarked != _bMark)
+ {
+ m_bMarked = _bMark;
+ Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE);
+ }
}
// =======================================================================
}
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 8f703ab57f4f..b3165684d72d 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -495,10 +495,6 @@ IMPL_LINK( ODesignView, SplitHdl, void*, )
{
long nOldSplitPos = getController().getSplitPos();
getController().setSplitPos(nTest);
- if ( nOldSplitPos != -1 && nOldSplitPos <= nTest )
- {
- Invalidate(/*INVALIDATE_NOCHILDREN*/);
- }
}
return 0L;
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx
index c32a07d5fc76..0528631f851b 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -46,7 +46,6 @@ OEndMarker::OEndMarker(Window* _pParent ,const ::rtl::OUString& _sColorEntry)
DBG_CTOR( rpt_OEndMarker,NULL);
SetUniqueId(HID_RPT_ENDMARKER);
ImplInitSettings();
- SetPaintTransparent(TRUE);
}
// -----------------------------------------------------------------------------
OEndMarker::~OEndMarker()
@@ -89,6 +88,10 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ )
// -----------------------------------------------------------------------
void OEndMarker::ImplInitSettings()
{
+ EnableChildTransparentMode( TRUE );
+ SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetPaintTransparent( TRUE );
+
SetBackground( Wallpaper( svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor) );
SetFillColor( Application::GetSettings().GetStyleSettings().GetShadowColor() );
}
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 6aa29551bcbf..ffc77bc3c115 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -95,14 +95,18 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
,m_pMulti(NULL)
,m_pReportListener(NULL)
,m_xSection(_xSection)
+,m_nPaintEntranceCount(0)
,m_eMode(RPTUI_SELECT)
,m_bDialogModelChanged(FALSE)
,m_bInDrag(sal_False)
{
DBG_CTOR( rpt_OReportSection,NULL);
- EnableChildTransparentMode();
+ //EnableChildTransparentMode();
SetHelpId(HID_REPORTSECTION);
SetMapMode( MapMode( MAP_100TH_MM ) );
+ SetParentClipMode( PARENTCLIPMODE_CLIP );
+ EnableChildTransparentMode( FALSE );
+ SetPaintTransparent( FALSE );
try
{
@@ -142,8 +146,9 @@ void OReportSection::Paint( const Rectangle& rRect )
{
Window::Paint(rRect);
- if ( m_pView )
+ if ( m_pView && m_nPaintEntranceCount == 0)
{
+ ++m_nPaintEntranceCount;
// repaint, get PageView and prepare Region
SdrPageView* pPgView = m_pView->GetSdrPageView();
const Region aPaintRectRegion(rRect);
@@ -158,10 +163,7 @@ void OReportSection::Paint( const Rectangle& rRect )
OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
// draw background self using wallpaper
OutputDevice& rTargetOutDev = pTargetPaintWindow->GetTargetOutputDevice();
- sal_Int32 nColor = m_xSection->getBackColor();
- if ( nColor == (sal_Int32)COL_TRANSPARENT )
- nColor = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
- rTargetOutDev.DrawWallpaper(rRect, Wallpaper(Color(nColor)));
+ rTargetOutDev.DrawWallpaper(rRect, Wallpaper(pPgView->GetApplicationDocumentColor()));
}
// do paint (unbuffered) and mark repaint end
@@ -172,21 +174,13 @@ void OReportSection::Paint( const Rectangle& rRect )
}
m_pView->CompleteRedraw(this,aPaintRectRegion);
+ --m_nPaintEntranceCount;
}
}
//------------------------------------------------------------------------------
void OReportSection::Resize()
{
Window::Resize();
- if ( m_xSection.is() && m_pPage && m_pView )
- {
- uno::Reference<report::XReportDefinition> xReportDefinition = m_xSection->getReportDefinition();
- m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) );
- const Size aPageSize = m_pPage->GetSize();
- 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()) ) );
- }
}
//------------------------------------------------------------------------------
void OReportSection::fill()
@@ -235,8 +229,9 @@ void OReportSection::fill()
nColor = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
m_pView->SetApplicationDocumentColor(nColor);
- const sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_LEFTMARGIN);
- const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_RIGHTMARGIN);
+ uno::Reference<report::XReportDefinition> xReportDefinition = m_xSection->getReportDefinition();
+ const sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
+ const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
m_pPage->SetLftBorder(nLeftMargin);
m_pPage->SetRgtBorder(nRightMargin);
@@ -247,15 +242,9 @@ void OReportSection::fill()
m_pView->StartListening( *m_pModel );
/*Resize();*/
- if ( m_xSection.is() && m_pPage && m_pView )
- {
- uno::Reference<report::XReportDefinition> xReportDefinition = m_xSection->getReportDefinition();
- m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) );
- const Size aPageSize = m_pPage->GetSize();
- const sal_Int32 nWorkAreaLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
- const sal_Int32 nWorkAreaRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
- m_pView->SetWorkArea( Rectangle( Point( nWorkAreaLeftMargin, 0), Size(aPageSize.Width() - nWorkAreaLeftMargin - nWorkAreaRightMargin,aPageSize.Height()) ) );
- } // if ( m_xSection.is() && m_pPage && m_pView )
+ m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) );
+ const Size aPageSize = m_pPage->GetSize();
+ m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) );
//SetBackground( Wallpaper( COL_BLUE ));
}
@@ -556,67 +545,77 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
{
m_pPage->SetRgtBorder(nRightMargin);
}
-
- try
+ const Size aOldPageSize = m_pPage->GetSize();
+ sal_Int32 nNewHeight = 5*m_xSection->getHeight();
+ if ( aOldPageSize.Height() != nNewHeight || nPaperWidth != aOldPageSize.Width() )
+ {
+ m_pPage->SetSize( Size( nPaperWidth,nNewHeight) );
+ const Size aPageSize = m_pPage->GetSize();
+ m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) );
+ }
+ 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 )
{
- sal_Int32 nRightBorder = nPaperWidth - nRightMargin;
- const sal_Int32 nCount = m_xSection->getCount();
- for (sal_Int32 i = 0; i < nCount; ++i)
+ OObjectBase* pBase = dynamic_cast<OObjectBase*>(pObject);
+ pBase->EndListening(sal_False);
+ if ( aPos.X < i_nLeftMargin )
+ {
+ aPos.X = i_nLeftMargin;
+ bChanged = true;
+ }
+ if ( (aPos.X + aSize.Width) > nRightBorder )
{
- 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 )
+ aPos.X = nRightBorder - aSize.Width;
+ if ( aPos.X < i_nLeftMargin )
{
- OObjectBase* pBase = dynamic_cast<OObjectBase*>(pObject);
- pBase->EndListening(sal_False);
- if ( aPos.X < nLeftMargin )
- {
- aPos.X = nLeftMargin;
- bChanged = true;
- }
- if ( (aPos.X + aSize.Width) > nRightBorder )
- {
- aPos.X = nRightBorder - aSize.Width;
- if ( aPos.X < nLeftMargin )
- {
- aSize.Width += aPos.X - nLeftMargin;
- aPos.X = nLeftMargin;
- // add listener around
- pBase->StartListening();
- xReportComponent->setSize(aSize);
- pBase->EndListening(sal_False);
- }
- bChanged = true;
- }
- if ( aPos.Y < 0 )
- aPos.Y = 0;
- if ( bChanged )
- {
- xReportComponent->setPosition(aPos);
- correctOverlapping(pObject,*this,false);
- 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());
-
- pObject->RecalcBoundRect();
- }
+ aSize.Width += aPos.X - i_nLeftMargin;
+ aPos.X = i_nLeftMargin;
+ // add listener around
pBase->StartListening();
+ xReportComponent->setSize(aSize);
+ pBase->EndListening(sal_False);
}
- } // for (sal_Int32 i = 0; i < nCount; ++i)
- }
- catch(uno::Exception)
- {
- OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged(");
+ bChanged = true;
+ }
+ if ( aPos.Y < 0 )
+ aPos.Y = 0;
+ if ( bChanged )
+ {
+ xReportComponent->setPosition(aPos);
+ correctOverlapping(pObject,*this,false);
+ 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());
+
+ pObject->RecalcBoundRect();
+ }
+ pBase->StartListening();
}
-
- Resize();
- }
+ } // for (sal_Int32 i = 0; i < nCount; ++i)
+ }
+ catch(uno::Exception)
+ {
+ OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged(");
}
}
//------------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index 3a2f4559b43a..b59c30faac5c 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -31,6 +31,7 @@
#include "ViewsWindow.hxx"
#include "ReportRuler.hxx"
#include "DesignView.hxx"
+#include "UITools.hxx"
#include <tools/debug.hxx>
#include <svtools/colorcfg.hxx>
@@ -65,6 +66,7 @@ DBG_NAME( rpt_OReportWindow )
//------------------------------------------------------------------------------
OReportWindow::OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView)
: Window(_pParent,WB_DIALOGCONTROL)
+, ::comphelper::OPropertyChangeListener(m_aMutex)
,m_aHRuler(this)
,m_pView(_pView)
,m_pParent(_pParent)
@@ -88,11 +90,14 @@ OReportWindow::OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView)
m_aHRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH);
ImplInitSettings();
+ m_pReportListener = addStyleListener(_pView->getController().getReportDefinition(),this);
}
//------------------------------------------------------------------------------
OReportWindow::~OReportWindow()
{
DBG_DTOR( rpt_OReportWindow,NULL);
+ if ( m_pReportListener.is() )
+ m_pReportListener->dispose();
}
// -----------------------------------------------------------------------------
void OReportWindow::initialize()
@@ -438,6 +443,14 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const
return nZoom;
}
+// -----------------------------------------------------------------------------
+void OReportWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) throw( uno::RuntimeException)
+{
+ Resize();
+ m_aViewsWindow.Resize();
+ static sal_Int32 nIn = INVALIDATE_TRANSPARENT;
+ Invalidate(nIn);
+}
//==================================================================
} //rptui
//==================================================================
diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx
index e0d836a3d8c5..fc0cb8b8c310 100644
--- a/reportdesign/source/ui/report/SectionView.cxx
+++ b/reportdesign/source/ui/report/SectionView.cxx
@@ -52,6 +52,7 @@ OSectionView::OSectionView( SdrModel* pModel, OReportSection* _pSectionWindow, O
,m_pSectionWindow(_pSectionWindow)
{
DBG_CTOR( rpt_OSectionView,NULL);
+ // SetPagePaintingAllowed(false);
SetBufferedOutputAllowed(true);
SetBufferedOverlayAllowed(true);
SetPageBorderVisible(false);
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 26ce8c13c2a6..5cf8994cb1d2 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -109,7 +109,6 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< rep
}
_propertyChanged(aEvent);
- SetPaintTransparent(TRUE);
}
// -----------------------------------------------------------------------------
OSectionWindow::~OSectionWindow()
@@ -135,18 +134,15 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
const uno::Reference< report::XSection> xCurrentSection = m_aReportSection.getSection();
if ( _rEvent.PropertyName.equals(PROPERTY_HEIGHT) )
{
+ static bool t4 = true;
+ if ( t4 )
m_pParent->getView()->SetUpdateMode(FALSE);
- Resize();
+ //Resize();
m_pParent->getView()->notifySizeChanged();
m_pParent->resize(*this);
+ if ( t4 )
m_pParent->getView()->SetUpdateMode(TRUE);
- m_aStartMarker.Invalidate(INVALIDATE_NOERASE);
- m_aEndMarker.Invalidate(INVALIDATE_NOERASE);
- m_aReportSection.Invalidate(/*INVALIDATE_NOERASE*/);
- getViewsWindow()->getView()->getReportView()->getController().resetZoomType();
- // Invalidate(INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT);
- // m_pParent->Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE|INVALIDATE_TRANSPARENT);
- // m_pParent->Invalidate(/*INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE |*/ INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT);
+ // getViewsWindow()->getView()->getReportView()->getController().resetZoomType();
}
else if ( _rEvent.PropertyName.equals(PROPERTY_NAME) && !xSection->getGroup().is() )
{
@@ -155,7 +151,9 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
|| setReportSectionTitle(xReport,RID_STR_REPORT_FOOTER,::std::mem_fun(&OReportHelper::getReportFooter),::std::mem_fun(&OReportHelper::getReportFooterOn))
|| setReportSectionTitle(xReport,RID_STR_PAGE_HEADER,::std::mem_fun(&OReportHelper::getPageHeader),::std::mem_fun(&OReportHelper::getPageHeaderOn))
|| setReportSectionTitle(xReport,RID_STR_PAGE_FOOTER,::std::mem_fun(&OReportHelper::getPageFooter),::std::mem_fun(&OReportHelper::getPageFooterOn)) )
+ {
m_aStartMarker.Invalidate(INVALIDATE_NOERASE);
+ }
else
{
String sTitle = String(ModuleRes(RID_STR_DETAIL));
@@ -167,10 +165,9 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
else if ( _rEvent.PropertyName.equals(PROPERTY_EXPRESSION) )
{
uno::Reference< report::XGroup > xGroup(_rEvent.Source,uno::UNO_QUERY);
- if ( xGroup.is() )
+ if ( xGroup.is() && !setGroupSectionTitle(xGroup,RID_STR_HEADER,::std::mem_fun(&OGroupHelper::getHeader),::std::mem_fun(&OGroupHelper::getHeaderOn)))
{
- if ( !setGroupSectionTitle(xGroup,RID_STR_HEADER,::std::mem_fun(&OGroupHelper::getHeader),::std::mem_fun(&OGroupHelper::getHeaderOn)) )
- setGroupSectionTitle(xGroup,RID_STR_FOOTER,::std::mem_fun(&OGroupHelper::getFooter),::std::mem_fun(&OGroupHelper::getFooterOn));
+ setGroupSectionTitle(xGroup,RID_STR_FOOTER,::std::mem_fun(&OGroupHelper::getFooter),::std::mem_fun(&OGroupHelper::getFooterOn));
}
}
}
@@ -211,8 +208,14 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>&
//------------------------------------------------------------------------------
void OSectionWindow::ImplInitSettings()
{
+ static bool t = false;
+ if ( t )
+ {
+ EnableChildTransparentMode( TRUE );
+ SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetPaintTransparent( TRUE );
+ }
SetBackground( );
- //SetBackground( Wallpaper( COL_RED ));
}
//-----------------------------------------------------------------------------
void OSectionWindow::DataChanged( const DataChangedEvent& rDCEvt )
@@ -307,10 +310,6 @@ IMPL_LINK( OSectionWindow, Collapsed, OColorListener *, _pMarker )
m_aSplitter.Show(bShow);
m_pParent->resize(*this);
- Resize();
- // TRY
- // m_pParent->Invalidate(INVALIDATE_TRANSPARENT | INVALIDATE_NOCHILDREN);
- Invalidate();
}
return 0L;
}
@@ -409,8 +408,6 @@ void OSectionWindow::scrollChildren(long _nX)
lcl_setOrigin(m_aSplitter,_nX, 0);
lcl_scroll(m_aSplitter,aDiff);
-
- Resize();
}
//==============================================================================
} // rptui
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index c3fed866e534..91a9af79caf8 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -71,6 +71,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol
initDefaultNodeImages();
ImplInitSettings();
m_aText.SetHelpId(HID_RPT_START_TITLE);
+ m_aText.SetPaintTransparent(TRUE);
m_aImage.SetHelpId(HID_RPT_START_IMAGE);
m_aText.Show();
m_aImage.Show();
@@ -83,7 +84,9 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sCol
m_aVRuler.SetMargin2();
const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
m_aVRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH);
- SetPaintTransparent(TRUE);
+ EnableChildTransparentMode( TRUE );
+ SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetPaintTransparent( TRUE );
}
// -----------------------------------------------------------------------------
OStartMarker::~OStartMarker()
@@ -107,21 +110,22 @@ sal_Int32 OStartMarker::getMinHeight() const
// -----------------------------------------------------------------------------
void OStartMarker::Paint( const Rectangle& rRect )
{
- Window::Paint( rRect );
//SetUpdateMode(FALSE);
Size aSize = GetOutputSizePixel();
long nSize = aSize.Width();
const long nCornerWidth = long(CORNER_SPACE * (double)GetMapMode().GetScaleX());
- if ( !isCollapsed() )
+ if ( isCollapsed() )
+ {
+ SetClipRegion();
+ }
+ else
{
const long nVRulerWidth = m_aVRuler.GetSizePixel().Width();
nSize = aSize.Width() - nVRulerWidth/* - m_nCornerSize*/;
- SetClipRegion(Region(PixelToLogic(Rectangle(Point(),Size( nSize,aSize.Height())))));
aSize.Width() += nCornerWidth;
- } // if ( !isCollapsed() )
- else
- SetClipRegion();
+ SetClipRegion(Region(PixelToLogic(Rectangle(Point(),Size(nSize,aSize.Height())))));
+ }
const Point aGcc3WorkaroundTemporary;
Rectangle aWholeRect(aGcc3WorkaroundTemporary,aSize);
@@ -272,7 +276,6 @@ void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint)
== SFX_HINT_COLORS_CHANGED))
{
setColor();
- //m_aText.Invalidate();
Invalidate(INVALIDATE_CHILDREN);
}
}
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index bcd50236aab3..130acfc88592 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -184,7 +184,6 @@ OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow)
,m_bInUnmark(sal_False)
{
DBG_CTOR( rpt_OViewsWindow,NULL);
- SetPaintTransparent(TRUE);
SetUniqueId(UID_RPT_VIEWSWINDOW);
SetMapMode( MapMode( MAP_100TH_MM ) );
m_aColorConfig.AddListener(this);
@@ -244,8 +243,9 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow)
if ( bSet )
{
impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,bSet);
- pSectionWindow->Invalidate(INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT);
- pSectionWindow->getStartMarker().Invalidate(INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT );
+ static sal_Int32 nIn = INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT;
+ pSectionWindow->getStartMarker().Invalidate( nIn ); // INVALIDATE_NOERASE |INVALIDATE_NOCHILDREN| INVALIDATE_TRANSPARENT
+ pSectionWindow->getEndMarker().Invalidate( nIn );
}
} // for (;aIter != aEnd ; ++aIter,++nPos)
Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH));
@@ -256,7 +256,6 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow)
m_pParent->notifySizeChanged();
Rectangle aRect(PixelToLogic(Point(0,0)),aOut);
- Invalidate(aRect,INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT);
}
//------------------------------------------------------------------------------
void OViewsWindow::Resize()
@@ -294,7 +293,7 @@ void OViewsWindow::Paint( const Rectangle& rRect )
//------------------------------------------------------------------------------
void OViewsWindow::ImplInitSettings()
{
- // SetBackground( Wallpaper( COL_LIGHTBLUE ));
+ EnableChildTransparentMode( TRUE );
SetBackground( );
SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() );
SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() );
@@ -317,8 +316,6 @@ void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSectio
::boost::shared_ptr<OSectionWindow> pSectionWindow( new OSectionWindow(this,_xSection,_sColorEntry) );
m_aSections.insert(getIteratorAtPos(_nPosition) , TSectionsMap::value_type(pSectionWindow));
m_pParent->setMarked(&pSectionWindow->getReportSection().getSectionView(),m_aSections.size() == 1);
-
- Resize();
}
//----------------------------------------------------------------------------
void OViewsWindow::removeSection(USHORT _nPosition)
@@ -566,8 +563,8 @@ void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView)
// -----------------------------------------------------------------------
void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32)
{
- ImplInitSettings();
- Invalidate();
+ ImplInitSettings();
+ Invalidate();
}
// -----------------------------------------------------------------------------
void OViewsWindow::MouseButtonDown( const MouseEvent& rMEvt )
@@ -946,7 +943,8 @@ void OViewsWindow::setGridSnap(BOOL bOn)
for (; aIter != aEnd ; ++aIter)
{
(*aIter)->getReportSection().getSectionView().SetGridSnap(bOn);
- (*aIter)->getReportSection().Invalidate();
+ static sal_Int32 nIn = 0;
+ (*aIter)->getReportSection().Invalidate(nIn);
}
}
// -----------------------------------------------------------------------------
@@ -1826,7 +1824,8 @@ void OViewsWindow::zoom(const Fraction& _aZoom)
aOut = PixelToLogic(aOut);
Rectangle aRect(PixelToLogic(Point(0,0)),aOut);
- Invalidate(aRect,/*INVALIDATE_NOERASE | */INVALIDATE_NOCHILDREN /*| INVALIDATE_TRANSPARENT*/);
+ static sal_Int32 nIn = INVALIDATE_NOCHILDREN;
+ Invalidate(aRect,nIn);
}
//----------------------------------------------------------------------------
void OViewsWindow::scrollChildren(const Point& _aThumbPos)
@@ -1843,8 +1842,6 @@ void OViewsWindow::scrollChildren(const Point& _aThumbPos)
SetMapMode( aMapMode );
//OWindowPositionCorrector aCorrector(this,0,-( aOld.Y() + aPosY.Y()));
Scroll(0, -( aOld.Y() + aPosY.Y()),SCROLL_CHILDREN);
- Resize();
- Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_TRANSPARENT);
}
TSectionsMap::iterator aIter = m_aSections.begin();
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index 13badddbb079..3afb16b7ae0c 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -92,8 +92,12 @@ void DlgEdFunc::ForceScroll( const Point& rPos )
aStartWidth *= m_pParent->GetMapMode().GetScaleX();
aOut.Width() -= (long)aStartWidth;
+ aOut.Height() = m_pParent->GetOutputSizePixel().Height();
- Rectangle aOutRect( pScrollWindow->getThumbPos(), aOut );
+ Point aPos = pScrollWindow->getThumbPos();
+ aPos.X() *= 0.5;
+ aPos.Y() *= 0.5;
+ Rectangle aOutRect( aPos, aOut );
aOutRect = m_pParent->PixelToLogic( aOutRect );
//Rectangle aWorkArea = m_pParent->getView()->GetWorkArea();
Point aGcc3WorkaroundTemporary;