[Libreoffice-commits] core.git: reportdesign/source

Noel Grandin noel at peralex.com
Tue Jun 28 06:26:29 UTC 2016


 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |    6 ---
 reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx |    1 
 reportdesign/source/ui/inc/DesignView.hxx                   |    2 -
 reportdesign/source/ui/inc/GeometryHandler.hxx              |    1 
 reportdesign/source/ui/inspection/GeometryHandler.cxx       |    4 --
 reportdesign/source/ui/report/DesignView.cxx                |    1 
 reportdesign/source/ui/report/ReportControllerObserver.cxx  |   22 +++---------
 reportdesign/source/ui/report/ReportSection.cxx             |    2 -
 8 files changed, 9 insertions(+), 30 deletions(-)

New commits:
commit 08f2993b09d5684dc148801f6f6b402ab653aad8
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jun 27 15:13:02 2016 +0200

    loplugin:singlevalfields in reportdesign
    
    Change-Id: Ife4dcb77f4c98ff2741939d31d5275d46f3b9b68
    Reviewed-on: https://gerrit.libreoffice.org/26711
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 638a5bc..c865e1c 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 203159d..27184d8 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 00334fc..3d820dc 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 7512fb0..12137a6 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 de42f1f..6e30045 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 3057db7..7e7d984 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 c5594ec..801880d 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 ce723b9..0430e4b 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();


More information about the Libreoffice-commits mailing list