[Libreoffice-commits] core.git: include/svx libreofficekit/source oox/source sd/inc sd/source sw/inc sw/source xmlscript/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Feb 22 06:42:43 UTC 2017


 include/svx/sidebar/ValueSetWithTextControl.hxx |    2 --
 libreofficekit/source/gtk/lokdocview.cxx        |    6 ++----
 libreofficekit/source/gtk/tilebuffer.hxx        |    8 ++------
 oox/source/core/xmlfilterbase.cxx               |   10 ++++------
 sd/inc/Outliner.hxx                             |    6 ------
 sd/source/ui/view/Outliner.cxx                  |    1 -
 sw/inc/unocrsr.hxx                              |   10 +---------
 sw/source/core/doc/doccorr.cxx                  |    2 +-
 sw/source/core/doc/docnew.cxx                   |    2 +-
 xmlscript/source/xml_helper/xml_impctx.cxx      |   11 +++--------
 10 files changed, 14 insertions(+), 44 deletions(-)

New commits:
commit c1877a16b38bfd74a52e39b49289d5f5572b610b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Feb 21 13:10:45 2017 +0200

    loplugin:unusedfields
    
    Change-Id: I8a114bcda99f123d230d61b0d0595bfe657cc3c0
    Reviewed-on: https://gerrit.libreoffice.org/34513
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx
index d21ccce..a8c246d 100644
--- a/include/svx/sidebar/ValueSetWithTextControl.hxx
+++ b/include/svx/sidebar/ValueSetWithTextControl.hxx
@@ -49,8 +49,6 @@ public:
 private:
     struct ValueSetWithTextItem
     {
-        Image maItemImage;
-        Image maSelectedItemImage;
         OUString maItemText;
         OUString maItemText2;
     };
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index b854473..1effc33 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -969,8 +969,7 @@ static gboolean postDocumentLoad(gpointer pData)
     // Total number of columns in this document.
     guint nColumns = ceil((double)nDocumentWidthPixels / nTileSizePixels);
 
-    priv->m_pTileBuffer = std::unique_ptr<TileBuffer>(new TileBuffer(priv->m_pDocument,
-                                                                     nColumns));
+    priv->m_pTileBuffer = std::unique_ptr<TileBuffer>(new TileBuffer(nColumns));
     gtk_widget_set_size_request(GTK_WIDGET(pLOKDocView),
                                 nDocumentWidthPixels,
                                 nDocumentHeightPixels);
@@ -3289,8 +3288,7 @@ lok_doc_view_set_zoom (LOKDocView* pDocView, float fZoom)
     // Total number of columns in this document.
     guint nColumns = ceil((double)nDocumentWidthPixels / nTileSizePixels);
 
-    priv->m_pTileBuffer = std::unique_ptr<TileBuffer>(new TileBuffer(priv->m_pDocument,
-                                                                     nColumns));
+    priv->m_pTileBuffer = std::unique_ptr<TileBuffer>(new TileBuffer(nColumns));
     gtk_widget_set_size_request(GTK_WIDGET(pDocView),
                                 nDocumentWidthPixels,
                                 nDocumentHeightPixels);
diff --git a/libreofficekit/source/gtk/tilebuffer.hxx b/libreofficekit/source/gtk/tilebuffer.hxx
index 4fab28d..498ea3f 100644
--- a/libreofficekit/source/gtk/tilebuffer.hxx
+++ b/libreofficekit/source/gtk/tilebuffer.hxx
@@ -90,10 +90,8 @@ private:
 class TileBuffer
 {
  public:
- TileBuffer(LibreOfficeKitDocument *document = nullptr,
-            int columns = 0)
-     : m_pLOKDocument(document)
-     , m_nWidth(columns)
+ TileBuffer(int columns = 0)
+     : m_nWidth(columns)
     {
         cairo_surface_t *pSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, nTileSizePixels, nTileSizePixels);
         m_DummyTile.setSurface(pSurface);
@@ -135,8 +133,6 @@ class TileBuffer
      */
     void setInvalid(int x, int y, float zoom, GTask* task, GThreadPool*);
 
-    /// Contains the reference to the LOK Document that this tile buffer is for.
-    LibreOfficeKitDocument *m_pLOKDocument;
     /// Stores all the tiles cached by this tile buffer.
     std::map<int, Tile> m_mTiles;
     /// Width of the current tile buffer (number of columns)
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 5e4ae8e..393911c 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -174,19 +174,17 @@ struct XmlFilterBaseImpl
 {
     typedef RefMap< OUString, Relations > RelationsMap;
 
-    Reference<XComponentContext>   mxContext;
     FastParser                     maFastParser;
     const OUString                 maBinSuffix;
     RelationsMap                   maRelationsMap;
     TextFieldStack                 maTextFieldStack;
-    const NamespaceMap&             mrNamespaceMap;
+    const NamespaceMap&            mrNamespaceMap;
 
     /// @throws RuntimeException
-    explicit            XmlFilterBaseImpl( const Reference< XComponentContext >& rxContext );
+    explicit            XmlFilterBaseImpl();
 };
 
-XmlFilterBaseImpl::XmlFilterBaseImpl( const Reference< XComponentContext >& rxContext ) :
-    mxContext(rxContext),
+XmlFilterBaseImpl::XmlFilterBaseImpl() :
     maBinSuffix( ".bin" ),
     mrNamespaceMap(StaticNamespaceMap::get())
 {
@@ -196,7 +194,7 @@ XmlFilterBaseImpl::XmlFilterBaseImpl( const Reference< XComponentContext >& rxCo
 
 XmlFilterBase::XmlFilterBase( const Reference< XComponentContext >& rxContext ) :
     FilterBase( rxContext ),
-    mxImpl( new XmlFilterBaseImpl( rxContext ) ),
+    mxImpl( new XmlFilterBaseImpl ),
     mnRelId( 1 ),
     mnMaxDocId( 0 ),
     mbMSO2007(false),
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index aef606b..7c7fd80 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -246,12 +246,6 @@ private:
     */
     bool mbFoundObject;
 
-    /** When set to <TRUE/> this flag indicates that an error has occurred
-        that should terminate the iteration over the objects to search/spell
-        check.
-    */
-    bool mbError;
-
     /** This flag indicates whether to search forward or backwards.
     */
     bool mbDirectionIsForward;
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 895f2bf..55f0f37 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -155,7 +155,6 @@ SdOutliner::SdOutliner( SdDrawDocument* pDoc, OutlinerMode nMode )
       mnPageCount(0),
       mbEndOfSearch(false),
       mbFoundObject(false),
-      mbError(false),
       mbDirectionIsForward(true),
       mbRestrictSearchToSelection(false),
       maMarkListCopy(),
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index f0a5ca3..9ef5204 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -25,17 +25,9 @@
 
 namespace sw
 {
-    enum class UnoCursorHintType
-    {
-        DOC_DISPOSING,
-        LEAVES_SECTION
-    };
-
     struct SW_DLLPUBLIC UnoCursorHint final : public SfxHint
     {
-        UnoCursorHintType m_eType;
-        UnoCursorHint(UnoCursorHintType eType)
-                : m_eType(eType) {};
+        UnoCursorHint() {}
         virtual ~UnoCursorHint() override;
     };
 }
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index fee4a4d..3401152 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -159,7 +159,7 @@ void PaMCorrAbs( const SwPaM& rRange,
         if (bChange && bLeaveSection)
         {
             // the UNO cursor has left its section. We need to notify it!
-            sw::UnoCursorHint aHint(sw::UnoCursorHintType::LEAVES_SECTION);
+            sw::UnoCursorHint aHint;
             pUnoCursor->m_aNotifier.Broadcast(aHint);
         }
     }
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index ac97fa5..add4c24 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -414,7 +414,7 @@ SwDoc::~SwDoc()
     getIDocumentRedlineAccess().GetRedlineTable().DeleteAndDestroyAll();
     getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteAndDestroyAll();
 
-    const sw::UnoCursorHint aHint(sw::UnoCursorHintType::DOC_DISPOSING);
+    const sw::UnoCursorHint aHint;
     cleanupUnoCursorTable();
     for(const auto& pWeakCursor : mvUnoCursorTable)
     {
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 598b2bd..a05f5df 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -320,15 +320,12 @@ class ExtendedAttributes :
     OUString * m_pQNames;
     OUString * m_pValues;
 
-    rtl::Reference<DocumentHandlerImpl> m_xHandler;
-
 public:
     inline ExtendedAttributes(
         sal_Int32 nAttributes,
         sal_Int32 * pUids,
         OUString * pLocalNames, OUString * pQNames,
-        Reference< xml::sax::XAttributeList > const & xAttributeList,
-        DocumentHandlerImpl * pHandler );
+        Reference< xml::sax::XAttributeList > const & xAttributeList );
     virtual ~ExtendedAttributes() throw () override;
 
     // XAttributes
@@ -355,14 +352,12 @@ inline ExtendedAttributes::ExtendedAttributes(
     sal_Int32 nAttributes,
     sal_Int32 * pUids,
     OUString * pLocalNames, OUString * pQNames,
-    Reference< xml::sax::XAttributeList > const & xAttributeList,
-    DocumentHandlerImpl * pHandler )
+    Reference< xml::sax::XAttributeList > const & xAttributeList )
     : m_nAttributes( nAttributes )
     , m_pUids( pUids )
     , m_pLocalNames( pLocalNames )
     , m_pQNames( pQNames )
     , m_pValues( new OUString[ nAttributes ] )
-    , m_xHandler( pHandler )
 {
     for ( sal_Int32 nPos = 0; nPos < nAttributes; ++nPos )
     {
@@ -542,7 +537,7 @@ void DocumentHandlerImpl::startElement(
     xAttributes = static_cast< xml::input::XAttributes * >(
         new ExtendedAttributes(
             nAttribs, pUids, pLocalNames, pQNames,
-            xAttribs, this ) );
+            xAttribs ) );
 
     getElementName( rQElementName, &nUid, &aLocalName );
 


More information about the Libreoffice-commits mailing list