[Libreoffice-commits] core.git: compilerplugins/clang forms/source include/package include/sot include/svtools include/tools include/ucbhelper include/vcl include/xmloff linguistic/source package/source rsc/inc rsc/source sdext/source sd/source sfx2/source slideshow/source sot/source starmath/source svl/source svtools/source toolkit/source tools/source ucbhelper/source ucb/source unotools/source uui/source vbahelper/source vcl/source xmloff/source

Noel Grandin noel at peralex.com
Tue Jun 28 11:21:47 UTC 2016


 compilerplugins/clang/singlevalfields.cxx                |   89 +++++++++++++
 compilerplugins/clang/singlevalfields.py                 |    7 +
 forms/source/xforms/xformsevent.cxx                      |    2 
 forms/source/xforms/xformsevent.hxx                      |    2 
 include/package/Inflater.hxx                             |    2 
 include/sot/object.hxx                                   |    3 
 include/svtools/tabbar.hxx                               |    1 
 include/tools/b3dtrans.hxx                               |    8 -
 include/ucbhelper/resultsetmetadata.hxx                  |    6 
 include/vcl/pdfwriter.hxx                                |    2 
 include/xmloff/XMLTextMasterPageContext.hxx              |    4 
 linguistic/source/convdicxml.hxx                         |    2 
 linguistic/source/defs.hxx                               |    8 -
 package/source/zipapi/Inflater.cxx                       |    1 
 package/source/zipapi/XUnbufferedStream.cxx              |    2 
 package/source/zipapi/XUnbufferedStream.hxx              |    2 
 rsc/inc/rscdef.hxx                                       |    1 
 rsc/inc/rsclex.hxx                                       |    3 
 rsc/source/tools/rscdef.cxx                              |    1 
 sd/source/ui/dlg/tabtempl.cxx                            |    2 
 sd/source/ui/inc/tabtempl.hxx                            |    2 
 sdext/source/presenter/PresenterSlideShowView.cxx        |    5 
 sdext/source/presenter/PresenterSlideShowView.hxx        |    1 
 sfx2/source/appl/workwin.cxx                             |    2 
 sfx2/source/inc/workwin.hxx                              |    4 
 slideshow/source/engine/shapes/drawinglayeranimation.cxx |   12 -
 sot/source/base/object.cxx                               |    1 
 sot/source/sdstor/stgole.cxx                             |    3 
 sot/source/sdstor/stgole.hxx                             |    1 
 sot/source/sdstor/storage.cxx                            |   17 --
 starmath/source/mathtype.cxx                             |    2 
 starmath/source/mathtype.hxx                             |    4 
 svl/source/misc/inethist.cxx                             |    4 
 svl/source/numbers/zforfind.cxx                          |   18 --
 svl/source/numbers/zforfind.hxx                          |    1 
 svtools/source/control/tabbar.cxx                        |    5 
 svtools/source/graphic/descriptor.cxx                    |    6 
 svtools/source/graphic/descriptor.hxx                    |    1 
 toolkit/source/helper/formpdfexport.cxx                  |    3 
 tools/source/generic/b3dtrans.cxx                        |   99 +++------------
 tools/source/generic/config.cxx                          |    2 
 ucb/source/ucp/file/filrset.cxx                          |    3 
 ucb/source/ucp/file/filrset.hxx                          |    1 
 ucb/source/ucp/ftp/ftpresultsetbase.cxx                  |    3 
 ucb/source/ucp/ftp/ftpresultsetbase.hxx                  |    1 
 ucbhelper/source/provider/resultsetmetadata.cxx          |    8 -
 unotools/source/config/moduleoptions.cxx                 |   27 ----
 uui/source/masterpasscrtdlg.cxx                          |    3 
 uui/source/masterpasscrtdlg.hxx                          |    1 
 vbahelper/source/vbahelper/vbafillformat.cxx             |    1 
 vbahelper/source/vbahelper/vbafillformat.hxx             |    1 
 vcl/source/gdi/pdfwriter_impl.cxx                        |    3 
 vcl/source/window/btndlg.cxx                             |    2 
 xmloff/source/text/XMLTextMasterPageContext.cxx          |   12 -
 54 files changed, 142 insertions(+), 265 deletions(-)

New commits:
commit 48a8d6d8434908690bc2a51d27f1051bd550c9b0
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jun 27 15:08:50 2016 +0200

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

diff --git a/compilerplugins/clang/singlevalfields.cxx b/compilerplugins/clang/singlevalfields.cxx
index 04d1046..534ed6e 100644
--- a/compilerplugins/clang/singlevalfields.cxx
+++ b/compilerplugins/clang/singlevalfields.cxx
@@ -31,7 +31,8 @@ The process goes something like this:
 Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around
 to get it to work :-)
 
- at TODO we don't spot fields that have been zero-initialised via calloc or rtl_allocateZeroMemory
+ at TODO we don't spot fields that have been zero-initialised via calloc or rtl_allocateZeroMemory or memset
+ at TODO calls to lambdas (see FIXME near CXXOperatorCallExpr)
 
 */
 
@@ -96,12 +97,15 @@ public:
     bool VisitFieldDecl( const FieldDecl* );
     bool VisitMemberExpr( const MemberExpr* );
     bool VisitCXXConstructorDecl( const CXXConstructorDecl* );
+    bool VisitImplicitCastExpr( const ImplicitCastExpr* );
+//    bool VisitUnaryExprOrTypeTraitExpr( const UnaryExprOrTypeTraitExpr* );
 private:
     void niceName(const FieldDecl*, MyFieldInfo&);
     std::string getExprValue(const Expr*);
     bool isInterestingType(const QualType&);
     const FunctionDecl* get_top_FunctionDecl_from_Stmt(const Stmt&);
     void checkCallExpr(const Stmt* child, const CallExpr* callExpr, std::string& assignValue, bool& bPotentiallyAssignedTo);
+    void markAllFields(const RecordDecl* recordDecl);
 };
 
 void SingleValFields::niceName(const FieldDecl* fieldDecl, MyFieldInfo& aInfo)
@@ -178,7 +182,82 @@ const FunctionDecl* SingleValFields::get_top_FunctionDecl_from_Stmt(const Stmt&
   return nullptr;
 }
 
+/**
+ * Check for calls to methods where a pointer to something is cast to a pointer to void.
+ * At which case it could have anything written to it.
+ */
+bool SingleValFields::VisitImplicitCastExpr( const ImplicitCastExpr* castExpr )
+{
+    QualType qt = castExpr->getType().getDesugaredType(compiler.getASTContext());
+    if (qt.isNull()) {
+        return true;
+    }
+    if ( qt.isConstQualified() || !qt->isPointerType()
+         || !qt->getAs<clang::PointerType>()->getPointeeType()->isVoidType() ) {
+        return true;
+    }
+    const Expr* subExpr = castExpr->getSubExpr();
+    qt = subExpr->getType();
+    if (!qt->isPointerType()) {
+        return true;
+    }
+    qt = qt->getPointeeType();
+    if (!qt->isRecordType()) {
+        return true;
+    }
+    const RecordDecl* recordDecl = qt->getAs<RecordType>()->getDecl();
+    markAllFields(recordDecl);
+    return true;
+}
+
+void SingleValFields::markAllFields(const RecordDecl* recordDecl)
+{
+    for(auto fieldDecl = recordDecl->field_begin();
+        fieldDecl != recordDecl->field_end(); ++fieldDecl)
+    {
+        if (isInterestingType(fieldDecl->getType())) {
+            MyFieldAssignmentInfo aInfo;
+            niceName(*fieldDecl, aInfo);
+            aInfo.value = "?";
+            assignedSet.insert(aInfo);
+        }
+        else if (fieldDecl->getType()->isRecordType()) {
+            markAllFields(fieldDecl->getType()->getAs<RecordType>()->getDecl());
+        }
+    }
+    const CXXRecordDecl* cxxRecordDecl = dyn_cast<CXXRecordDecl>(recordDecl);
+    if (!cxxRecordDecl || !cxxRecordDecl->hasDefinition()) {
+        return;
+    }
+    for (auto it = cxxRecordDecl->bases_begin(); it != cxxRecordDecl->bases_end(); ++it)
+    {
+        QualType qt = it->getType();
+        if (qt->isRecordType())
+            markAllFields(qt->getAs<RecordType>()->getDecl());
+    }
+}
 
+/**
+ * Check for usage of sizeof(T) where T is a record.
+ * Means we can't touch the size of the class by removing fields.
+ *
+ * @FIXME this could be tightened up. In some contexts e.g. "memset(p,sizeof(T),0)" we could emit a "set to zero"
+ */
+ /*
+bool SingleValFields::VisitUnaryExprOrTypeTraitExpr( const UnaryExprOrTypeTraitExpr* expr )
+{
+    if (expr->getKind() != UETT_SizeOf || !expr->isArgumentType()) {
+        return true;
+    }
+    QualType qt = expr->getArgumentType();
+    if (!qt->isRecordType()) {
+        return true;
+    }
+    const RecordDecl* recordDecl = qt->getAs<RecordType>()->getDecl();
+    markAllFields(recordDecl);
+    return true;
+}
+*/
 bool SingleValFields::VisitMemberExpr( const MemberExpr* memberExpr )
 {
     const ValueDecl* decl = memberExpr->getMemberDecl();
@@ -251,6 +330,13 @@ bool SingleValFields::VisitMemberExpr( const MemberExpr* memberExpr )
             child = parent;
             parent = parentStmt(parent);
         }
+        else if (isa<CXXOperatorCallExpr>(parent))
+        {
+            // FIXME need to handle this properly
+            assignValue = "?";
+            bPotentiallyAssignedTo = true;
+            break;
+        }
         else if (isa<CallExpr>(parent))
         {
             checkCallExpr(child, dyn_cast<CallExpr>(parent), assignValue, bPotentiallyAssignedTo);
@@ -403,7 +489,6 @@ std::string SingleValFields::getExprValue(const Expr* arg)
     if (!arg)
         return "?";
     arg = arg->IgnoreParenCasts();
-//    arg->dump();
     // workaround bug in clang
     if (isa<ParenListExpr>(arg))
         return "?";
diff --git a/compilerplugins/clang/singlevalfields.py b/compilerplugins/clang/singlevalfields.py
index 523ffa5..f4eb399 100755
--- a/compilerplugins/clang/singlevalfields.py
+++ b/compilerplugins/clang/singlevalfields.py
@@ -46,6 +46,13 @@ for fieldInfo, assignValues in fieldAssignDict.iteritems():
     # if it contains anything other than this set, ignore it
     if len(assignValues - set(["0", "1", "-1", "nullptr"])) > 0:
         continue
+    # ignore things which are locally declared but are actually redeclarations of things from 3rd party code
+    parentClass = fieldInfo[0]
+    if parentClass == "_mwmhints":
+        continue
+    # ignore things which are representations of on-disk structures
+    if parentClass in ["SEPr", "WW8Dop", ]:
+        continue
     v0 = fieldInfo[0] + " " + fieldInfo[1]
     v1 = (",".join(assignValues))
     v2 = ""
diff --git a/forms/source/xforms/xformsevent.cxx b/forms/source/xforms/xformsevent.cxx
index 7b12a23..63bcc48 100644
--- a/forms/source/xforms/xformsevent.cxx
+++ b/forms/source/xforms/xformsevent.cxx
@@ -51,7 +51,7 @@ css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL XFormsEventC
 
 css::xml::dom::events::PhaseType SAL_CALL XFormsEventConcrete::getEventPhase() throw (RuntimeException, std::exception)
 {
-    return m_phase;
+    return css::xml::dom::events::PhaseType_CAPTURING_PHASE;
 }
 
 sal_Bool SAL_CALL XFormsEventConcrete::getBubbles() throw (RuntimeException, std::exception)
diff --git a/forms/source/xforms/xformsevent.hxx b/forms/source/xforms/xformsevent.hxx
index 6e8eff8..414458c 100644
--- a/forms/source/xforms/xformsevent.hxx
+++ b/forms/source/xforms/xformsevent.hxx
@@ -36,7 +36,6 @@ class XFormsEventConcrete : public cppu::WeakImplHelper< XFormsEvent > {
 
         XFormsEventConcrete()
             : m_canceled(false)
-            , m_phase(css::xml::dom::events::PhaseType_CAPTURING_PHASE)
             , m_bubbles(false)
             , m_cancelable(false)
         {
@@ -74,7 +73,6 @@ class XFormsEventConcrete : public cppu::WeakImplHelper< XFormsEvent > {
         OUString m_eventType;
         css::uno::Reference< css::xml::dom::events::XEventTarget > m_target;
         css::uno::Reference< css::xml::dom::events::XEventTarget > m_currentTarget;
-        css::xml::dom::events::PhaseType m_phase;
         bool m_bubbles;
         bool m_cancelable;
         css::util::Time m_time;
diff --git a/include/package/Inflater.hxx b/include/package/Inflater.hxx
index ea2f73d..2abfad2 100644
--- a/include/package/Inflater.hxx
+++ b/include/package/Inflater.hxx
@@ -32,7 +32,7 @@ class DLLPUBLIC_PACKAGE Inflater
     typedef struct z_stream_s z_stream;
 
 protected:
-    bool                    bFinished, bSetParams, bNeedDict;
+    bool                    bFinished, bNeedDict;
     sal_Int32               nOffset, nLength, nLastInflateError;
     z_stream*               pStream;
     css::uno::Sequence < sal_Int8 >  sInBuffer;
diff --git a/include/sot/object.hxx b/include/sot/object.hxx
index 277f715..8991a21 100644
--- a/include/sot/object.hxx
+++ b/include/sot/object.hxx
@@ -28,7 +28,6 @@
 class SOT_DLLPUBLIC SotObject : virtual public SvRefBase
 {
     sal_uInt16  nOwnerLockCount;
-    bool        bOwner;
     bool        bInClose;         // TRUE, in DoClose
 
 protected:
@@ -38,8 +37,6 @@ protected:
 public:
                         SotObject();
 
-    bool                Owner() const { return bOwner; }
-
     sal_uInt16          GetOwnerLockCount() const { return nOwnerLockCount; }
 
     void                OwnerLock( bool bLock );
diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx
index a83d78d..74a3720 100644
--- a/include/svtools/tabbar.hxx
+++ b/include/svtools/tabbar.hxx
@@ -320,7 +320,6 @@ private:
     bool            mbFormat : 1;
     bool            mbFirstFormat : 1;
     bool            mbSizeFormat : 1;
-    bool            mbAutoMaxWidth : 1;
     bool            mbInSwitching : 1;
     bool            mbAutoEditMode : 1;
     bool            mbEditCanceled : 1;
diff --git a/include/tools/b3dtrans.hxx b/include/tools/b3dtrans.hxx
index a273dad..6dabf50 100644
--- a/include/tools/b3dtrans.hxx
+++ b/include/tools/b3dtrans.hxx
@@ -91,14 +91,8 @@ private:
     // of visible viewport area (logical coordinates)
     Rectangle             maSetBound;
 
-    // Method of keeping defined aspect ratio
-    // default: Base3DRatioGrow
-    Base3DRatio           meRatio;
-
     // Flags
     bool mbPerspective              : 1;
-    bool mbWorldToViewValid         : 1;
-    bool mbInvTransObjectToEyeValid : 1;
     bool mbObjectToDeviceValid      : 1;
     bool mbProjectionValid          : 1;
 
@@ -207,8 +201,6 @@ private:
     double                  fFocalLength;
     double                  fBankAngle;
 
-    bool                    bUseFocalLength         : 1;
-
 public:
     B3dCamera(
         const basegfx::B3DPoint& rPos = basegfx::B3DPoint(0.0, 0.0, 1.0),
diff --git a/include/ucbhelper/resultsetmetadata.hxx b/include/ucbhelper/resultsetmetadata.hxx
index 209e0da..6d27da8 100644
--- a/include/ucbhelper/resultsetmetadata.hxx
+++ b/include/ucbhelper/resultsetmetadata.hxx
@@ -51,9 +51,6 @@ namespace ucbhelper
  */
 struct ResultSetColumnData
 {
-    /** @see ResultSetMetaData::isAutoIncrement */
-    bool        isAutoIncrement;
-
     /** @see ResultSetMetaData::isCaseSensitive */
     bool        isCaseSensitive;
 
@@ -85,8 +82,7 @@ struct ResultSetColumnData
 //       may heavily depend on the behaviour of the default constructor.
 
 ResultSetColumnData::ResultSetColumnData()
-: isAutoIncrement( false ),
-  isCaseSensitive( true ),
+: isCaseSensitive( true ),
   columnDisplaySize( 16 )
 {
 }
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 5e503e3..132c07d 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -403,7 +403,6 @@ public:
     struct ListBoxWidget : public AnyWidget
     {
         bool                            DropDown;
-        bool                            Sort;
         bool                            MultiSelect;
         std::vector<OUString>      Entries;
         std::vector<sal_Int32>          SelectedEntries;
@@ -414,7 +413,6 @@ public:
         ListBoxWidget()
                 : AnyWidget( vcl::PDFWriter::ListBox ),
                   DropDown( false ),
-                  Sort( false ),
                   MultiSelect( false )
         {}
 
diff --git a/include/xmloff/XMLTextMasterPageContext.hxx b/include/xmloff/XMLTextMasterPageContext.hxx
index 562174f..25adf08 100644
--- a/include/xmloff/XMLTextMasterPageContext.hxx
+++ b/include/xmloff/XMLTextMasterPageContext.hxx
@@ -46,10 +46,6 @@ class XMLOFF_DLLPUBLIC XMLTextMasterPageContext : public SvXMLStyleContext
     bool bInsertFooterFirst;
     bool bHeaderInserted;
     bool bFooterInserted;
-    bool bHeaderLeftInserted;
-    bool bFooterLeftInserted;
-    bool bHeaderFirstInserted;
-    bool bFooterFirstInserted;
 
     SAL_DLLPRIVATE css::uno::Reference< css::style::XStyle > Create();
 protected:
diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx
index c96c4a8..f20599a 100644
--- a/linguistic/source/convdicxml.hxx
+++ b/linguistic/source/convdicxml.hxx
@@ -77,7 +77,6 @@ class ConvDicXMLImport : public SvXMLImport
 
     sal_Int16       nLanguage;          // language of the dictionary
     sal_Int16       nConversionType;    // conversion type the dictionary is used for
-    bool        bSuccess;
 
 public:
 
@@ -88,7 +87,6 @@ public:
     {
         nLanguage       = LANGUAGE_NONE;
         nConversionType = -1;
-        bSuccess        = false;
     }
 
     virtual ~ConvDicXMLImport() throw ()
diff --git a/linguistic/source/defs.hxx b/linguistic/source/defs.hxx
index f356a49..96c6ee7 100644
--- a/linguistic/source/defs.hxx
+++ b/linguistic/source/defs.hxx
@@ -36,17 +36,15 @@ struct LangSvcEntries
     css::uno::Sequence< OUString >   aSvcImplNames;
 
     sal_Int16   nLastTriedSvcIndex;
-    bool        bAlreadyWarned;
-    bool        bDoWarnAgain;
 
     explicit LangSvcEntries( const css::uno::Sequence< OUString > &rSvcImplNames ) :
         aSvcImplNames(rSvcImplNames),
-        nLastTriedSvcIndex(-1), bAlreadyWarned(false), bDoWarnAgain(false)
+        nLastTriedSvcIndex(-1)
     {
     }
 
     explicit LangSvcEntries( const OUString &rSvcImplName ) :
-        nLastTriedSvcIndex(-1), bAlreadyWarned(false), bDoWarnAgain(false)
+        nLastTriedSvcIndex(-1)
     {
         aSvcImplNames.realloc(1);
         aSvcImplNames[0] = rSvcImplName;
@@ -56,8 +54,6 @@ struct LangSvcEntries
     {
         aSvcImplNames.realloc(0);
         nLastTriedSvcIndex  = -1;
-        bAlreadyWarned      = false;
-        bDoWarnAgain        = false;
     }
 };
 
diff --git a/package/source/zipapi/Inflater.cxx b/package/source/zipapi/Inflater.cxx
index d99d8cb..eb6cc73 100644
--- a/package/source/zipapi/Inflater.cxx
+++ b/package/source/zipapi/Inflater.cxx
@@ -28,7 +28,6 @@ using namespace ZipUtils;
 
 Inflater::Inflater(bool bNoWrap)
 : bFinished(false),
-  bSetParams(false),
   bNeedDict(false),
   nOffset(0),
   nLength(0),
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx
index 7a52b34..f10835c 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -56,7 +56,6 @@ XUnbufferedStream::XUnbufferedStream(
 , maInflater ( true )
 , mbRawStream ( nStreamMode == UNBUFF_STREAM_RAW || nStreamMode == UNBUFF_STREAM_WRAPPEDRAW )
 , mbWrappedRaw ( nStreamMode == UNBUFF_STREAM_WRAPPEDRAW )
-, mbFinished ( false )
 , mnHeaderToRead ( 0 )
 , mnZipCurrent ( 0 )
 , mnZipEnd ( 0 )
@@ -118,7 +117,6 @@ XUnbufferedStream::XUnbufferedStream(
 , maInflater ( true )
 , mbRawStream ( false )
 , mbWrappedRaw ( false )
-, mbFinished ( false )
 , mnHeaderToRead ( 0 )
 , mnZipCurrent ( 0 )
 , mnZipEnd ( 0 )
diff --git a/package/source/zipapi/XUnbufferedStream.hxx b/package/source/zipapi/XUnbufferedStream.hxx
index 26167e2..60358e7 100644
--- a/package/source/zipapi/XUnbufferedStream.hxx
+++ b/package/source/zipapi/XUnbufferedStream.hxx
@@ -56,7 +56,7 @@ protected:
     sal_Int32 mnBlockSize;
     css::uno::Reference< css::xml::crypto::XCipherContext > m_xCipherContext;
     ZipUtils::Inflater maInflater;
-    bool mbRawStream, mbWrappedRaw, mbFinished;
+    bool mbRawStream, mbWrappedRaw;
     sal_Int16 mnHeaderToRead;
     sal_Int64 mnZipCurrent, mnZipEnd, mnZipSize, mnMyCurrent;
     CRC32 maCRC;
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index 874c03a..88d0a26 100644
--- a/rsc/inc/rscdef.hxx
+++ b/rsc/inc/rscdef.hxx
@@ -204,7 +204,6 @@ friend class RscFileTab;
 public:
     bool            bLoaded;    // whether the file is loaded
     bool            bScanned;   // whether the file searches for include
-    bool            bDirty;     // dirty-flag
     OString         aFileName;  // file name
     OString         aPathName;  // file path and name
     RscDefineList   aDefLst;    // list of defines
diff --git a/rsc/inc/rsclex.hxx b/rsc/inc/rsclex.hxx
index f3406f7..690b67a 100644
--- a/rsc/inc/rsclex.hxx
+++ b/rsc/inc/rsclex.hxx
@@ -59,8 +59,7 @@ struct Node
 {
     Node*   pPrev;
     RSCINST aInst;
-    sal_uInt32  nTupelRec;  // Rekursionstiefe fuer Tupel
-    Node() { pPrev = nullptr; nTupelRec = 0; }
+    Node() { pPrev = nullptr; }
 };
 
 class ObjectStack
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index baf90d2..e7f5f44 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -353,7 +353,6 @@ RscFile::RscFile()
 {
     bLoaded  = false;
     bIncFile = false;
-    bDirty   = false;
     bScanned = false;
 }
 
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
index 5b6ca34..b7e119b 100644
--- a/sd/source/ui/dlg/tabtempl.cxx
+++ b/sd/source/ui/dlg/tabtempl.cxx
@@ -98,8 +98,6 @@ SdTabTemplateDlg::SdTabTemplateDlg( vcl::Window* pParent,
         m_nAsianTypoId = AddTabPage("asiantypo", RID_SVXPAGE_PARA_ASIAN);
     else
         RemoveTabPage("asiantypo");
-
-    nBitmapListState = ChangeType::NONE;
 }
 
 void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
diff --git a/sd/source/ui/inc/tabtempl.hxx b/sd/source/ui/inc/tabtempl.hxx
index d1ea3b4..88b84cb 100644
--- a/sd/source/ui/inc/tabtempl.hxx
+++ b/sd/source/ui/inc/tabtempl.hxx
@@ -42,8 +42,6 @@ private:
     XDashListRef          pDashList;
     XLineEndListRef       pLineEndList;
 
-    ChangeType          nBitmapListState;
-
     sal_uInt16 m_nLineId;
     sal_uInt16 m_nAreaId;
     sal_uInt16 m_nShadowId;
diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx
index 65dae40..60af7c9 100644
--- a/sdext/source/presenter/PresenterSlideShowView.cxx
+++ b/sdext/source/presenter/PresenterSlideShowView.cxx
@@ -75,7 +75,6 @@ PresenterSlideShowView::PresenterSlideShowView (
       mnPageAspectRatio(28.0/21.0),
       maBroadcaster(m_aMutex),
       mpBackground(),
-      mbIsInModifyNotification(false),
       mbIsForcedPaintPending(false),
       mbIsPaintPending(true),
       msClickToExitPresentationText(),
@@ -362,13 +361,13 @@ geometry::AffineMatrix2D SAL_CALL PresenterSlideShowView::getTransformation()
         // optimizations the avoid updates when the transformation is
         // unchanged (when the window size changes then due to the constant
         // aspect ratio the size of the preview may remain the same while
-        // the position changes.  The position, however, is rapresented by
+        // the position changes.  The position, however, is represented by
         // the position of the view window.  This transformation is given
         // relative to the view window and therefore does not contain the
         // position.)
         const awt::Rectangle aWindowBox = mxViewWindow->getPosSize();
         return geometry::AffineMatrix2D(
-            aWindowBox.Width-1, 0, (mbIsInModifyNotification ? 1 : 0),
+            aWindowBox.Width-1, 0, 0,
             0, aWindowBox.Height-1, 0);
     }
     else
diff --git a/sdext/source/presenter/PresenterSlideShowView.hxx b/sdext/source/presenter/PresenterSlideShowView.hxx
index e30e2d9..bfd5473 100644
--- a/sdext/source/presenter/PresenterSlideShowView.hxx
+++ b/sdext/source/presenter/PresenterSlideShowView.hxx
@@ -235,7 +235,6 @@ private:
 
     SharedBitmapDescriptor mpBackground;
 
-    bool mbIsInModifyNotification;
     bool mbIsForcedPaintPending;
     bool mbIsPaintPending;
     OUString msClickToExitPresentationText;
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 0b7711b..51a4379 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1493,7 +1493,7 @@ void SfxWorkWindow::UpdateStatusBar_Impl()
     // No status bar, if no ID is required or when in FullScreenView or
     // if disabled
     if ( aStatBar.nId && IsDockingAllowed() && bInternalDockingAllowed && bShowStatusBar &&
-         aStatBar.bOn && !bIsFullScreen )
+         !bIsFullScreen )
     {
         // Id has changed, thus create a suitable Statusbarmanager, this takes
         // over the  current status bar;
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index d9a68d6..b5826a4 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -67,11 +67,9 @@ struct SfxObjectBar_Impl
 struct SfxStatBar_Impl
 {
     sal_uInt16              nId;
-    bool                    bOn;
 
     SfxStatBar_Impl() :
-        nId(0),
-        bOn(true)
+        nId(0)
     {}
 };
 
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
index 4b1f03b..3fa51f5 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
@@ -222,9 +222,6 @@ private:
     // Flag to remember if this is a simple scrolling text
     bool                                        mbScrollIn;
 
-    // start time for this animation
-    sal_uInt32                                  mnStartTime;
-
     // The AnimationDirection
     drawing::TextAnimationDirection             meDirection;
 
@@ -421,14 +418,6 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
             fOneRelative = 1.0;
         }
 
-        if(mnStartTime)
-        {
-            // Start time loop
-            ScrollTextAnimNode aStartNode(
-                mnStartTime, 1L, 0.0, 0.0, mnStartTime, false);
-            maVector.push_back(aStartNode);
-        }
-
         if(IsVisibleWhenStarted())
         {
             double fRelativeStartValue, fRelativeEndValue,fRelativeDistance;
@@ -751,7 +740,6 @@ ActivityImpl::ActivityImpl(
       meAnimKind(drawing::TextAnimationKind_NONE),
       mbVisibleWhenStopped(false),
       mbVisibleWhenStarted(false),
-      mnStartTime(0L),
       mnStepWidth(0)
 {
     // get doctreenode:
diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx
index 79a139a..5db6665 100644
--- a/sot/source/base/object.cxx
+++ b/sot/source/base/object.cxx
@@ -21,7 +21,6 @@
 
 SotObject::SotObject()
     : nOwnerLockCount( 0 )
-    , bOwner      ( true )
     , bInClose    ( false )
 {
 }
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 96769c9..4814704 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -166,7 +166,6 @@ bool StgCompObjStream::Store()
 StgOleStream::StgOleStream( BaseStorage& rStg, bool bWr )
     : StgInternalStream( rStg, OUString("\1Ole"), bWr )
 {
-    m_nFlags = 0;
 }
 
 bool StgOleStream::Store()
@@ -176,7 +175,7 @@ bool StgOleStream::Store()
 
     Seek( 0L );
     WriteInt32( 0x02000001 );         // OLE version, format
-    WriteInt32( m_nFlags );             // Object flags
+    WriteInt32( 0 );             // Object flags
     WriteInt32( 0 );                  // Update Options
     WriteInt32( 0 );                  // reserved
     WriteInt32( 0 );                 // Moniker 1
diff --git a/sot/source/sdstor/stgole.hxx b/sot/source/sdstor/stgole.hxx
index 723e3d7..cd8ff38 100644
--- a/sot/source/sdstor/stgole.hxx
+++ b/sot/source/sdstor/stgole.hxx
@@ -58,7 +58,6 @@ public:
 
 class StgOleStream : public StgInternalStream
 {
-    sal_uInt32 m_nFlags;
 public:
     StgOleStream( BaseStorage&, bool );
     bool Store();
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index b332911..6ff2bf8 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -516,7 +516,6 @@ const OUString & SotStorage::GetName() const
 {
     if( m_aName.isEmpty() )
     {
-        DBG_ASSERT( Owner(), "must be owner" );
         if( m_pOwnStg )
             const_cast<SotStorage *>(this)->m_aName = m_pOwnStg->GetName();
     }
@@ -527,7 +526,6 @@ void SotStorage::SetClass( const SvGlobalName & rName,
                            SotClipboardFormatId nOriginalClipFormat,
                            const OUString & rUserTypeName )
 {
-    DBG_ASSERT( Owner(), "must be owner" );
     if( m_pOwnStg )
         m_pOwnStg->SetClass( rName, nOriginalClipFormat, rUserTypeName );
     else
@@ -537,7 +535,6 @@ void SotStorage::SetClass( const SvGlobalName & rName,
 SvGlobalName SotStorage::GetClassName()
 {
     SvGlobalName aGN;
-    DBG_ASSERT( Owner(), "must be owner" );
     if( m_pOwnStg )
         aGN = m_pOwnStg->GetClassName();
     else
@@ -548,7 +545,6 @@ SvGlobalName SotStorage::GetClassName()
 SotClipboardFormatId SotStorage::GetFormat()
 {
     SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;
-    DBG_ASSERT( Owner(), "must be owner" );
     if( m_pOwnStg )
         nFormat = m_pOwnStg->GetFormat();
     else
@@ -559,7 +555,6 @@ SotClipboardFormatId SotStorage::GetFormat()
 OUString SotStorage::GetUserName()
 {
     OUString aName;
-    DBG_ASSERT( Owner(), "must be owner" );
     if( m_pOwnStg )
         aName = m_pOwnStg->GetUserName();
     else
@@ -569,15 +564,12 @@ OUString SotStorage::GetUserName()
 
 void SotStorage::FillInfoList( SvStorageInfoList * pFillList ) const
 {
-    DBG_ASSERT( Owner(), "must be owner" );
     if( m_pOwnStg )
         m_pOwnStg->FillInfoList( pFillList );
 }
 
 bool SotStorage::CopyTo( SotStorage * pDestStg )
 {
-    DBG_ASSERT( Owner(), "must be owner" );
-    DBG_ASSERT( pDestStg->Owner(), "must be owner" );
     if( m_pOwnStg && pDestStg->m_pOwnStg )
     {
         m_pOwnStg->CopyTo( pDestStg->m_pOwnStg );
@@ -593,7 +585,6 @@ bool SotStorage::CopyTo( SotStorage * pDestStg )
 
 bool SotStorage::Commit()
 {
-    DBG_ASSERT( Owner(), "must be owner" );
     if( m_pOwnStg )
     {
         if( !m_pOwnStg->Commit() )
@@ -609,7 +600,6 @@ SotStorageStream * SotStorage::OpenSotStream( const OUString & rEleName,
                                               StreamMode nMode )
 {
     SotStorageStream * pStm = nullptr;
-    DBG_ASSERT( Owner(), "must be owner" );
     if( m_pOwnStg )
     {
         // volle Ole-Patches einschalten
@@ -634,7 +624,6 @@ SotStorage * SotStorage::OpenSotStorage( const OUString & rEleName,
                                          StreamMode nMode,
                                          bool transacted )
 {
-    DBG_ASSERT( Owner(), "must be owner" );
     if( m_pOwnStg )
     {
         nMode |= StreamMode::SHARE_DENYALL;
@@ -657,7 +646,6 @@ SotStorage * SotStorage::OpenSotStorage( const OUString & rEleName,
 
 bool SotStorage::IsStorage( const OUString & rEleName ) const
 {
-    DBG_ASSERT( Owner(), "must be owner" );
     // ein bisschen schneller
     if( m_pOwnStg )
         return m_pOwnStg->IsStorage( rEleName );
@@ -667,7 +655,6 @@ bool SotStorage::IsStorage( const OUString & rEleName ) const
 
 bool SotStorage::IsStream( const OUString & rEleName ) const
 {
-    DBG_ASSERT( Owner(), "must be owner" );
     // ein bisschen schneller
     if( m_pOwnStg )
         return m_pOwnStg->IsStream( rEleName );
@@ -677,7 +664,6 @@ bool SotStorage::IsStream( const OUString & rEleName ) const
 
 bool SotStorage::IsContained( const OUString & rEleName ) const
 {
-    DBG_ASSERT( Owner(), "must be owner" );
     // ein bisschen schneller
     if( m_pOwnStg )
         return m_pOwnStg->IsContained( rEleName );
@@ -687,7 +673,6 @@ bool SotStorage::IsContained( const OUString & rEleName ) const
 
 bool SotStorage::Remove( const OUString & rEleName )
 {
-    DBG_ASSERT( Owner(), "must be owner" );
     if( m_pOwnStg )
     {
         m_pOwnStg->Remove( rEleName );
@@ -702,8 +687,6 @@ bool SotStorage::Remove( const OUString & rEleName )
 bool SotStorage::CopyTo( const OUString & rEleName,
                          SotStorage * pNewSt, const OUString & rNewName )
 {
-    DBG_ASSERT( Owner(), "must be owner" );
-    DBG_ASSERT( pNewSt->Owner(), "must be owner" );
     if( m_pOwnStg )
     {
         m_pOwnStg->CopyTo( rEleName, pNewSt->m_pOwnStg, rNewName );
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index a8add3b..82a5bc8 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -672,7 +672,7 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector,
          so this special case must be handled in the
          character handler case 2:
          */
-        if ((nRecord == CHAR) && (!bIsSilent) && (!bOpenString))
+        if ((nRecord == CHAR) && (!bOpenString))
         {
             bOpenString=true;
             nTextStart = rRet.getLength();
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index 49f8b0c..a47b43e 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -72,7 +72,6 @@ public:
         , nCurSize(0)
         , nLastSize(0)
         , nSpec(0)
-        , bIsSilent(false)
         , bIsReInterpBrace(false)
         , nPostSup(0)
         , nPostlSup(0)
@@ -100,7 +99,6 @@ public:
         , nCurSize(0)
         , nLastSize(0)
         , nSpec(0)
-        , bIsSilent(false)
         , bIsReInterpBrace(false)
         , nPostSup(0)
         , nPostlSup(0)
@@ -180,7 +178,7 @@ private:
     sal_Int16 nCurSize;
     sal_Int16 nLastSize;
     sal_uInt8 nSpec;
-    bool  bIsSilent, bIsReInterpBrace;
+    bool  bIsReInterpBrace;
     OUString  sPost;
     sal_Int32 nPostSup;
     sal_Int32 nPostlSup;
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 8db4ac9..4fe327f 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -48,7 +48,6 @@ class INetURLHistory_Impl
         */
         sal_uInt32 m_nMagic;
         sal_uInt16 m_nNext;
-        sal_uInt16 m_nMBZ;
 
         /** Initialization.
         */
@@ -56,7 +55,6 @@ class INetURLHistory_Impl
         {
             m_nMagic = INETHIST_MAGIC_HEAD;
             m_nNext  = 0;
-            m_nMBZ   = 0;
         }
     };
 
@@ -66,7 +64,6 @@ class INetURLHistory_Impl
         */
         sal_uInt32 m_nHash;
         sal_uInt16 m_nLru;
-        sal_uInt16 m_nMBZ;
 
         /** Initialization.
         */
@@ -74,7 +71,6 @@ class INetURLHistory_Impl
         {
             m_nHash = 0;
             m_nLru  = nLru;
-            m_nMBZ  = 0;
         }
 
         /** Comparison.
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index b2ad644..e446d73 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -127,7 +127,6 @@ void ImpSvNumberInputScan::Reset()
     nStringScanSign = 0;
     nMatchedAllStrings = nMatchedVirgin;
     nMayBeIso8601 = 0;
-    nTimezonePos = 0;
     nMayBeMonthDate = 0;
     nAcceptedDatePattern = -2;
     nDatePatternStart = 0;
@@ -919,23 +918,6 @@ bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber,
     double fSecond100 = 0.0;
     sal_uInt16 nStartIndex = nIndex;
 
-    if (nTimezonePos)
-    {
-        // find first timezone number index and adjust count
-        for (sal_uInt16 j=0; j<nAnzNums; ++j)
-        {
-            if (nNums[j] == nTimezonePos)
-            {
-                // nAnz is not total count, but count of time relevant strings.
-                if (nStartIndex < j && j - nStartIndex < nAnz)
-                {
-                    nAnz = j - nStartIndex;
-                }
-                break;  // for
-            }
-        }
-    }
-
     if (nDecPos == 2 && (nAnz == 3 || nAnz == 2)) // 20:45.5 or 45.5
     {
         nHour = 0;
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx
index 5d940a3..7cabce7 100644
--- a/svl/source/numbers/zforfind.hxx
+++ b/svl/source/numbers/zforfind.hxx
@@ -128,7 +128,6 @@ private:
                                                 // default 18
                                                 // number <= nYear2000 => 20xx
                                                 // number >  nYear2000 => 19xx
-    sal_uInt16  nTimezonePos;                   // Index of timezone separator (+1)
 
     /** State of ISO 8601 detection.
 
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 64abad5..0662e06 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -559,7 +559,6 @@ void TabBar::ImplInit( WinBits nWinStyle )
     mbFormat        = true;
     mbFirstFormat   = true;
     mbSizeFormat    = true;
-    mbAutoMaxWidth  = true;
     mbInSwitching   = false;
     mbAutoEditMode  = false;
     mbEditCanceled  = false;
@@ -688,14 +687,12 @@ bool TabBar::ImplCalcWidth()
 
     if (mnMaxPageWidth)
         mnCurMaxWidth = mnMaxPageWidth;
-    else if (mbAutoMaxWidth)
+    else
     {
         mnCurMaxWidth = mnLastOffX - mnOffX;
         if (mnCurMaxWidth < 1)
             mnCurMaxWidth = 1;
     }
-    else
-        mnCurMaxWidth = 0;
 
     bool bChanged = false;
     for (ImplTabBarItem* pItem : mpImpl->mpItemList)
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx
index f4d268c..1cec884 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -59,8 +59,7 @@ GraphicDescriptor::GraphicDescriptor() :
     mpGraphic( nullptr ),
     meType( GraphicType::NONE ),
     mnBitsPerPixel ( 0 ),
-    mbTransparent ( false ),
-    mbAlpha( false )
+    mbTransparent ( false )
 {
 }
 
@@ -149,7 +148,6 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL )
             maSize100thMM = aDescriptor.GetSize_100TH_MM();
             mnBitsPerPixel = aDescriptor.GetBitsPerPixel();
             mbTransparent = ( graphic::GraphicType::VECTOR == cType );
-            mbAlpha = false;
         }
     }
 }
@@ -418,7 +416,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
 
             case UnoGraphicProperty::Alpha:
             {
-                *pValues <<= mpGraphic ? mpGraphic->IsAlpha() : mbAlpha;
+                *pValues <<= mpGraphic && mpGraphic->IsAlpha();
             }
             break;
 
diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx
index 026bd4a..998d026 100644
--- a/svtools/source/graphic/descriptor.hxx
+++ b/svtools/source/graphic/descriptor.hxx
@@ -109,7 +109,6 @@ private:
     Size                    maSize100thMM;
     sal_uInt16              mnBitsPerPixel;
     bool                    mbTransparent;
-    bool                    mbAlpha;
 
     GraphicDescriptor( const GraphicDescriptor& rDescriptor ) = delete;
 
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index 7ea9de7..00ea42d 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -563,9 +563,6 @@ namespace toolkitform
 
                 // entries
                 getStringItemVector( xModelProps, pListWidget->Entries );
-                // since we explicitly list the entries in the order in which they appear, they should not be
-                // resorted by the PDF viewer
-                pListWidget->Sort = false;
 
                 // get selected items
                 Sequence< sal_Int16 > aSelectIndices;
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx
index f4a0920..3d0d977 100644
--- a/tools/source/generic/b3dtrans.cxx
+++ b/tools/source/generic/b3dtrans.cxx
@@ -145,7 +145,6 @@ void B3dTransformationSet::Reset()
     mfNearBound = 0.001;
     mfFarBound = 1.001;
 
-    meRatio = Base3DRatioGrow;
     mfRatio = 0.0;
 
     maViewportRectangle = Rectangle(-1, -1, 2, 2);
@@ -155,7 +154,6 @@ void B3dTransformationSet::Reset()
 
     mbProjectionValid = false;
     mbObjectToDeviceValid = false;
-    mbWorldToViewValid = false;
 
     CalcViewport();
 }
@@ -173,9 +171,7 @@ void B3dTransformationSet::SetOrientation(const basegfx::B3DPoint& rVRP, const b
     maOrientation.identity();
     Orientation(maOrientation, rVRP, rVPN, rVUP);
 
-    mbInvTransObjectToEyeValid = false;
     mbObjectToDeviceValid = false;
-    mbWorldToViewValid = false;
 
     PostSetOrientation();
 }
@@ -209,7 +205,6 @@ void B3dTransformationSet::PostSetProjection()
 
     // invalidate dependent matrices
     mbObjectToDeviceValid = false;
-    mbWorldToViewValid = false;
 }
 
 /// Transformations for viewport
@@ -234,57 +229,20 @@ void B3dTransformationSet::CalcViewport()
             fActRatio = fBoundHeight / fBoundWidth;
         // FIXME   else in this case has a lot of problems,  should this return.
 
-        switch(meRatio)
+        // scale down larger part
+        if(fActRatio > mfRatio)
         {
-            case Base3DRatioShrink :
-            {
-                // Dilate smaller part
-                if(fActRatio > mfRatio)
-                {
-                    // enlarge X
-                    fFactor = 1.0 / fActRatio;
-                    fRight  *= fFactor;
-                    fLeft *= fFactor;
-                }
-                else
-                {
-                    // enlarge Y
-                    fFactor = fActRatio;
-                    fTop *= fFactor;
-                    fBottom *= fFactor;
-                }
-                break;
-            }
-            case Base3DRatioGrow :
-            {
-                // scale down larger part
-                if(fActRatio > mfRatio)
-                {
-                    // scale down Y
-                    fFactor = fActRatio;
-                    fTop *= fFactor;
-                    fBottom *= fFactor;
-                }
-                else
-                {
-                    // scale down X
-                    fFactor = 1.0 / fActRatio;
-                    fRight  *= fFactor;
-                    fLeft *= fFactor;
-                }
-                break;
-            }
-            case Base3DRatioMiddle :
-            {
-                // averaging
-                fFactor = ((1.0 / fActRatio) + 1.0) / 2.0;
-                fRight *= fFactor;
-                fLeft *= fFactor;
-                fFactor = (fActRatio + 1.0) / 2.0;
-                fTop *= fFactor;
-                fBottom *= fFactor;
-                break;
-            }
+            // scale down Y
+            fFactor = fActRatio;
+            fTop *= fFactor;
+            fBottom *= fFactor;
+        }
+        else
+        {
+            // scale down X
+            fFactor = 1.0 / fActRatio;
+            fRight  *= fFactor;
+            fLeft *= fFactor;
         }
     }
 
@@ -335,7 +293,6 @@ void B3dTransformationSet::SetRatio(double fNew)
         mfRatio = fNew;
         mbProjectionValid = false;
         mbObjectToDeviceValid = false;
-        mbWorldToViewValid = false;
     }
 }
 
@@ -350,7 +307,6 @@ void B3dTransformationSet::SetDeviceRectangle(double fL, double fR, double fB, d
 
         mbProjectionValid = false;
         mbObjectToDeviceValid = false;
-        mbWorldToViewValid = false;
 
         // Broadcast changes
         DeviceRectangleChange();
@@ -368,7 +324,6 @@ void B3dTransformationSet::SetPerspective(bool bNew)
         mbPerspective = bNew;
         mbProjectionValid = false;
         mbObjectToDeviceValid = false;
-        mbWorldToViewValid = false;
     }
 }
 
@@ -381,7 +336,6 @@ void B3dTransformationSet::SetViewportRectangle(Rectangle& rRect, Rectangle& rVi
 
         mbProjectionValid = false;
         mbObjectToDeviceValid = false;
-        mbWorldToViewValid = false;
     }
 }
 
@@ -448,8 +402,7 @@ B3dCamera::B3dCamera(
     aCorrectedPosition(rPos),
     aLookAt(rLkAt),
     fFocalLength(fFocLen),
-    fBankAngle(fBnkAng),
-    bUseFocalLength(false)
+    fBankAngle(fBnkAng)
 {
     CalcNewViewportValues();
 }
@@ -506,23 +459,13 @@ bool B3dCamera::CalcFocalLength()
     double fWidth = GetDeviceRectangleWidth();
     bool bRetval = false;
 
-    if(bUseFocalLength)
-    {
-        // Update position if focal length changes
-        aCorrectedPosition = basegfx::B3DPoint(0.0, 0.0, fFocalLength * fWidth / 35.0);
-        aCorrectedPosition = EyeToWorldCoor(aCorrectedPosition);
-        bRetval = true;
-    }
-    else
-    {
-        // Adjust focal length based on given position
-        basegfx::B3DPoint aOldPosition;
-        aOldPosition = WorldToEyeCoor(aOldPosition);
-        if(fWidth != 0.0)
-            fFocalLength = aOldPosition.getZ() / fWidth * 35.0;
-        if(fFocalLength < 5.0)
-            fFocalLength = 5.0;
-    }
+    // Adjust focal length based on given position
+    basegfx::B3DPoint aOldPosition;
+    aOldPosition = WorldToEyeCoor(aOldPosition);
+    if(fWidth != 0.0)
+        fFocalLength = aOldPosition.getZ() / fWidth * 35.0;
+    if(fFocalLength < 5.0)
+        fFocalLength = 5.0;
     return bRetval;
 }
 
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 621a545..ab7c623 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -57,7 +57,6 @@ struct ImplConfigData
     sal_uIntPtr     mnDataUpdateId;
     sal_uIntPtr     mnTimeStamp;
     LineEnd         meLineEnd;
-    sal_uInt16      mnRefCount;
     bool            mbModified;
     bool            mbRead;
     bool            mbIsUTF8BOM;
@@ -588,7 +587,6 @@ static ImplConfigData* ImplGetConfigData( const OUString& rFileName )
     pData->mpFirstGroup     = nullptr;
     pData->mnDataUpdateId   = 0;
     pData->meLineEnd        = LINEEND_CRLF;
-    pData->mnRefCount       = 0;
     pData->mbRead           = false;
     pData->mbIsUTF8BOM      = false;
     ImplReadConfig( pData );
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index f274bc5..2022e9a 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -58,7 +58,6 @@ XResultSet_impl::XResultSet_impl( shell* pMyShell,
     , m_pDisposeEventListeners( nullptr )
     , m_pRowCountListeners( nullptr )
     , m_pIsFinalListeners( nullptr )
-    , m_bStatic( false )
     , m_nErrorCode( TASKHANDLER_NO_ERROR )
     , m_nMinorErrorCode( TASKHANDLER_NO_ERROR )
 {
@@ -611,8 +610,6 @@ XResultSet_impl::connectToCache(
 {
     if( m_xListener.is() )
         throw ucb::ListenerAlreadySetException( THROW_WHERE );
-    if( m_bStatic )
-        throw ucb::ListenerAlreadySetException( THROW_WHERE );
 
     uno::Reference< ucb::XSourceInitialization > xTarget(
         xCache, uno::UNO_QUERY );
diff --git a/ucb/source/ucp/file/filrset.hxx b/ucb/source/ucp/file/filrset.hxx
index b047fa9..5ebf86d 100644
--- a/ucb/source/ucp/file/filrset.hxx
+++ b/ucb/source/ucp/file/filrset.hxx
@@ -564,7 +564,6 @@ class XResultSet_impl : public Notifier,
         comphelper::OInterfaceContainerHelper2*   m_pIsFinalListeners;
 
         css::uno::Reference< css::ucb::XDynamicResultSetListener >       m_xListener;
-        bool                            m_bStatic;
 
         sal_Int32                                          m_nErrorCode;
         sal_Int32                                          m_nMinorErrorCode;
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
index 87164d9..062ef47 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
@@ -38,7 +38,6 @@ ResultSetBase::ResultSetBase(
       m_xProvider( xProvider ),
       m_nRow( -1 ),
       m_nWasNull( true ),
-      m_bRowCountFinal( true ),
       m_sProperty( seq ),
       m_pDisposeEventListeners( nullptr ),
       m_pRowCountListeners( nullptr ),
@@ -502,7 +501,7 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue(
 {
     if( PropertyName == "IsRowCountFinal" )
     {
-        return uno::Any(m_bRowCountFinal);
+        return uno::Any(true);
     }
     else if ( PropertyName == "RowCount" )
     {
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.hxx b/ucb/source/ucp/ftp/ftpresultsetbase.hxx
index 544f7dd..426e649 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.hxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.hxx
@@ -495,7 +495,6 @@ namespace ftp {
                                             m_xProvider;
         sal_Int32                           m_nRow;
         bool                                m_nWasNull;
-        bool                                m_bRowCountFinal;
 
         typedef std::vector< css::uno::Reference<css::ucb::XContentIdentifier > >
                                             IdentSet;
diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx
index 0b84e84..5a6d651 100644
--- a/ucbhelper/source/provider/resultsetmetadata.cxx
+++ b/ucbhelper/source/provider/resultsetmetadata.cxx
@@ -151,18 +151,14 @@ sal_Int32 SAL_CALL ResultSetMetaData::getColumnCount()
 
 
 // virtual
-sal_Bool SAL_CALL ResultSetMetaData::isAutoIncrement( sal_Int32 column )
+sal_Bool SAL_CALL ResultSetMetaData::isAutoIncrement( sal_Int32 /*column*/ )
     throw( SQLException, RuntimeException, std::exception )
 {
     /*
         Checks whether column is automatically numbered, which makes it
         read-only.
      */
-
-    if ( ( column < 1 ) || ( column > m_aProps.getLength() ) )
-        return false;
-
-    return m_pImpl->m_aColumnData[ column - 1 ].isAutoIncrement;
+    return false;
 }
 
 
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index fa9d97d..a07e472 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -112,10 +112,7 @@ struct FactoryInfo
             sDefaultFilter.clear();
             nIcon                       = 0;
             bChangedTemplateFile        = false;
-            bChangedWindowAttributes    = false;
-            bChangedEmptyDocumentURL    = false;
             bChangedDefaultFilter       = false;
-            bChangedIcon                = false;
             bDefaultFilterReadonly      = false;
         }
 
@@ -147,37 +144,16 @@ struct FactoryInfo
 
                 ++nRealyChanged;
             }
-            if( bChangedWindowAttributes )
-            {
-                lProperties[nRealyChanged].Name    = sNodeBase + PROPERTYNAME_WINDOWATTRIBUTES;
-                lProperties[nRealyChanged].Value <<= sWindowAttributes;
-                ++nRealyChanged;
-            }
-            if( bChangedEmptyDocumentURL )
-            {
-                lProperties[nRealyChanged].Name    = sNodeBase + PROPERTYNAME_EMPTYDOCUMENTURL;
-                lProperties[nRealyChanged].Value <<= sEmptyDocumentURL;
-                ++nRealyChanged;
-            }
             if( bChangedDefaultFilter )
             {
                 lProperties[nRealyChanged].Name    = sNodeBase + PROPERTYNAME_DEFAULTFILTER;
                 lProperties[nRealyChanged].Value <<= sDefaultFilter;
                 ++nRealyChanged;
             }
-            if( bChangedIcon )
-            {
-                lProperties[nRealyChanged].Name    = sNodeBase + PROPERTYNAME_ICON;
-                lProperties[nRealyChanged].Value <<= nIcon;
-                ++nRealyChanged;
-            }
 
             // Don't forget to reset changed flags! Otherwise we save it again and again and ...
             bChangedTemplateFile        = false;
-            bChangedWindowAttributes    = false;
-            bChangedEmptyDocumentURL    = false;
             bChangedDefaultFilter       = false;
-            bChangedIcon                = false;
 
             lProperties.realloc( nRealyChanged );
             return lProperties;
@@ -254,10 +230,7 @@ struct FactoryInfo
         sal_Int32    nIcon;
 
         bool            bChangedTemplateFile        :1;
-        bool            bChangedWindowAttributes    :1;
-        bool            bChangedEmptyDocumentURL    :1;
         bool            bChangedDefaultFilter       :1;
-        bool            bChangedIcon                :1;
         bool            bDefaultFilterReadonly      :1;
 
         css::uno::Reference< css::util::XStringSubstitution >  xSubstVars;
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index 62b94b9..9d6bf6e 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -28,7 +28,7 @@
 
 IMPL_LINK_NOARG_TYPED(MasterPasswordCreateDialog, EditHdl_Impl, Edit&, void)
 {
-    m_pOKBtn->Enable( m_pEDMasterPasswordCrt->GetText().getLength() >= nMinLen );
+    m_pOKBtn->Enable( m_pEDMasterPasswordCrt->GetText().getLength() >= 1 );
 }
 
 IMPL_LINK_NOARG_TYPED(MasterPasswordCreateDialog, OKHdl_Impl, Button*, void)
@@ -50,7 +50,6 @@ IMPL_LINK_NOARG_TYPED(MasterPasswordCreateDialog, OKHdl_Impl, Button*, void)
 MasterPasswordCreateDialog::MasterPasswordCreateDialog(vcl::Window* pParent, ResMgr* pResMgr)
     : ModalDialog(pParent, "SetMasterPasswordDialog", "uui/ui/setmasterpassworddlg.ui")
     , pResourceMgr(pResMgr)
-    , nMinLen(1)
 {
     get(m_pEDMasterPasswordCrt, "password1");
     get(m_pEDMasterPasswordRepeat, "password2");
diff --git a/uui/source/masterpasscrtdlg.hxx b/uui/source/masterpasscrtdlg.hxx
index 6895995..d0a7c148 100644
--- a/uui/source/masterpasscrtdlg.hxx
+++ b/uui/source/masterpasscrtdlg.hxx
@@ -49,7 +49,6 @@ public:
 
 private:
     ResMgr*                                         pResourceMgr;
-    sal_uInt16                                      nMinLen;
 };
 
 #endif // INCLUDED_UUI_SOURCE_MASTERPASSCRTDLG_HXX
diff --git a/vbahelper/source/vbahelper/vbafillformat.cxx b/vbahelper/source/vbahelper/vbafillformat.cxx
index ab3bfde..0ee49c4 100644
--- a/vbahelper/source/vbahelper/vbafillformat.cxx
+++ b/vbahelper/source/vbahelper/vbafillformat.cxx
@@ -31,7 +31,6 @@ ScVbaFillFormat::ScVbaFillFormat( const uno::Reference< XHelperInterface >& xPar
     m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
     m_nFillStyle = drawing::FillStyle_SOLID;
     m_nForeColor = 0;
-    m_nBackColor = 0;
     m_nGradientAngle = 0;
 }
 
diff --git a/vbahelper/source/vbahelper/vbafillformat.hxx b/vbahelper/source/vbahelper/vbafillformat.hxx
index 80a3e79..ed9b119 100644
--- a/vbahelper/source/vbahelper/vbafillformat.hxx
+++ b/vbahelper/source/vbahelper/vbafillformat.hxx
@@ -34,7 +34,6 @@ private:
     css::uno::Reference< ov::msforms::XColorFormat > m_xColorFormat;
     css::drawing::FillStyle m_nFillStyle;
     sal_Int32 m_nForeColor;
-    sal_Int32 m_nBackColor;
     sal_Int16 m_nGradientAngle;
 private:
     void setFillStyle( css::drawing::FillStyle nFillStyle ) throw (css::uno::RuntimeException);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index f9f602e..d5f683f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -13217,8 +13217,6 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
         rNewWidget.m_aValue           = rLstBox.Text;
         if( rLstBox.DropDown )
             rNewWidget.m_nFlags |= 0x00020000;
-        if( rLstBox.Sort )
-            rNewWidget.m_nFlags |= 0x00080000;
         if( rLstBox.MultiSelect && !rLstBox.DropDown && (int)m_aContext.Version > (int)PDFWriter::PDF_1_3 )
             rNewWidget.m_nFlags |= 0x00200000;
 
@@ -13247,7 +13245,6 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
         aLBox.TextFont          = rBox.TextFont;
         aLBox.TextColor         = rBox.TextColor;
         aLBox.DropDown          = true;
-        aLBox.Sort              = false;
         aLBox.MultiSelect       = false;
         aLBox.Entries           = rBox.Entries;
 
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index c9885d7..94e701e 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -31,6 +31,8 @@ struct ImplBtnDlgItem
     bool                    mbOwnButton;
     long                    mnSepSize;
     VclPtr<PushButton>      mpPushButton;
+
+    ImplBtnDlgItem() : mnId(0), mbOwnButton(false), mnSepSize(0) {}
 };
 
 void ButtonDialog::ImplInitButtonDialogData()
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 29e1ab4..b2feacc 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -74,10 +74,6 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
 ,   bInsertFooterFirst( false )
 ,   bHeaderInserted( false )
 ,   bFooterInserted( false )
-,   bHeaderLeftInserted( false )
-,   bFooterLeftInserted( false )
-,   bHeaderFirstInserted( false )
-,   bFooterFirstInserted( false )
 {
     OUString sName, sDisplayName;
     sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -199,19 +195,19 @@ SvXMLImportContext *XMLTextMasterPageContext::CreateChildContext(
         }
         break;
     case XML_TOK_TEXT_MP_HEADER_LEFT:
-        if( bInsertHeaderLeft && bHeaderInserted && !bHeaderLeftInserted )
+        if( bInsertHeaderLeft && bHeaderInserted )
             bInsert = bLeft = true;
         break;
     case XML_TOK_TEXT_MP_FOOTER_LEFT:
-        if( bInsertFooterLeft && bFooterInserted && !bFooterLeftInserted )
+        if( bInsertFooterLeft && bFooterInserted )
             bInsert = bFooter = bLeft = true;
         break;
     case XML_TOK_TEXT_MP_HEADER_FIRST:
-        if( bInsertHeaderFirst && bHeaderInserted && !bHeaderFirstInserted )
+        if( bInsertHeaderFirst && bHeaderInserted )
             bInsert = bFirst = true;
         break;
     case XML_TOK_TEXT_MP_FOOTER_FIRST:
-        if( bInsertFooterFirst && bFooterInserted && !bFooterFirstInserted )
+        if( bInsertFooterFirst && bFooterInserted )
             bInsert = bFooter = bFirst = true;
         break;
     }


More information about the Libreoffice-commits mailing list