summaryrefslogtreecommitdiff
path: root/reportdesign/source/ui/report/ViewsWindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'reportdesign/source/ui/report/ViewsWindow.cxx')
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx42
1 files changed, 21 insertions, 21 deletions
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index d68cba1a27b2..e4c82dd07a91 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -493,19 +493,19 @@ void OViewsWindow::SelectAll(const sal_uInt16 _nObjectType)
void OViewsWindow::unmarkAllObjects(OSectionView const * _pSectionView)
{
- if ( !m_bInUnmark )
+ if ( m_bInUnmark )
+ return;
+
+ m_bInUnmark = true;
+ for (const auto& rxSection : m_aSections)
{
- m_bInUnmark = true;
- for (const auto& rxSection : m_aSections)
+ if ( &rxSection->getReportSection().getSectionView() != _pSectionView )
{
- if ( &rxSection->getReportSection().getSectionView() != _pSectionView )
- {
- rxSection->getReportSection().deactivateOle();
- rxSection->getReportSection().getSectionView().UnmarkAllObj();
- }
+ rxSection->getReportSection().deactivateOle();
+ rxSection->getReportSection().getSectionView().UnmarkAllObj();
}
- m_bInUnmark = false;
}
+ m_bInUnmark = false;
}
void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints)
@@ -539,20 +539,20 @@ void OViewsWindow::showRuler(bool _bShow)
void OViewsWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
- if ( rMEvt.IsLeft() )
+ if ( !rMEvt.IsLeft() )
+ return;
+
+ auto aIter = std::find_if(m_aSections.begin(), m_aSections.end(),
+ [](const VclPtr<OSectionWindow>& rxSection) { return rxSection->getReportSection().getSectionView().AreObjectsMarked(); });
+ if (aIter != m_aSections.end())
{
- auto aIter = std::find_if(m_aSections.begin(), m_aSections.end(),
- [](const VclPtr<OSectionWindow>& rxSection) { return rxSection->getReportSection().getSectionView().AreObjectsMarked(); });
- if (aIter != m_aSections.end())
- {
- (*aIter)->getReportSection().MouseButtonUp(rMEvt);
- }
+ (*aIter)->getReportSection().MouseButtonUp(rMEvt);
+ }
- // remove special insert mode
- for (const auto& rxSection : m_aSections)
- {
- rxSection->getReportSection().getPage()->resetSpecialMode();
- }
+ // remove special insert mode
+ for (const auto& rxSection : m_aSections)
+ {
+ rxSection->getReportSection().getPage()->resetSpecialMode();
}
}