summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-01-10 14:23:31 +0100
committerOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-01-10 14:23:31 +0100
commit5813b6702c7bb97e63bc6648a23942935eadda96 (patch)
treeeed5aca64ddfb8f2e0f2d79fd75bcdde4ef8ad6d /reportdesign
parent8162ad59bec02814af20eb87131d46201f23d764 (diff)
parent897ade45672a36ffd278b1cb9ba21694c0ee45c7 (diff)
Automated merge with ssh://hg.services.openoffice.org/cws/dba34c
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 04222d6e2f1e..6aa29551bcbf 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -544,22 +544,22 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
else
{
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);
+ const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
+
if ( _rEvent.PropertyName == PROPERTY_LEFTMARGIN )
{
- const sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
m_pPage->SetLftBorder(nLeftMargin);
}
else if ( _rEvent.PropertyName == PROPERTY_RIGHTMARGIN )
{
- const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
m_pPage->SetRgtBorder(nRightMargin);
}
try
{
- const sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
- const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
- const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
+ sal_Int32 nRightBorder = nPaperWidth - nRightMargin;
const sal_Int32 nCount = m_xSection->getCount();
for (sal_Int32 i = 0; i < nCount; ++i)
{
@@ -578,9 +578,9 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
aPos.X = nLeftMargin;
bChanged = true;
}
- if ( (aPos.X + aSize.Width) > (nPaperWidth - nRightMargin) )
+ if ( (aPos.X + aSize.Width) > nRightBorder )
{
- aPos.X = nPaperWidth - nRightMargin - aSize.Width;
+ aPos.X = nRightBorder - aSize.Width;
if ( aPos.X < nLeftMargin )
{
aSize.Width += aPos.X - nLeftMargin;
@@ -603,6 +603,8 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
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();
}