summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-27 15:13:02 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-28 06:25:59 +0000
commit08f2993b09d5684dc148801f6f6b402ab653aad8 (patch)
tree58d4e908eceaf2b80f3ec43d196b56548a48c34a /reportdesign
parent4391d400e01e4a756d03d357d81e9769c34ae83b (diff)
loplugin:singlevalfields in reportdesign
Change-Id: Ife4dcb77f4c98ff2741939d31d5275d46f3b9b68 Reviewed-on: https://gerrit.libreoffice.org/26711 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx6
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx1
-rw-r--r--reportdesign/source/ui/inc/DesignView.hxx2
-rw-r--r--reportdesign/source/ui/inc/GeometryHandler.hxx1
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx4
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx1
-rw-r--r--reportdesign/source/ui/report/ReportControllerObserver.cxx22
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx2
8 files changed, 9 insertions, 30 deletions
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 638a5bc20799..c865e1cace3d 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -76,7 +76,6 @@ ExportDocumentHandler::ExportDocumentHandler(uno::Reference< uno::XComponentCont
,m_nColumnCount(0)
,m_bTableRowsStarted(false)
,m_bFirstRowExported(false)
- ,m_bExportChar(false)
,m_bCountColumnHeader(false)
{
}
@@ -275,11 +274,6 @@ void SAL_CALL ExportDocumentHandler::characters(const OUString & aChars) throw (
{
m_xDelegatee->characters(aChars);
}
- else if ( m_bExportChar )
- {
- static const char s_sZero[] = "0";
- m_xDelegatee->characters(s_sZero);
- }
}
void SAL_CALL ExportDocumentHandler::ignorableWhitespace(const OUString & aWhitespaces) throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
index 203159d34bd8..27184d88ffd1 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
@@ -91,7 +91,6 @@ private:
sal_Int32 m_nColumnCount;
bool m_bTableRowsStarted;
bool m_bFirstRowExported;
- bool m_bExportChar;
bool m_bCountColumnHeader;
};
diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx
index 00334fc58c70..3d820dc66723 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -73,7 +73,6 @@ namespace rptui
sal_uInt16 m_eActObj;
Size m_aGridSizeCoarse;
Size m_aGridSizeFine;
- bool m_bGridSnap;
bool m_bDeleted;
@@ -166,7 +165,6 @@ namespace rptui
const Size& getGridSizeCoarse() const { return m_aGridSizeCoarse; }
const Size& getGridSizeFine() const { return m_aGridSizeFine; }
- inline bool isGridSnap() const { return m_bGridSnap; }
void setGridSnap(bool bOn);
void setDragStripes(bool bOn);
/** turns the grid on or off
diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx
index 7512fb06173e..12137a63c0c8 100644
--- a/reportdesign/source/ui/inc/GeometryHandler.hxx
+++ b/reportdesign/source/ui/inc/GeometryHandler.hxx
@@ -49,7 +49,6 @@ namespace rptui
OUString m_sSearchString;
OUString m_sFormula;
bool m_bPreEvaluated;
- bool m_bDeepTraversing;
const OUString& getName() const { return m_sName; }
} ;
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index de42f1fb5bfe..6e3004500db5 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1898,7 +1898,6 @@ void GeometryHandler::loadDefaultFunctions()
if ( m_aDefaultFunctions.empty() )
{
m_aCounterFunction.m_bPreEvaluated = false;
- m_aCounterFunction.m_bDeepTraversing = false;
m_aCounterFunction.m_sName = ModuleRes(RID_STR_F_COUNTER);
m_aCounterFunction.m_sFormula = "rpt:[%FunctionName] + 1";
m_aCounterFunction.m_sSearchString = "rpt:\\[[:alpha:]+([:space:]*[:alnum:]*)*\\][:space:]*\\+[:space:]*[:digit:]*";
@@ -1906,7 +1905,6 @@ void GeometryHandler::loadDefaultFunctions()
m_aCounterFunction.m_sInitialFormula.Value = "rpt:1";
DefaultFunction aDefault;
- aDefault.m_bDeepTraversing = false;
aDefault.m_bPreEvaluated = true;
@@ -2124,7 +2122,7 @@ void GeometryHandler::impl_createFunction(const OUString& _sFunctionName,const O
m_xFunction->setFormula(sFormula);
m_xFunction->setPreEvaluated(_aFunction.m_bPreEvaluated);
- m_xFunction->setDeepTraversing(_aFunction.m_bDeepTraversing);
+ m_xFunction->setDeepTraversing(false);
if ( _aFunction.m_sInitialFormula.IsPresent )
{
beans::Optional< OUString> aInitialFormula = _aFunction.m_sInitialFormula;
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 3057db7e3062..7e7d984b7d89 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -98,7 +98,6 @@ ODesignView::ODesignView( vcl::Window* pParent,
,m_eActObj( OBJ_NONE )
,m_aGridSizeCoarse( 1000, 1000 ) // #i93595# 100TH_MM changed to grid using coarse 1 cm grid
,m_aGridSizeFine( 250, 250 ) // and a 0,25 cm subdivision for better visualisation
- ,m_bGridSnap(true)
,m_bDeleted( false )
{
SetHelpId(UID_RPT_RPT_APP_VIEW);
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index c5594ec34d3e..801880dbb0c3 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -53,7 +53,6 @@ public:
::std::vector< uno::Reference< container::XChild> > m_aSections;
::osl::Mutex m_aMutex;
oslInterlockedCount m_nLocks;
- bool m_bReadOnly;
explicit OXReportControllerObserverImpl();
OXReportControllerObserverImpl(const OXReportControllerObserverImpl&) = delete;
@@ -63,7 +62,6 @@ public:
OXReportControllerObserverImpl::OXReportControllerObserverImpl()
:m_nLocks(0)
- ,m_bReadOnly(false)
{
}
@@ -234,10 +232,7 @@ void OXReportControllerObserver::TogglePropertyListening(const uno::Reference< u
uno::Reference< beans::XPropertySet > xSet(Element, uno::UNO_QUERY);
if (xSet.is())
{
- if (!m_pImpl->m_bReadOnly)
- xSet->addPropertyChangeListener( OUString(), this );
- else
- xSet->removePropertyChangeListener( OUString(), this );
+ xSet->addPropertyChangeListener( OUString(), this );
}
}
@@ -285,16 +280,13 @@ void OXReportControllerObserver::switchListening( const uno::Reference< uno::XIn
try
{
- if ( !m_pImpl->m_bReadOnly )
+ uno::Reference< beans::XPropertySet > xProps( _rxObject, uno::UNO_QUERY );
+ if ( xProps.is() )
{
- uno::Reference< beans::XPropertySet > xProps( _rxObject, uno::UNO_QUERY );
- if ( xProps.is() )
- {
- if ( _bStartListening )
- xProps->addPropertyChangeListener( OUString(), this );
- else
- xProps->removePropertyChangeListener( OUString(), this );
- }
+ if ( _bStartListening )
+ xProps->addPropertyChangeListener( OUString(), this );
+ else
+ xProps->removePropertyChangeListener( OUString(), this );
}
uno::Reference< util::XModifyBroadcaster > xBroadcaster( _rxObject, uno::UNO_QUERY );
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index ce723b9a19fb..0430e4b0a4be 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -211,7 +211,7 @@ void OReportSection::fill()
const Fraction aY(aGridSizeFine.B());
m_pView->SetSnapGridWidth(aX, aY);
- m_pView->SetGridSnap( pDesignView->isGridSnap() );
+ m_pView->SetGridSnap( true );
m_pView->SetGridFront( false );
m_pView->SetDragStripes( true );
m_pView->SetPageVisible();