[Libreoffice-commits] core.git: 2 commits - accessibility/inc accessibility/source chart2/source compilerplugins/clang connectivity/source cppcanvas/source editeng/source emfio/source filter/source include/editeng include/svtools include/tools linguistic/source sc/source sd/source solenv/CompilerTest_compilerplugins_clang.mk svtools/source sw/inc tools/source ucb/source writerfilter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 17 06:25:55 UTC 2018
accessibility/inc/standard/vclxaccessiblebox.hxx | 6
accessibility/source/standard/vclxaccessiblebox.cxx | 11
chart2/source/controller/dialogs/dlg_CreationWizard.cxx | 9
chart2/source/controller/inc/SeriesOptionsItemConverter.hxx | 1
chart2/source/controller/inc/dlg_CreationWizard.hxx | 2
chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx | 3
chart2/source/view/charttypes/BubbleChart.cxx | 3
chart2/source/view/charttypes/BubbleChart.hxx | 2
compilerplugins/clang/singlevalfields.cxx | 37 +
compilerplugins/clang/singlevalfields.results | 333 ++++++++--
compilerplugins/clang/staticvar.cxx | 204 ++++++
compilerplugins/clang/test/staticvar.cxx | 80 ++
compilerplugins/clang/unusedfields.cxx | 2
connectivity/source/drivers/mork/MConnection.cxx | 10
connectivity/source/drivers/mork/MErrorResource.hxx | 6
cppcanvas/source/mtfrenderer/emfpregion.cxx | 4
cppcanvas/source/mtfrenderer/emfpregion.hxx | 1
editeng/source/misc/svxacorr.cxx | 16
emfio/source/reader/mtftools.cxx | 3
filter/source/graphicfilter/icgm/cgm.cxx | 19
filter/source/graphicfilter/icgm/cgm.hxx | 2
filter/source/graphicfilter/icgm/class1.cxx | 12
filter/source/graphicfilter/icgm/elements.cxx | 2
filter/source/graphicfilter/icgm/elements.hxx | 1
filter/source/graphicfilter/idxf/dxf2mtf.cxx | 3
filter/source/graphicfilter/idxf/dxfvec.cxx | 2
filter/source/graphicfilter/idxf/dxfvec.hxx | 2
include/editeng/svxacorr.hxx | 3
include/svtools/ctrlbox.hxx | 13
include/tools/b3dtrans.hxx | 4
linguistic/source/dlistimp.cxx | 13
sc/source/filter/excel/excform.cxx | 12
sc/source/filter/excel/excform8.cxx | 18
sc/source/filter/excel/frmbase.cxx | 4
sc/source/filter/inc/formel.hxx | 1
sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx | 16
sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx | 1
solenv/CompilerTest_compilerplugins_clang.mk | 1
svtools/source/control/ctrlbox.cxx | 136 ----
sw/inc/printdata.hxx | 9
tools/source/generic/b3dtrans.cxx | 13
tools/source/generic/config.cxx | 21
ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx | 10
ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx | 1
writerfilter/source/dmapper/GraphicImport.cxx | 6
writerfilter/source/dmapper/PropertyMap.cxx | 5
writerfilter/source/dmapper/PropertyMap.hxx | 1
47 files changed, 671 insertions(+), 393 deletions(-)
New commits:
commit 6ee4375763854e43e549aee5a35520def2e215a2
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 16 10:40:16 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 17 08:25:17 2018 +0200
new loplugin staticvar
looks for variables that can be declared const and static i.e. they can
be stored in the read-only linker segment and shared between different
processes
Change-Id: I577fb2070604003e56fb44f8a02c9684070311cf
Reviewed-on: https://gerrit.libreoffice.org/61817
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/staticvar.cxx b/compilerplugins/clang/staticvar.cxx
new file mode 100644
index 000000000000..a9db2f4dda04
--- /dev/null
+++ b/compilerplugins/clang/staticvar.cxx
@@ -0,0 +1,204 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <cassert>
+#include <string>
+#include <iostream>
+#include <unordered_map>
+#include <unordered_set>
+
+#include "plugin.hxx"
+#include "check.hxx"
+#include "clang/AST/CXXInheritance.h"
+#include "clang/AST/StmtVisitor.h"
+
+// Look for variables that either
+// (a) could be statically initialised, without runtime code, and warn
+// (b) variables that are statically declared, but require runtime initialisation, and warn
+//
+// e.g.
+// static const OUString[] XXX { "xxx" };
+// requires runtime initialisation, so should rather be declared as OUStringLiteral
+// and
+// static int[] XXX { 1,2 };
+// can be declared const since it does not require runtime initialisation.
+
+namespace
+{
+class StaticVar : public loplugin::FilteringPlugin<StaticVar>
+{
+public:
+ explicit StaticVar(loplugin::InstantiationData const& data)
+ : FilteringPlugin(data)
+ {
+ }
+
+ virtual void run() override
+ {
+ std::string fn(handler.getMainFileName());
+ loplugin::normalizeDotDotInFilePath(fn);
+
+ if (
+ // uses icu::UnicodeString
+ fn == SRCDIR "/l10ntools/source/xmlparse.cxx"
+ // contains mutable state
+ || fn == SRCDIR "/sal/osl/unx/signal.cxx"
+ || fn == SRCDIR "/sal/qa/rtl/digest/rtl_digest.cxx"
+ || fn == SRCDIR "/sal/qa/rtl/strings/test_oustring_endswith.cxx"
+ || fn == SRCDIR "/sal/qa/rtl/strings/test_oustring_convert.cxx"
+ || fn == SRCDIR "/svl/qa/unit/items/test_itempool.cxx"
+ // contains mutable state
+ || fn == SRCDIR "/vcl/unx/generic/dtrans/X11_selection.cxx"
+ || fn == SRCDIR "/sax/qa/cppunit/xmlimport.cxx"
+ || fn == SRCDIR "/pyuno/source/module/pyuno.cxx"
+ || fn == SRCDIR "/pyuno/source/module/pyuno_module.cxx"
+ || fn == SRCDIR "/pyuno/source/module/pyuno_struct.cxx"
+ // TODO for this one we need a static OUString
+ || fn == SRCDIR "/xmloff/source/core/xmltoken.cxx"
+ // mutable
+ || fn == SRCDIR "/basic/source/runtime/stdobj.cxx"
+ // TODO this needs more extensive cleanup
+ || fn == SRCDIR "/connectivity/source/drivers/postgresql/pq_statics.cxx"
+ // mutable
+ || fn == SRCDIR "/hwpfilter/source/hwpreader.cxx"
+ // mutable
+ || fn == SRCDIR "/sw/source/filter/basflt/fltini.cxx"
+ // mutable
+ || fn == SRCDIR "/sw/source/uibase/docvw/srcedtw.cxx"
+ // mutable
+ || fn == SRCDIR "/forms/source/misc/limitedformats.cxx"
+ // aHTMLOptionTab is ordered by useful grouping, so let it sort at runtime
+ || fn == SRCDIR "/svtools/source/svhtml/htmlkywd.cxx"
+ // TODO sorting some of these tables will be a lot of work...
+ || fn == SRCDIR "/sw/source/filter/ww8/ww8par6.cxx")
+ return;
+ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+ }
+
+ bool VisitVarDecl(VarDecl const*);
+};
+
+static bool containsNonLiteral(Expr const* expr)
+{
+ expr = expr->IgnoreImplicit();
+ if (auto initList = dyn_cast<InitListExpr>(expr))
+ {
+ for (unsigned i = 0; i < initList->getNumInits(); ++i)
+ if (containsNonLiteral(initList->getInit(i)))
+ return true;
+ }
+ else if (auto constructExpr = dyn_cast<CXXConstructExpr>(expr))
+ {
+ for (Expr const* arg : constructExpr->arguments())
+ if (containsNonLiteral(arg))
+ return true;
+ }
+ else if (isa<MemberExpr>(expr))
+ return true;
+ else if (auto declRefExpr = dyn_cast<DeclRefExpr>(expr))
+ {
+ auto varDecl = dyn_cast_or_null<VarDecl>(declRefExpr->getDecl());
+ return varDecl && varDecl->isLocalVarDeclOrParm();
+ }
+ else if (isa<CXXMemberCallExpr>(expr))
+ return true;
+ else if (auto castExpr = dyn_cast<CXXFunctionalCastExpr>(expr))
+ return containsNonLiteral(castExpr->getSubExpr());
+ else if (auto unaryOp = dyn_cast<UnaryOperator>(expr))
+ return containsNonLiteral(unaryOp->getSubExpr());
+
+ return false;
+}
+
+bool StaticVar::VisitVarDecl(VarDecl const* varDecl)
+{
+ if (ignoreLocation(varDecl))
+ return true;
+ if (!varDecl->hasInit())
+ return true;
+ auto initList = dyn_cast_or_null<InitListExpr>(varDecl->getInit());
+ if (!initList)
+ return true;
+ if (varDecl->isExceptionVariable() || isa<ParmVarDecl>(varDecl))
+ return true;
+ if (!varDecl->getType()->isArrayType())
+ return true;
+ auto elementType = varDecl->getType()->getBaseElementTypeUnsafe();
+ if (!elementType->isRecordType())
+ return true;
+ auto elementRecordDecl
+ = dyn_cast_or_null<CXXRecordDecl>(elementType->getAs<RecordType>()->getDecl());
+ if (!elementRecordDecl)
+ return true;
+ if (containsNonLiteral(initList))
+ return true;
+
+ if (elementRecordDecl->hasTrivialDestructor())
+ {
+ if (varDecl->isLocalVarDecl())
+ {
+ if (varDecl->getStorageDuration() == SD_Static && varDecl->getType().isConstQualified())
+ return true;
+ }
+ else
+ {
+ if (varDecl->getType().isConstQualified())
+ return true;
+ }
+
+ // TODO cannot figure out how to make the loplugin::TypeCheck stuff match this
+ // std::string typeName = varDecl->getType().getAsString();
+ // if (typeName == "std::va_list" || typeName == "va_list")
+ // return true;
+
+ auto const tcElement = loplugin::TypeCheck(elementRecordDecl);
+ if (tcElement.Struct("ContextID_Index_Pair").GlobalNamespace())
+ return true;
+ if (tcElement.Class("SfxSlot").GlobalNamespace())
+ return true;
+
+ if (varDecl->isLocalVarDecl())
+ report(DiagnosticsEngine::Warning, "var should be static const, or whitelisted",
+ varDecl->getLocation())
+ << varDecl->getSourceRange();
+ else
+ report(DiagnosticsEngine::Warning, "var should be const, or whitelisted",
+ varDecl->getLocation())
+ << varDecl->getSourceRange();
+ }
+ else
+ {
+ if (varDecl->isLocalVarDecl())
+ {
+ if (varDecl->getStorageDuration() != SD_Static
+ || !varDecl->getType().isConstQualified())
+ return true;
+ }
+ else
+ {
+ if (!varDecl->getType().isConstQualified())
+ return true;
+ }
+
+ if (varDecl->isLocalVarDecl())
+ report(DiagnosticsEngine::Warning, "static const var requires runtime initialization?",
+ varDecl->getLocation())
+ << varDecl->getSourceRange();
+ else
+ report(DiagnosticsEngine::Warning, "static var requires runtime initialization?",
+ varDecl->getLocation())
+ << varDecl->getSourceRange();
+ }
+ return true;
+}
+
+loplugin::Plugin::Registration<StaticVar> X("staticvar", false);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/test/staticvar.cxx b/compilerplugins/clang/test/staticvar.cxx
new file mode 100644
index 000000000000..9963e99db687
--- /dev/null
+++ b/compilerplugins/clang/test/staticvar.cxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <config_clang.h>
+#include <sal/config.h>
+#include <rtl/ustring.hxx>
+
+struct S1
+{
+ int x, y;
+};
+
+S1 const& f1(int a)
+{
+ static S1 s1[]{
+ // expected-error at -1 {{var should be static const, or whitelisted [loplugin:staticvar]}}
+ { 1, 1 }
+ };
+ // no warning expected
+ const S1 s2[]{ { a, 1 } };
+ (void)s2;
+ return s1[0];
+}
+
+struct S2
+{
+ OUString x;
+};
+
+#if CLANG_VERSION >= 50000 // probably something to do with how OUString initialisers work
+S2 const& f2()
+{
+ static S2 const s1[]{
+ // expected-error at -1 {{static const var requires runtime initialization? [loplugin:staticvar]}}
+ { "xxx" }
+ };
+ return s1[0];
+}
+#endif
+
+// no warning expected
+S2 const& f3()
+{
+ static S2 s1[]{ { "xxx" } };
+ return s1[0];
+}
+
+// no warning expected
+struct S4
+{
+ OUStringLiteral const cName;
+ bool const bCanBeVisible;
+};
+S4 const& f4()
+{
+ static const S4 s1[] = {
+ { OUStringLiteral("/DocColor"), false },
+ };
+ return s1[0];
+}
+
+struct S5
+{
+ bool const bCanBeVisible;
+};
+void f5(bool b)
+{
+ const S5 s1[] = {
+ { b },
+ };
+ (void)s1;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk
index e187f374f915..0c086df0f7a4 100644
--- a/solenv/CompilerTest_compilerplugins_clang.mk
+++ b/solenv/CompilerTest_compilerplugins_clang.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
compilerplugins/clang/test/simplifyconstruct \
compilerplugins/clang/test/simplifydynamiccast \
compilerplugins/clang/test/staticconstfield \
+ compilerplugins/clang/test/staticvar \
compilerplugins/clang/test/stringbuffer \
compilerplugins/clang/test/stringconstant \
compilerplugins/clang/test/stringloop \
commit 16690220ed6e68f2e9674a09b5008f38c5e6ed8d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 15 08:48:36 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 17 08:25:06 2018 +0200
loplugin:singlevalfields
tighten up the handling of binary operators
Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee
Reviewed-on: https://gerrit.libreoffice.org/61777
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/accessibility/inc/standard/vclxaccessiblebox.hxx b/accessibility/inc/standard/vclxaccessiblebox.hxx
index 5b5f46ae6f39..1fcf97c21baf 100644
--- a/accessibility/inc/standard/vclxaccessiblebox.hxx
+++ b/accessibility/inc/standard/vclxaccessiblebox.hxx
@@ -81,8 +81,6 @@ public:
*/
sal_Int16 SAL_CALL getAccessibleRole() override;
- sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
-
// XAccessibleAction
/** There is one action for drop down boxes and none for others.
@@ -154,10 +152,6 @@ protected:
virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override;
sal_Int32 implGetAccessibleChildCount();
-
-private:
- /// Index in parent. This is settable from the outside.
- sal_Int32 m_nIndexInParent;
};
#endif
diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index e80c14abee3c..c43245428253 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -42,8 +42,7 @@ using namespace ::com::sun::star::accessibility;
VCLXAccessibleBox::VCLXAccessibleBox (VCLXWindow* pVCLWindow, BoxType aType, bool bIsDropDownBox)
: VCLXAccessibleComponent (pVCLWindow),
m_aBoxType (aType),
- m_bIsDropDownBox (bIsDropDownBox),
- m_nIndexInParent (DEFAULT_INDEX_IN_PARENT)
+ m_bIsDropDownBox (bIsDropDownBox)
{
// Set up the flags that indicate which children this object has.
m_bHasListChild = true;
@@ -354,14 +353,6 @@ sal_Int16 SAL_CALL VCLXAccessibleBox::getAccessibleRole()
return AccessibleRole::PANEL;
}
-sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleIndexInParent()
-{
- if (m_nIndexInParent != DEFAULT_INDEX_IN_PARENT)
- return m_nIndexInParent;
- else
- return VCLXAccessibleComponent::getAccessibleIndexInParent();
-}
-
//===== XAccessibleAction ===================================================
sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleActionCount()
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 9967c6123a76..2b7ea4405fda 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -50,7 +50,6 @@ CreationWizard::CreationWizard(vcl::Window* pParent, const uno::Reference<frame:
, m_xChartModel(xChartModel,uno::UNO_QUERY)
, m_xComponentContext(xContext)
, m_pTemplateProvider(nullptr)
- , m_nLastState(STATE_LAST)
, m_aTimerTriggeredControllerLock(xChartModel)
, m_bCanTravel(true)
{
@@ -140,18 +139,18 @@ svt::WizardTypes::WizardState CreationWizard::determineNextState( WizardState nC
{
if( !m_bCanTravel )
return WZS_INVALID_STATE;
- if( nCurrentState == m_nLastState )
+ if( nCurrentState == STATE_LAST )
return WZS_INVALID_STATE;
svt::WizardTypes::WizardState nNextState = nCurrentState + 1;
- while( !isStateEnabled( nNextState ) && nNextState <= m_nLastState )
+ while( !isStateEnabled( nNextState ) && nNextState <= STATE_LAST )
++nNextState;
- return (nNextState==m_nLastState+1) ? WZS_INVALID_STATE : nNextState;
+ return (nNextState==STATE_LAST+1) ? WZS_INVALID_STATE : nNextState;
}
void CreationWizard::enterState(WizardState nState)
{
m_aTimerTriggeredControllerLock.startTimer();
enableButtons( WizardButtonFlags::PREVIOUS, nState > STATE_FIRST );
- enableButtons( WizardButtonFlags::NEXT, nState < m_nLastState );
+ enableButtons( WizardButtonFlags::NEXT, nState < STATE_LAST );
if( isStateEnabled( nState ))
svt::RoadmapWizard::enterState(nState);
}
diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
index 2181d9165eb9..ad8fd31cfd20 100644
--- a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
@@ -62,7 +62,6 @@ private:
bool m_bSupportingAxisSideBySide;
bool m_bGroupBarsPerAxis;
- sal_Int32 m_nAllSeriesAxisIndex;
bool m_bSupportingStartingAngle;
sal_Int32 m_nStartingAngle;
diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx
index 732968fde79f..b9ddfef66896 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx
@@ -65,8 +65,6 @@ private:
ChartTypeTemplateProvider* m_pTemplateProvider;
std::unique_ptr<DialogModel> m_pDialogModel;
- WizardState m_nLastState;
-
TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
bool m_bCanTravel;
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 3d195ad2bf60..7b98478e75b2 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -67,7 +67,6 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
, m_bConnectBars(false)
, m_bSupportingAxisSideBySide(false)
, m_bGroupBarsPerAxis(true)
- , m_nAllSeriesAxisIndex(-1)
, m_bSupportingStartingAngle(false)
, m_nStartingAngle(90)
, m_bClockwise(false)
@@ -393,8 +392,6 @@ void SeriesOptionsItemConverter::FillSpecialItem(
}
case SCHATTR_AXIS_FOR_ALL_SERIES:
{
- if( m_nAllSeriesAxisIndex != - 1)
- rOutItemSet.Put( SfxInt32Item(nWhichId, m_nAllSeriesAxisIndex));
break;
}
case SCHATTR_STARTING_ANGLE:
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index f8c66bce3cdd..ee3b0cc38e3e 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -49,7 +49,6 @@ using namespace ::com::sun::star::chart2;
BubbleChart::BubbleChart( const uno::Reference<XChartType>& xChartTypeModel
, sal_Int32 nDimensionCount )
: VSeriesPlotter( xChartTypeModel, nDimensionCount, false )
- , m_fBubbleSizeScaling(1.0)
, m_fMaxLogicBubbleSize( 0.0 )
, m_fBubbleSizeFactorToScreen( 1.0 )
{
@@ -121,7 +120,7 @@ drawing::Direction3D BubbleChart::transformToScreenBubbleSize( double fLogicSize
double fMaxRadius = sqrt( fMaxSize / F_PI );
double fRaduis = sqrt( fLogicSize / F_PI );
- aRet.DirectionX = m_fBubbleSizeScaling * m_fBubbleSizeFactorToScreen * fRaduis / fMaxRadius;
+ aRet.DirectionX = m_fBubbleSizeFactorToScreen * fRaduis / fMaxRadius;
aRet.DirectionY = aRet.DirectionX;
return aRet;
diff --git a/chart2/source/view/charttypes/BubbleChart.hxx b/chart2/source/view/charttypes/BubbleChart.hxx
index b2b28267f675..a4e9f7a75621 100644
--- a/chart2/source/view/charttypes/BubbleChart.hxx
+++ b/chart2/source/view/charttypes/BubbleChart.hxx
@@ -53,8 +53,6 @@ private: //methods
private: //member
- double m_fBubbleSizeScaling;//input parameter
-
double m_fMaxLogicBubbleSize;//calculated values
double m_fBubbleSizeFactorToScreen;//calculated values
};
diff --git a/compilerplugins/clang/singlevalfields.cxx b/compilerplugins/clang/singlevalfields.cxx
index fc2a38017e4a..9c3a8b8d71b7 100644
--- a/compilerplugins/clang/singlevalfields.cxx
+++ b/compilerplugins/clang/singlevalfields.cxx
@@ -251,6 +251,9 @@ bool SingleValFields::VisitMemberExpr( const MemberExpr* memberExpr )
auto methodDecl = dyn_cast<CXXMethodDecl>(parentFunction);
if (methodDecl && (methodDecl->isCopyAssignmentOperator() || methodDecl->isMoveAssignmentOperator()))
return true;
+ if (methodDecl && methodDecl->getIdentifier()
+ && (methodDecl->getName().startswith("Clone") || methodDecl->getName().startswith("clone")))
+ return true;
auto cxxConstructorDecl = dyn_cast<CXXConstructorDecl>(parentFunction);
if (cxxConstructorDecl && cxxConstructorDecl->isCopyOrMoveConstructor())
return true;
@@ -336,13 +339,19 @@ bool SingleValFields::VisitMemberExpr( const MemberExpr* memberExpr )
else if (isa<BinaryOperator>(parent))
{
const BinaryOperator* binaryOp = dyn_cast<BinaryOperator>(parent);
+ auto op = binaryOp->getOpcode();
if ( binaryOp->getLHS() != child ) {
- // do nothing
+ // if the expr is on the RHS, do nothing
}
- else if ( binaryOp->getOpcode() == BO_Assign ) {
+ else if ( op == BO_Assign ) {
assignValue = getExprValue(binaryOp->getRHS());
bPotentiallyAssignedTo = true;
- } else {
+ } else if ( op == BO_MulAssign || op == BO_DivAssign
+ || op == BO_RemAssign || op == BO_AddAssign
+ || op == BO_SubAssign || op == BO_ShlAssign
+ || op == BO_ShrAssign || op == BO_AndAssign
+ || op == BO_XorAssign || op == BO_OrAssign )
+ {
bPotentiallyAssignedTo = true;
}
break;
@@ -467,11 +476,33 @@ std::string SingleValFields::getExprValue(const Expr* arg)
if (!arg)
return "?";
arg = arg->IgnoreParenCasts();
+ arg = arg->IgnoreImplicit();
// ignore this, it seems to trigger an infinite recursion
if (isa<UnaryExprOrTypeTraitExpr>(arg))
return "?";
if (arg->isValueDependent())
return "?";
+ if (auto constructExpr = dyn_cast<CXXConstructExpr>(arg))
+ {
+ if (constructExpr->getNumArgs() >= 1
+ && isa<clang::StringLiteral>(constructExpr->getArg(0)))
+ {
+ return dyn_cast<clang::StringLiteral>(constructExpr->getArg(0))->getString();
+ }
+ }
+#if CLANG_VERSION >= 50000
+ if (arg->getType()->isFloatingType())
+ {
+ APFloat x1(0.0f);
+ if (arg->EvaluateAsFloat(x1, compiler.getASTContext()))
+ {
+ std::string s;
+ llvm::raw_string_ostream os(s);
+ x1.print(os);
+ return os.str();
+ }
+ }
+#endif
APSInt x1;
if (arg->EvaluateAsInt(x1, compiler.getASTContext()))
return x1.toString(10);
diff --git a/compilerplugins/clang/singlevalfields.results b/compilerplugins/clang/singlevalfields.results
index 6ec49ca86374..a67d5f1ae01c 100644
--- a/compilerplugins/clang/singlevalfields.results
+++ b/compilerplugins/clang/singlevalfields.results
@@ -1,57 +1,210 @@
+accessibility/inc/standard/vclxaccessiblebox.hxx:160
+ VCLXAccessibleBox m_nIndexInParent
+ -1
+chart2/source/controller/inc/dlg_CreationWizard.hxx:68
+ chart::CreationWizard m_nLastState
+ 3
+chart2/source/controller/inc/SeriesOptionsItemConverter.hxx:65
+ chart::wrapper::SeriesOptionsItemConverter m_nAllSeriesAxisIndex
+ -1
chart2/source/model/main/DataPoint.hxx:108
chart::DataPoint m_bNoParentPropAllowed
0
+chart2/source/view/charttypes/BubbleChart.hxx:56
+ chart::BubbleChart m_fBubbleSizeScaling
+ 1
+connectivity/source/drivers/mork/MErrorResource.hxx:31
+ connectivity::mork::ErrorDescriptor m_nErrorCondition
+ 0
+connectivity/source/inc/dbase/DIndexIter.hxx:36
+ connectivity::dbase::OIndexIterator m_pOperator
+ 0
connectivity/source/inc/dbase/DIndexIter.hxx:37
connectivity::dbase::OIndexIterator m_pOperand
0
+connectivity/source/inc/writer/WTable.hxx:69
+ connectivity::writer::OWriterTable m_nStartCol
+ 0
+cppcanvas/source/mtfrenderer/emfpregion.hxx:32
+ cppcanvas::internal::EMFPRegion iw
+ 0
+cppcanvas/source/mtfrenderer/emfpregion.hxx:32
+ cppcanvas::internal::EMFPRegion ih
+ 0
+cppcanvas/source/mtfrenderer/emfpregion.hxx:32
+ cppcanvas::internal::EMFPRegion ix
+ 0
+cppcanvas/source/mtfrenderer/emfpregion.hxx:32
+ cppcanvas::internal::EMFPRegion iy
+ 0
desktop/source/app/cmdlineargs.hxx:137
desktop::CommandLineArgs m_quickstart
0
+emfio/inc/mtftools.hxx:487
+ emfio::MtfTools meLatestRasterOp
+ 4
+filter/source/graphicfilter/icgm/cgm.hxx:47
+ CGM mnOutdx
+ 28000
+filter/source/graphicfilter/icgm/cgm.hxx:48
+ CGM mnOutdy
+ 21000
+filter/source/graphicfilter/icgm/elements.hxx:67
+ CGMElements eColorModel
+ 0
+filter/source/graphicfilter/idxf/dxfvec.hxx:31
+ DXFLineInfo fWidth
+ 0
+filter/source/msfilter/viscache.hxx:31
+ Impl_OlePres nFormat
+ 3
+include/basegfx/pixel/bpixel.hxx:43
+ basegfx::BPixel::(anonymous union)::(anonymous) mnValue
+ 0
+include/basegfx/pixel/bpixel.hxx:44
+ basegfx::BPixel::(anonymous) maCombinedRGBO
+ 0
include/basic/sbxvar.hxx:70
SbxValues::(anonymous) pData
0
-include/editeng/charsetcoloritem.hxx:35
- SvxCharSetColorItem eFrom
- 0
+include/canvas/rendering/irendermodule.hxx:40
+ canvas::Vertex g
+ 1
+include/canvas/rendering/irendermodule.hxx:40
+ canvas::Vertex b
+ 1
+include/canvas/rendering/irendermodule.hxx:40
+ canvas::Vertex r
+ 1
+include/canvas/rendering/irendermodule.hxx:42
+ canvas::Vertex z
+ 0
+include/editeng/svxacorr.hxx:247
+ SvxAutoCorrect cEnDash
+ 8211
+include/editeng/svxacorr.hxx:247
+ SvxAutoCorrect cEmDash
+ 8212
include/editeng/swafopt.hxx:58
editeng::SortedAutoCompleteStrings owning_
1
include/filter/msfilter/dffpropset.hxx:33
DffPropFlags bSet
0
+include/filter/msfilter/dffpropset.hxx:34
+ DffPropFlags bComplex
+ 1
include/filter/msfilter/dffpropset.hxx:35
DffPropFlags bBlip
1
+include/i18nutil/casefolding.hxx:57
+ i18nutil::Mapping nmap
+ 0
include/o3tl/vector_pool.hxx:93
o3tl::detail::struct_from_value::type nextFree
-1
+include/oox/core/contexthandler2.hxx:220
+ oox::core::ContextHandler2Helper mnRootStackSize
+ 0
include/oox/dump/dumperbase.hxx:1683
oox::dump::RecordObjectBase mbBinaryOnly
0
-include/oox/ole/axcontrol.hxx:427
- oox::ole::ComCtlModelBase mbCommonPart
- 1
-include/oox/ole/axcontrol.hxx:428
- oox::ole::ComCtlModelBase mbComplexPart
- 1
+include/svtools/ctrlbox.hxx:455
+ FontSizeBox bRelativeMode
+ 0
include/svtools/svparser.hxx:74
SvParser::TokenStackType nTokenValue
0
include/svtools/svparser.hxx:75
SvParser::TokenStackType bTokenHasValue
0
-include/svx/dialcontrol.hxx:212
- svx::SvxDialControl::DialControl_Impl mbNoRot
- 0
-include/svx/svdograf.hxx:106
- SdrGrafObj mbInsidePaint
- 0
+include/tools/b3dtrans.hxx:62
+ B3dTransformationSet mfNearBound
+ 0.001
+include/tools/b3dtrans.hxx:63
+ B3dTransformationSet mfFarBound
+ 1.0009999999999999
include/vcl/filter/pdfdocument.hxx:200
vcl::filter::PDFNameElement m_nLength
0
+include/vcl/slider.hxx:39
+ Slider mnChannelPixOffset
+ 0
+include/vcl/slider.hxx:51
+ Slider mbFullDrag
+ 1
+include/vcl/status.hxx:78
+ StatusBar mbVisibleItems
+ 1
libreofficekit/source/gtk/lokdocview.cxx:84
LOKDocViewPrivateImpl m_bIsLoading
0
+linguistic/source/dlistimp.cxx:78
+ DicEvtListenerHelper nNumVerboseListeners
+ 0
+lotuswordpro/inc/xfilter/xfborders.hxx:119
+ XFBorder m_fOffset
+ 0
+lotuswordpro/inc/xfilter/xfcellstyle.hxx:140
+ XFCellStyle m_fTextIndent
+ 0
+lotuswordpro/inc/xfilter/xfcellstyle.hxx:148
+ XFCellStyle m_bWrapText
+ 0
+lotuswordpro/inc/xfilter/xfdrawstyle.hxx:125
+ XFDrawStyle m_eWrap
+ 0
+lotuswordpro/inc/xfilter/xffont.hxx:245
+ XFFont m_eRelief
+ 0
+lotuswordpro/inc/xfilter/xffont.hxx:247
+ XFFont m_eEmphasize
+ 0
+lotuswordpro/inc/xfilter/xffont.hxx:249
+ XFFont m_bEmphasizeTop
+ 1
+lotuswordpro/inc/xfilter/xffont.hxx:250
+ XFFont m_bOutline
+ 0
+lotuswordpro/inc/xfilter/xffont.hxx:251
+ XFFont m_bShadow
+ 0
+lotuswordpro/inc/xfilter/xffont.hxx:252
+ XFFont m_bBlink
+ 0
+lotuswordpro/inc/xfilter/xffont.hxx:255
+ XFFont m_fCharSpace
+ 0
+lotuswordpro/inc/xfilter/xffont.hxx:256
+ XFFont m_nWidthScale
+ 100
+lotuswordpro/inc/xfilter/xfnumberstyle.hxx:103
+ XFNumberStyle m_nMinInteger
+ 1
+lotuswordpro/inc/xfilter/xfnumberstyle.hxx:104
+ XFNumberStyle m_nMinExponent
+ 2
+lotuswordpro/inc/xfilter/xfnumberstyle.hxx:107
+ XFNumberStyle m_bCurrencySymbolPost
+ 0
+lotuswordpro/inc/xfilter/xfparastyle.hxx:224
+ XFParaStyle m_eLastLineAlign
+ 0
+lotuswordpro/inc/xfilter/xfparastyle.hxx:225
+ XFParaStyle m_bJustSingleWord
+ 0
+lotuswordpro/inc/xfilter/xfparastyle.hxx:226
+ XFParaStyle m_bKeepWithNext
+ 0
+lotuswordpro/inc/xfilter/xfparastyle.hxx:240
+ XFParaStyle m_nPageNumber
+ 0
+lotuswordpro/inc/xfilter/xfparastyle.hxx:241
+ XFParaStyle m_bNumberLines
+ 1
+lotuswordpro/inc/xfilter/xfparastyle.hxx:242
+ XFParaStyle m_nLineNumberRestart
+ 0
opencl/source/opencl_device.cxx:54
(anonymous namespace)::LibreOfficeDeviceEvaluationIO inputSize
15360
@@ -61,32 +214,83 @@ opencl/source/opencl_device.cxx:55
pyuno/source/module/pyuno_impl.hxx:312
pyuno::RuntimeCargo valid
1
-sax/source/tools/fastserializer.hxx:231
- sax_fastparser::FastSaxSerializer mbXescape
+sal/osl/unx/signal.cxx:82
+ (anonymous namespace)::SignalAction Action
1
-sc/inc/compiler.hxx:112
+sc/inc/compiler.hxx:111
ScRawToken::(anonymous union)::(anonymous) eInForceArray
0
+sc/inc/rangenam.hxx:84
+ ScRangeData mnMaxRow
+ -1
+sc/inc/rangenam.hxx:85
+ ScRangeData mnMaxCol
+ -1
+sc/inc/refdata.hxx:37
+ ScSingleRefData::(anonymous) mnFlagValue
+ 0
sc/qa/unit/ucalc.hxx:41
Test::RangeNameDef mnIndex
1
+sc/source/core/tool/interpr8.cxx:99
+ ScETSForecastCalculation cfMinABCResolution
+ 0.001
+sc/source/filter/inc/formel.hxx:82
+ ConverterBase eStatus
+ 0
+sc/source/filter/inc/orcusinterface.hxx:179
+ ScOrcusConditionalFormat meEntryType
+ 0
+sc/source/filter/inc/xltracer.hxx:82
+ XclTracer mbEnabled
+ 0
sd/inc/sdpptwrp.hxx:42
SdPPTFilter pBas
0
sd/source/filter/html/htmlex.hxx:113
HtmlExport mbAutoSlide
1
-sfx2/source/appl/lnkbase2.cxx:77
+sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx:81
+ sd::slidesorter::controller::VisibleAreaManager meRequestedAnimationMode
+ 1
+sd/source/ui/slidesorter/view/SlsLayouter.cxx:41
+ sd::slidesorter::view::Layouter::Implementation mnVerticalGap
+ 4
+sd/source/ui/slidesorter/view/SlsLayouter.cxx:42
+ sd::slidesorter::view::Layouter::Implementation mnHorizontalGap
+ 4
+sfx2/source/appl/lnkbase2.cxx:76
sfx2::ImplBaseLinkData::tDDEType pItem
0
-sfx2/source/appl/lnkbase2.cxx:82
+sfx2/source/appl/lnkbase2.cxx:81
sfx2::ImplBaseLinkData::(anonymous) DDEType
0
-sfx2/source/doc/doctemplates.cxx:137
+sfx2/source/bastyp/progress.cxx:56
+ SfxProgress_Impl bLocked
+ 0
+sfx2/source/control/dispatch.cxx:118
+ SfxDispatcher_Impl pParent
+ 0
+sfx2/source/control/dispatch.cxx:133
+ SfxDispatcher_Impl bModal
+ 0
+sfx2/source/doc/doctemplates.cxx:138
(anonymous namespace)::WaitWindow_Impl mnTextStyle
12576
-sfx2/source/view/ipclient.cxx:82
- SfxBooleanFlagGuard m_bLifeValue
+sfx2/source/inc/workwin.hxx:188
+ SfxWorkWindow pParent
+ 0
+sfx2/source/view/printer.cxx:39
+ SfxPrinter_Impl mbAll
+ 1
+sfx2/source/view/printer.cxx:40
+ SfxPrinter_Impl mbSelection
+ 1
+sfx2/source/view/printer.cxx:41
+ SfxPrinter_Impl mbFromTo
+ 1
+sfx2/source/view/printer.cxx:42
+ SfxPrinter_Impl mbRange
1
soltools/cpp/cpp.h:120
includelist deleted
@@ -101,20 +305,23 @@ stoc/source/inspect/introspection.cxx:1530
(anonymous namespace)::Cache::Data hits
1
svx/source/svdraw/svdpdf.hxx:173
- ImpSdrPdfImport maLineJoin
- 0
-svx/source/svdraw/svdpdf.hxx:174
ImpSdrPdfImport maLineCap
0
-sw/inc/hints.hxx:199
+sw/inc/hints.hxx:223
SwAttrSetChg m_bDelSet
0
+sw/inc/pagepreviewlayout.hxx:45
+ SwPagePreviewLayout mnXFree
+ 568
sw/inc/pagepreviewlayout.hxx:46
SwPagePreviewLayout mnYFree
568
-sw/source/core/inc/frmtool.hxx:260
- SwBorderAttrs m_bBorderDist
+sw/inc/printdata.hxx:69
+ SwPrintData m_bUpdateFieldsInPrinting
1
+sw/inc/viewopt.hxx:189
+ SwViewOption m_bTest10
+ 0
sw/source/core/inc/UndoSort.hxx:38
SwSortUndoElement::(anonymous union)::(anonymous) nID
4294967295
@@ -133,42 +340,72 @@ sw/source/filter/html/svxcss1.hxx:202
sw/source/filter/inc/rtf.hxx:30
RTFSurround::(anonymous union)::(anonymous) nJunk
0
-sw/source/filter/ww8/ww8par.hxx:660
+sw/source/filter/ww8/ww8par.hxx:659
WW8FormulaControl mfUnknown
0
-sw/source/filter/ww8/ww8par.hxx:669
+sw/source/filter/ww8/ww8par.hxx:668
WW8FormulaControl mhpsCheckBox
20
+tools/source/generic/config.cxx:59
+ ImplConfigData meLineEnd
+ 2
+ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx:65
+ webdav_ucp::DAVResourceAccess m_nRedirectLimit
+ 5
unotools/source/config/saveopt.cxx:77
SvtSaveOptions_Impl bROUserAutoSave
0
+vcl/inc/listbox.hxx:201
+ ImplListBoxWindow mnBorder
+ 1
+vcl/inc/octree.hxx:98
+ InverseColorMap nBits
+ 3
vcl/inc/salprn.hxx:42
SalPrinterQueueInfo mnStatus
0
vcl/inc/salprn.hxx:43
SalPrinterQueueInfo mnJobs
4294967295
-vcl/inc/svdata.hxx:267
+vcl/inc/svdata.hxx:273
ImplSVNWFData mnStatusBarLowerRightOffset
0
-vcl/inc/svdata.hxx:283
+vcl/inc/svdata.hxx:279
+ ImplSVNWFData mbMenuBarDockingAreaCommonBG
+ 0
+vcl/inc/svdata.hxx:289
ImplSVNWFData mbCenteredTabs
0
-vcl/inc/svdata.hxx:284
+vcl/inc/svdata.hxx:290
ImplSVNWFData mbNoActiveTabTextRaise
0
-vcl/inc/svdata.hxx:286
+vcl/inc/svdata.hxx:292
ImplSVNWFData mbProgressNeedsErase
0
+vcl/inc/svdata.hxx:301
+ ImplSVNWFData mbRolloverMenubar
+ 0
vcl/source/filter/jpeg/transupp.h:128
(anonymous) perfect
0
vcl/source/filter/jpeg/transupp.h:129
(anonymous) trim
0
+vcl/source/filter/jpeg/transupp.h:130
+ (anonymous) force_grayscale
+ 0
vcl/source/filter/jpeg/transupp.h:131
(anonymous) crop
0
+vcl/source/filter/jpeg/transupp.h:147
+ (anonymous) crop_xoffset
+ 0
+vcl/source/filter/jpeg/transupp.h:149
+ (anonymous) crop_yoffset
+ 0
+vcl/source/filter/wmf/wmfwr.hxx:78
+ WMFWriter bSrcIsClipping
+ 0
vcl/source/font/font.cxx:539
(anonymous namespace)::WeightSearchEntry weight
5
@@ -211,18 +448,30 @@ vcl/source/gdi/dibtools.cxx:117
vcl/source/gdi/dibtools.cxx:118
(anonymous namespace)::DIBV5Header nV5Reserved
0
-vcl/source/gdi/pdfwriter_impl.hxx:698
- vcl::PDFWriterImpl m_nInheritedPageWidth
- 595
-vcl/source/gdi/pdfwriter_impl.hxx:699
- vcl::PDFWriterImpl m_nInheritedPageHeight
- 842
-writerfilter/source/dmapper/GraphicImport.cxx:208
+vcl/source/window/status.cxx:53
+ StatusBar::ImplData mbDrawItemFrames
+ 0
+vcl/unx/generic/print/bitmap_gfx.cxx:281
+ psp::LZWEncoder mnClearCode
+ 256
+writerfilter/source/dmapper/GraphicImport.cxx:207
writerfilter::dmapper::GraphicImport_Impl nCurrentBorderLine
2
+writerfilter/source/dmapper/NumberingManager.hxx:47
+ writerfilter::dmapper::ListLevel m_nJC
+ -1
+writerfilter/source/dmapper/PropertyMap.hxx:232
+ writerfilter::dmapper::SectionPropertyMap m_nFirstPaperBin
+ -1
+writerfilter/source/dmapper/PropertyMap.hxx:402
+ writerfilter::dmapper::ParagraphProperties m_bAnchorLock
+ 0
writerfilter/source/rtftok/rtfdocumentimpl.hxx:620
writerfilter::rtftok::RTFDocumentImpl m_nNestedTRLeft
0
writerfilter/source/rtftok/rtfdocumentimpl.hxx:621
writerfilter::rtftok::RTFDocumentImpl m_nTopLevelTRLeft
0
+writerfilter/source/rtftok/rtfdocumentimpl.hxx:624
+ writerfilter::rtftok::RTFDocumentImpl m_nNestedCurrentCellX
+ 0
diff --git a/compilerplugins/clang/unusedfields.cxx b/compilerplugins/clang/unusedfields.cxx
index bcb2db202cec..d11cfa7914cb 100644
--- a/compilerplugins/clang/unusedfields.cxx
+++ b/compilerplugins/clang/unusedfields.cxx
@@ -391,7 +391,7 @@ bool UnusedFields::TraverseCXXMethodDecl(CXXMethodDecl* cxxMethodDecl)
{
if (cxxMethodDecl->isCopyAssignmentOperator()
|| cxxMethodDecl->isMoveAssignmentOperator()
- || (cxxMethodDecl->getIdentifier() && cxxMethodDecl->getName() == "Clone"))
+ || (cxxMethodDecl->getIdentifier() && (cxxMethodDecl->getName().startswith("Clone") || cxxMethodDecl->getName().startswith("clone"))))
insideMoveOrCopyOrCloneDeclParent = cxxMethodDecl->getParent();
}
insideFunctionDecl = cxxMethodDecl;
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index 03ff6372ed9c..0ca4b1712ea9 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -359,20 +359,10 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
{
if (_rError.getResId() != nullptr)
{
- OSL_ENSURE( ( _rError.getErrorCondition() == 0 ),
- "OConnection::throwSQLException: unsupported error code combination!" );
-
throwGenericSQLException( _rError.getResId(), _rxContext );
OSL_FAIL( "OConnection::throwSQLException: unreachable (2)!" );
}
- if ( _rError.getErrorCondition() != 0 )
- {
- SQLError aErrorHelper;
- aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext);
- OSL_FAIL( "OConnection::throwSQLException: unreachable (3)!" );
- }
-
throwGenericSQLException( STR_UNSPECIFIED_ERROR, _rxContext );
}
diff --git a/connectivity/source/drivers/mork/MErrorResource.hxx b/connectivity/source/drivers/mork/MErrorResource.hxx
index f8ab0a7ef983..0691b18134f4 100644
--- a/connectivity/source/drivers/mork/MErrorResource.hxx
+++ b/connectivity/source/drivers/mork/MErrorResource.hxx
@@ -28,12 +28,10 @@ namespace connectivity
{
private:
const char* m_pErrorResourceId;
- sal_Int32 m_nErrorCondition;
public:
ErrorDescriptor()
:m_pErrorResourceId(nullptr)
- ,m_nErrorCondition(0)
{
}
@@ -44,13 +42,11 @@ namespace connectivity
void reset()
{
m_pErrorResourceId = nullptr;
- m_nErrorCondition = 0;
}
const char* getResId() const { return m_pErrorResourceId; }
- sal_Int32 getErrorCondition() const { return m_nErrorCondition; }
- bool is() const { return ( m_pErrorResourceId != nullptr ) || ( m_nErrorCondition != 0 ); }
+ bool is() const { return m_pErrorResourceId != nullptr; }
};
}
}
diff --git a/cppcanvas/source/mtfrenderer/emfpregion.cxx b/cppcanvas/source/mtfrenderer/emfpregion.cxx
index 545cf0ac404e..4a45d4a2a9fe 100644
--- a/cppcanvas/source/mtfrenderer/emfpregion.cxx
+++ b/cppcanvas/source/mtfrenderer/emfpregion.cxx
@@ -49,10 +49,6 @@ namespace cppcanvas
EMFPRegion::EMFPRegion()
: parts(0)
, initialState(0)
- , ix(0.0)
- , iy(0.0)
- , iw(0.0)
- , ih(0.0)
{
}
diff --git a/cppcanvas/source/mtfrenderer/emfpregion.hxx b/cppcanvas/source/mtfrenderer/emfpregion.hxx
index 5df1639f63d1..8d929d6dd433 100644
--- a/cppcanvas/source/mtfrenderer/emfpregion.hxx
+++ b/cppcanvas/source/mtfrenderer/emfpregion.hxx
@@ -29,7 +29,6 @@ namespace cppcanvas
sal_Int32 parts;
std::unique_ptr<sal_Int32[]> combineMode;
sal_Int32 initialState;
- float ix, iy, iw, ih;
EMFPRegion();
virtual ~EMFPRegion() override;
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index f8514bb53a08..ab2ba01378db 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -302,6 +302,8 @@ ACFlags SvxAutoCorrect::GetDefaultFlags()
return nRet;
}
+static constexpr sal_Unicode cEmDash = 0x2014;
+static constexpr sal_Unicode cEnDash = 0x2013;
SvxAutoCorrect::SvxAutoCorrect( const OUString& rShareAutocorrFile,
const OUString& rUserAutocorrFile )
@@ -313,8 +315,6 @@ SvxAutoCorrect::SvxAutoCorrect( const OUString& rShareAutocorrFile,
, cEndDQuote( 0 )
, cStartSQuote( 0 )
, cEndSQuote( 0 )
- , cEmDash( 0x2014 )
- , cEnDash( 0x2013)
{
}
@@ -328,8 +328,6 @@ SvxAutoCorrect::SvxAutoCorrect( const SvxAutoCorrect& rCpy )
, cEndDQuote( rCpy.cEndDQuote )
, cStartSQuote( rCpy.cStartSQuote )
, cEndSQuote( rCpy.cEndSQuote )
- , cEmDash( rCpy.cEmDash )
- , cEnDash( rCpy.cEnDash )
{
}
@@ -536,10 +534,10 @@ bool SvxAutoCorrect::FnChgToEnEmDash(
CharClass& rCC = GetCharClass( eLang );
if (eLang == LANGUAGE_SYSTEM)
eLang = GetAppLang().getLanguageType();
- bool bAlwaysUseEmDash = (cEmDash && (eLang == LANGUAGE_RUSSIAN || eLang == LANGUAGE_UKRAINIAN));
+ bool bAlwaysUseEmDash = (eLang == LANGUAGE_RUSSIAN || eLang == LANGUAGE_UKRAINIAN);
// replace " - " or " --" with "enDash"
- if( cEnDash && 1 < nSttPos && 1 <= nEndPos - nSttPos )
+ if( 1 < nSttPos && 1 <= nEndPos - nSttPos )
{
sal_Unicode cCh = rTxt[ nSttPos ];
if( '-' == cCh )
@@ -611,7 +609,7 @@ bool SvxAutoCorrect::FnChgToEnEmDash(
// [0-9]--[0-9] double dash always replaced with "enDash"
// Finnish and Hungarian use enDash instead of emDash.
bool bEnDash = (eLang == LANGUAGE_HUNGARIAN || eLang == LANGUAGE_FINNISH);
- if( ((cEmDash && !bEnDash) || (cEnDash && bEnDash)) && 4 <= nEndPos - nSttPos )
+ if( 4 <= nEndPos - nSttPos )
{
OUString sTmp( rTxt.copy( nSttPos, nEndPos - nSttPos ) );
sal_Int32 nFndPos = sTmp.indexOf("--");
@@ -1259,8 +1257,8 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
bool bSttQuote = !nInsPos ||
NonFieldWordDelim( ( cPrev = rTxt[ nInsPos-1 ])) ||
lcl_IsInAsciiArr( "([{", cPrev ) ||
- ( cEmDash && cEmDash == cPrev ) ||
- ( cEnDash && cEnDash == cPrev );
+ ( cEmDash == cPrev ) ||
+ ( cEnDash == cPrev );
InsertQuote( rDoc, nInsPos, cChar, bSttQuote, bInsert );
break;
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index e5b8aa047d3e..8d5c5fa8a827 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -2184,7 +2184,10 @@ namespace emfio
mbClipNeedsUpdate = true;
}
if ( meLatestRasterOp != meRasterOp )
+ {
mpGDIMetaFile->AddAction( new MetaRasterOpAction( meRasterOp ) );
+ meLatestRasterOp = meRasterOp;
+ }
mvSaveStack.pop_back();
}
}
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index eef992866844..e1d686c5e8c3 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -32,10 +32,11 @@
using namespace ::com::sun::star;
+static constexpr double gnOutdx = 28000; // Output size in 1/100TH mm
+static constexpr double gnOutdy = 21000; // on which is mapped
+
CGM::CGM(uno::Reference< frame::XModel > const & rModel)
- : mnOutdx(28000)
- , mnOutdy(21000)
- , mnVDCXadd(0)
+ : mnVDCXadd(0)
, mnVDCYadd(0)
, mnVDCXmul(0)
, mnVDCYmul(0)
@@ -396,23 +397,23 @@ void CGM::ImplSetMapMode()
else
mbAngReverse = false;
- if (mnVDCdy == 0.0 || mnVDCdx == 0.0 || mnOutdy == 0.0)
+ if (mnVDCdy == 0.0 || mnVDCdx == 0.0 || gnOutdy == 0.0)
{
mbStatus = false;
return;
}
double fQuo1 = mnVDCdx / mnVDCdy;
- double fQuo2 = mnOutdx / mnOutdy;
+ double fQuo2 = gnOutdx / gnOutdy;
if ( fQuo2 < fQuo1 )
{
- mnXFraction = mnOutdx / mnVDCdx;
- mnYFraction = mnOutdy * ( fQuo2 / fQuo1 ) / mnVDCdy;
+ mnXFraction = gnOutdx / mnVDCdx;
+ mnYFraction = gnOutdy * ( fQuo2 / fQuo1 ) / mnVDCdy;
}
else
{
- mnXFraction = mnOutdx * ( fQuo1 / fQuo2 ) / mnVDCdx;
- mnYFraction = mnOutdy / mnVDCdy;
+ mnXFraction = gnOutdx * ( fQuo1 / fQuo2 ) / mnVDCdx;
+ mnYFraction = gnOutdy / mnVDCdy;
}
}
diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index 8ecbec12998c..388b5eea3dcc 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -44,8 +44,6 @@ class CGM
friend class CGMElements;
friend class CGMImpressOutAct;
- double mnOutdx; // Output size in 1/100TH mm
- double mnOutdy; // on which is mapped
double mnVDCXadd;
double mnVDCYadd;
double mnVDCXmul;
diff --git a/filter/source/graphicfilter/icgm/class1.cxx b/filter/source/graphicfilter/icgm/class1.cxx
index b8eabf83f04d..a828c919695b 100644
--- a/filter/source/graphicfilter/icgm/class1.cxx
+++ b/filter/source/graphicfilter/icgm/class1.cxx
@@ -146,17 +146,7 @@ void CGM::ImplDoClass1()
break;
case 0x0a : /*Color Value Extent*/
{
- if ( pElement->eColorModel == CM_RGB )
- nI1 = 6;
- else
- {
- nI1 = 8;
- mbStatus = false; // CMYK is not supported
- }
- for ( nI0 = 0; nI0 < nI1; nI0++ )
- {
- pElement->nColorValueExtent[ nI0 ] = static_cast<sal_uInt8>(ImplGetUI( pElement->nColorPrecision ));
- }
+ nI1 = 6;
}
break;
case 0x0b : /*MetaFile Element List */break;
diff --git a/filter/source/graphicfilter/icgm/elements.cxx b/filter/source/graphicfilter/icgm/elements.cxx
index 4449785988e4..8d324b68340c 100644
--- a/filter/source/graphicfilter/icgm/elements.cxx
+++ b/filter/source/graphicfilter/icgm/elements.cxx
@@ -62,7 +62,6 @@ CGMElements& CGMElements::operator=( const CGMElements& rSource )
eClipIndicator = rSource.eClipIndicator;
aClipRect = rSource.aClipRect;
eColorSelectionMode = rSource.eColorSelectionMode;
- eColorModel = rSource.eColorModel;
nColorMaximumIndex = rSource.nColorMaximumIndex;
nLatestColorMaximumIndex = rSource.nLatestColorMaximumIndex;
@@ -165,7 +164,6 @@ void CGMElements::Init()
aClipRect = aVDCExtent;
eColorSelectionMode = CSM_INDEXED;
- eColorModel = CM_RGB;
nColorMaximumIndex = 63;
int i;
for ( i = 0; i < 256; aColorTableEntryIs[ i++ ] = 0 ) ;
diff --git a/filter/source/graphicfilter/icgm/elements.hxx b/filter/source/graphicfilter/icgm/elements.hxx
index bfcba6156416..e7f0e9ca64d0 100644
--- a/filter/source/graphicfilter/icgm/elements.hxx
+++ b/filter/source/graphicfilter/icgm/elements.hxx
@@ -64,7 +64,6 @@ class CGMElements
FloatRect aClipRect;
ColorSelectionMode eColorSelectionMode;
- ColorModel eColorModel;
sal_uInt32 nColorMaximumIndex; // default 63
sal_uInt32 nLatestColorMaximumIndex; // default 63
sal_Int8 aColorTableEntryIs[ 256 ];
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 50a988274cff..e5f312b743e0 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -117,7 +117,6 @@ DXFLineInfo DXF2GDIMetaFile::GetEntityDXFLineInfo(const DXFBasicEntity & rE)
DXFLineInfo aDXFLineInfo;
aDXFLineInfo.eStyle = LineStyle::Solid;
- aDXFLineInfo.fWidth = 0;
aDXFLineInfo.nDashCount = 0;
aDXFLineInfo.fDashLen = 0;
aDXFLineInfo.nDotCount = 0;
@@ -789,7 +788,6 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
nBlockColor=7;
aBlockDXFLineInfo.eStyle = LineStyle::Solid;
- aBlockDXFLineInfo.fWidth = 0;
aBlockDXFLineInfo.nDashCount = 0;
aBlockDXFLineInfo.fDashLen = 0;
aBlockDXFLineInfo.nDotCount = 0;
@@ -804,7 +802,6 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
else {
nParentLayerColor=7;
aParentLayerDXFLineInfo.eStyle = LineStyle::Solid;
- aParentLayerDXFLineInfo.fWidth = 0;
aParentLayerDXFLineInfo.nDashCount = 0;
aParentLayerDXFLineInfo.fDashLen = 0;
aParentLayerDXFLineInfo.nDotCount = 0;
diff --git a/filter/source/graphicfilter/idxf/dxfvec.cxx b/filter/source/graphicfilter/idxf/dxfvec.cxx
index b49edff2c8fe..e0189c3eca51 100644
--- a/filter/source/graphicfilter/idxf/dxfvec.cxx
+++ b/filter/source/graphicfilter/idxf/dxfvec.cxx
@@ -205,7 +205,7 @@ LineInfo DXFTransform::Transform(const DXFLineInfo& aDXFLineInfo) const
LineInfo aLineInfo;
aLineInfo.SetStyle( aDXFLineInfo.eStyle );
- aLineInfo.SetWidth( static_cast<sal_Int32>(aDXFLineInfo.fWidth * scale + 0.5) );
+ aLineInfo.SetWidth( 0 );
aLineInfo.SetDashCount( static_cast< sal_uInt16 >( aDXFLineInfo.nDashCount ) );
aLineInfo.SetDashLen( static_cast<sal_Int32>(aDXFLineInfo.fDashLen * scale + 0.5) );
aLineInfo.SetDotCount( static_cast< sal_uInt16 >( aDXFLineInfo.nDotCount ) );
diff --git a/filter/source/graphicfilter/idxf/dxfvec.hxx b/filter/source/graphicfilter/idxf/dxfvec.hxx
index 6dd5f3de5eaf..3260999fe981 100644
--- a/filter/source/graphicfilter/idxf/dxfvec.hxx
+++ b/filter/source/graphicfilter/idxf/dxfvec.hxx
@@ -28,7 +28,6 @@ class Point;
class DXFLineInfo {
public:
LineStyle eStyle;
- double fWidth;
sal_Int32 nDashCount;
double fDashLen;
sal_Int32 nDotCount;
@@ -37,7 +36,6 @@ public:
DXFLineInfo() :
eStyle(LineStyle::Solid),
- fWidth(0),
nDashCount(0),
fDashLen(0),
nDotCount(0),
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 336a2c23b95f..5dc0e5fbc158 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -243,8 +243,7 @@ class EDITENG_DLLPUBLIC SvxAutoCorrect
LanguageType eCharClassLang;
ACFlags nFlags;
- sal_Unicode cStartDQuote, cEndDQuote, cStartSQuote, cEndSQuote,
- cEmDash, cEnDash;
+ sal_Unicode cStartDQuote, cEndDQuote, cStartSQuote, cEndSQuote;
// private methods
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index f6e56bec7728..b0fa04302f36 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -446,14 +446,7 @@ class SVT_DLLPUBLIC FontSizeBox : public MetricBox
{
FontMetric aFontMetric;
const FontList* pFontList;
- sal_uInt16 nRelMin;
- sal_uInt16 nRelMax;
- sal_uInt16 nRelStep;
- short nPtRelMin;
- short nPtRelMax;
- short nPtRelStep;
- bool bRelativeMode:1,
- bRelative:1,
+ bool bRelative:1,
bPtRelative:1,
bStdSize:1;
@@ -461,19 +454,15 @@ class SVT_DLLPUBLIC FontSizeBox : public MetricBox
SVT_DLLPRIVATE void ImplInit();
protected:
- virtual OUString CreateFieldText( sal_Int64 nValue ) const override;
virtual sal_Int64 GetValueFromStringUnit(const OUString& rStr, FieldUnit eOutUnit) const override;
public:
FontSizeBox( vcl::Window* pParent, WinBits nWinStyle );
void Reformat() override;
- void Modify() override;
void Fill( const FontMetric* pFontMetric, const FontList* pList );
- void SetRelative( bool bRelative );
-
virtual void SetValue( sal_Int64 nNewValue, FieldUnit eInUnit ) override;
virtual void SetValue( sal_Int64 nNewValue ) override;
diff --git a/include/tools/b3dtrans.hxx b/include/tools/b3dtrans.hxx
index cf35192e757b..181f43ca7bce 100644
--- a/include/tools/b3dtrans.hxx
+++ b/include/tools/b3dtrans.hxx
@@ -58,10 +58,6 @@ private:
double mfBottomBound;
double mfTopBound;
- // Near and far clipping planes
- double mfNearBound;
- double mfFarBound;
-
// Aspect ratio of 3D transformation (Y / X)
// default: 1:1 -> 1.0
// Disable with value 0.0
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 7f875fc3cc05..579f37625225 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -74,8 +74,7 @@ class DicEvtListenerHelper :
uno::Reference< XDictionaryList > xMyDicList;
sal_Int16 nCondensedEvt;
- sal_Int16 nNumCollectEvtListeners,
- nNumVerboseListeners;
+ sal_Int16 nNumCollectEvtListeners;
public:
explicit DicEvtListenerHelper( const uno::Reference< XDictionaryList > &rxDicList );
@@ -109,7 +108,7 @@ DicEvtListenerHelper::DicEvtListenerHelper(
xMyDicList ( rxDicList )
{
nCondensedEvt = 0;
- nNumCollectEvtListeners = nNumVerboseListeners = 0;
+ nNumCollectEvtListeners = 0;
}
@@ -194,12 +193,6 @@ void SAL_CALL DicEvtListenerHelper::processDictionaryEvent(
DictionaryListEventFlags::DEACTIVATE_NEG_DIC :
DictionaryListEventFlags::DEACTIVATE_POS_DIC;
- // update list of collected events if needs to be
- if (nNumVerboseListeners > 0)
- {
- aCollectDicEvt.push_back(rDicEvent);
- }
-
if (nNumCollectEvtListeners == 0 && nCondensedEvt != 0)
FlushEvents();
}
@@ -242,8 +235,6 @@ sal_Int16 DicEvtListenerHelper::FlushEvents()
{
// build DictionaryListEvent to pass on to listeners
uno::Sequence< DictionaryEvent > aDicEvents;
- if (nNumVerboseListeners > 0)
- aDicEvents = comphelper::containerToSequence(aCollectDicEvt);
DictionaryListEvent aEvent( xMyDicList, nCondensedEvt, aDicEvents );
// pass on event
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index 7a2f80ef5fbc..de4f83c73121 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -222,12 +222,6 @@ ConvErr ExcelToSc::Convert( std::unique_ptr<ScTokenArray>& pResult, XclImpStream
ScComplexRefData aCRD;
ExtensionTypeVec aExtensions;
- if( eStatus != ConvErr::OK )
- {
- aIn.Ignore( nFormulaLen );
- return eStatus;
- }
-
if( nFormulaLen == 0 )
{
aPool.Store( OUString("-/-") );
@@ -915,12 +909,6 @@ ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, std:
aCRD.Ref1.SetAbsTab(aEingPos.Tab());
aCRD.Ref2.SetAbsTab(aEingPos.Tab());
- if( eStatus != ConvErr::OK )
- {
- aIn.Ignore( nFormulaLen );
- return eStatus;
- }
-
if( nFormulaLen == 0 )
return ConvErr::OK;
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 6cec86f94b11..e3eda3cfd5de 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -150,12 +150,6 @@ ConvErr ExcelToSc8::Convert( std::unique_ptr<ScTokenArray>& rpTokArray, XclImpSt
ScComplexRefData aCRD;
ExtensionTypeVec aExtensions;
- if( eStatus != ConvErr::OK )
- {
- aIn.Ignore( nFormulaLen );
- return eStatus;
- }
-
if( nFormulaLen == 0 )
{
aPool.Store( OUString( "-/-" ) );
@@ -967,12 +961,6 @@ ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, std
ScSingleRefData aSRD;
ScComplexRefData aCRD;
- if( eStatus != ConvErr::OK )
- {
- aIn.Ignore( nFormulaLen );
- return eStatus;
- }
-
if( nFormulaLen == 0 )
return ConvErr::OK;
@@ -1311,12 +1299,6 @@ void ExcelToSc8::ConvertExternName( std::unique_ptr<ScTokenArray>& rpArray, XclI
ScSingleRefData aSRD;
ScComplexRefData aCRD;
- if (eStatus != ConvErr::OK)
- {
- rStrm.Ignore(nFormulaLen);
- return;
- }
-
if (nFormulaLen == 0)
{
aPool.Store(OUString("-/-"));
diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx
index a3c01350fced..465025a349cd 100644
--- a/sc/source/filter/excel/frmbase.cxx
+++ b/sc/source/filter/excel/frmbase.cxx
@@ -151,8 +151,7 @@ const ScRange* ScRangeListTabs::Next ()
ConverterBase::ConverterBase( svl::SharedStringPool& rSPool, sal_uInt16 nNewBuffer ) :
aPool(rSPool),
- aEingPos( 0, 0, 0 ),
- eStatus( ConvErr::OK )
+ aEingPos( 0, 0, 0 )
{
OSL_ENSURE( nNewBuffer > 0, "ConverterBase::ConverterBase - nNewBuffer == 0!" );
pBuffer.reset( new sal_Char[ nNewBuffer ] );
@@ -164,7 +163,6 @@ ConverterBase::~ConverterBase()
void ConverterBase::Reset()
{
- eStatus = ConvErr::OK;
aPool.Reset();
aStack.Reset();
}
diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx
index ff6fd422448d..bda80896809e 100644
--- a/sc/source/filter/inc/formel.hxx
+++ b/sc/source/filter/inc/formel.hxx
@@ -79,7 +79,6 @@ protected:
TokenPool aPool; // user token + predefined token
TokenStack aStack;
ScAddress aEingPos;
- ConvErr eStatus;
std::unique_ptr<sal_Char[]>
pBuffer; // universal buffer
diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
index fab565c07883..6c9d4edaf176 100644
--- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
@@ -54,7 +54,6 @@ VisibleAreaManager::VisibleAreaManager (SlideSorter& rSlideSorter)
maVisibleRequests(),
mnScrollAnimationId(Animator::NotAnAnimationId),
maRequestedVisibleTopLeft(),
- meRequestedAnimationMode(Animator::AM_Immediate),
mbIsCurrentSlideTrackingActive(true),
mnDisableCount(0)
{
@@ -131,19 +130,8 @@ void VisibleAreaManager::MakeVisible()
mrSlideSorter,
aCurrentTopLeft,
maRequestedVisibleTopLeft);
- if (meRequestedAnimationMode==Animator::AM_Animated
- && mrSlideSorter.GetProperties()->IsSmoothSelectionScrolling())
- {
- mnScrollAnimationId = mrSlideSorter.GetController().GetAnimator()->AddAnimation(
- aAnimation,
- Animator::FinishFunctor());
- }
- else
- {
- // Execute the animation at its final value.
- aAnimation(1.0);
- }
- meRequestedAnimationMode = Animator::AM_Immediate;
+ // Execute the animation at its final value.
+ aAnimation(1.0);
}
::boost::optional<Point> VisibleAreaManager::GetRequestedTopLeft() const
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
index aea0888fd214..537434b2a198 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
@@ -78,7 +78,6 @@ private:
*/
Animator::AnimationId mnScrollAnimationId;
Point maRequestedVisibleTopLeft;
- Animator::AnimationMode meRequestedAnimationMode;
bool mbIsCurrentSlideTrackingActive;
int mnDisableCount;
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 6efb5c2a9777..4044ad61da84 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1261,7 +1261,6 @@ void FontSizeBox::ImplInit()
{
EnableAutocomplete( false );
- bRelativeMode = false;
bPtRelative = false;
bRelative = false;
bStdSize = false;
@@ -1277,69 +1276,14 @@ void FontSizeBox::ImplInit()
void FontSizeBox::Reformat()
{
FontSizeNames aFontSizeNames( GetSettings().GetUILanguageTag().getLanguageType() );
- if ( !bRelativeMode || !aFontSizeNames.IsEmpty() )
+ long nNewValue = aFontSizeNames.Name2Size( GetText() );
+ if ( nNewValue)
{
- long nNewValue = aFontSizeNames.Name2Size( GetText() );
- if ( nNewValue)
- {
- mnLastValue = nNewValue;
- return;
- }
- }
-
- MetricBox::Reformat();
-}
-
-void FontSizeBox::Modify()
-{
- MetricBox::Modify();
-
- if ( !bRelativeMode )
+ mnLastValue = nNewValue;
return;
-
- OUString aStr = comphelper::string::stripStart(GetText(), ' ');
-
- bool bNewMode = bRelative;
- bool bOldPtRelMode = bPtRelative;
-
- if ( bRelative )
- {
- bPtRelative = false;
- const sal_Unicode* pStr = aStr.getStr();
- while ( *pStr )
- {
- if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') && !unicode::isSpace(*pStr) )
- {
- if ( ('-' == *pStr || '+' == *pStr) && !bPtRelative )
- bPtRelative = true;
- else if ( bPtRelative && 'p' == *pStr && 't' == *++pStr )
- ;
- else
- {
- bNewMode = false;
- break;
- }
- }
- pStr++;
- }
- }
- else if (!aStr.isEmpty())
- {
- if ( -1 != aStr.indexOf('%') )
- {
- bNewMode = true;
- bPtRelative = false;
- }
-
- if ( '-' == aStr[0] || '+' == aStr[0] )
- {
- bNewMode = true;
- bPtRelative = true;
- }
}
- if ( bNewMode != bRelative || bPtRelative != bOldPtRelMode )
- SetRelative( bNewMode );
+ MetricBox::Reformat();
}
void FontSizeBox::Fill( const FontMetric* pFontMetric, const FontList* pList )
@@ -1430,78 +1374,6 @@ void FontSizeBox::Fill( const FontMetric* pFontMetric, const FontList* pList )
SetSelection( aSelection );
}
-void FontSizeBox::SetRelative( bool bNewRelative )
-{
- if ( !bRelativeMode )
- return;
-
- Selection aSelection = GetSelection();
- OUString aStr = comphelper::string::stripStart(GetText(), ' ');
-
- if ( bNewRelative )
- {
- bRelative = true;
- bStdSize = false;
-
- if ( bPtRelative )
- {
- Clear(); //clear early because SetDecimalDigits is a slow recalc
-
- SetDecimalDigits( 1 );
- SetMin( nPtRelMin );
- SetMax( nPtRelMax );
- SetUnit( FUNIT_POINT );
-
- short i = nPtRelMin, n = 0;
- // JP 30.06.98: more than 100 values are not useful
- while ( i <= nPtRelMax && n++ < 100 )
- {
- InsertValue( i );
- i = i + nPtRelStep;
- }
- }
- else
- {
- Clear(); //clear early because SetDecimalDigits is a slow recalc
-
- SetDecimalDigits( 0 );
- SetMin( nRelMin );
- SetMax( nRelMax );
- SetUnit( FUNIT_PERCENT );
-
- sal_uInt16 i = nRelMin;
- while ( i <= nRelMax )
- {
- InsertValue( i );
- i = i + nRelStep;
- }
- }
- }
- else
- {
- if (pFontList)
- Clear(); //clear early because SetDecimalDigits is a slow recalc
- bRelative = bPtRelative = false;
- SetDecimalDigits( 1 );
- SetMin( 20 );
- SetMax( 9999 );
- SetUnit( FUNIT_POINT );
- if ( pFontList )
- Fill( &aFontMetric, pFontList );
- }
-
- SetText( aStr );
- SetSelection( aSelection );
-}
-
-OUString FontSizeBox::CreateFieldText( sal_Int64 nValue ) const
-{
- OUString sRet( MetricBox::CreateFieldText( nValue ) );
- if ( bRelativeMode && bPtRelative && (0 <= nValue) && !sRet.isEmpty() )
- sRet = "+" + sRet;
- return sRet;
-}
-
void FontSizeBox::SetValue( sal_Int64 nNewValue, FieldUnit eInUnit )
{
if ( !bRelative )
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index ef008593cc7e..229f82329a94 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -63,10 +63,7 @@ public:
m_bPrintProspectRTL,
m_bPrintSingleJobs, m_bPaperFromSetup,
/// Print empty pages
- m_bPrintEmptyPages,
-
- /// #i56195# no field update while printing mail merge documents
- m_bUpdateFieldsInPrinting;
+ m_bPrintEmptyPages;
SwPostItMode m_nPrintPostIts;
OUString m_sFaxName;
@@ -82,8 +79,7 @@ public:
m_bPrintLeftPages =
m_bPrintRightPages =
m_bPrintPageBackground =
- m_bPrintEmptyPages =
- m_bUpdateFieldsInPrinting = true;
+ m_bPrintEmptyPages = true;
m_bPaperFromSetup =
m_bPrintReverse =
@@ -121,7 +117,6 @@ public:
m_bPrintSingleJobs == rData.m_bPrintSingleJobs &&
m_bPaperFromSetup == rData.m_bPaperFromSetup &&
m_bPrintEmptyPages == rData.m_bPrintEmptyPages &&
- m_bUpdateFieldsInPrinting == rData.m_bUpdateFieldsInPrinting &&
m_nPrintPostIts == rData.m_nPrintPostIts &&
m_sFaxName == rData.m_sFaxName &&
m_bPrintHiddenText == rData.m_bPrintHiddenText &&
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx
index f892b11a5154..99aee062eafc 100644
--- a/tools/source/generic/b3dtrans.cxx
+++ b/tools/source/generic/b3dtrans.cxx
@@ -21,6 +21,11 @@
#include <osl/diagnose.h>
+ // Near and far clipping planes
+static constexpr double gfNearBound = 0.001;
+static constexpr double gfFarBound = 1.001;
+
+
// B3dTransformationSet --------------------------------------------------------
// Transformations for all 3D output
@@ -142,8 +147,6 @@ void B3dTransformationSet::Reset()
mfLeftBound = mfBottomBound = -1.0;
mfRightBound = mfTopBound = 1.0;
- mfNearBound = 0.001;
- mfFarBound = 1.001;
mfRatio = 0.0;
@@ -250,16 +253,16 @@ void B3dTransformationSet::CalcViewport()
// OpenGL needs a little more rough additional size to not let
// the front face vanish. Changed from SMALL_DVALUE to 0.000001,
// which is 1/10000th, comared with 1/tenth of a million from SMALL_DVALUE.
- const double fDistPart((mfFarBound - mfNearBound) * 0.0001);
+ const double fDistPart((gfFarBound - gfNearBound) * 0.0001);
// To avoid critical clipping, set Near & Far generously
if(mbPerspective)
{
- Frustum(aNewProjection, fLeft, fRight, fBottom, fTop, mfNearBound - fDistPart, mfFarBound + fDistPart);
+ Frustum(aNewProjection, fLeft, fRight, fBottom, fTop, gfNearBound - fDistPart, gfFarBound + fDistPart);
}
else
{
- Ortho(aNewProjection, fLeft, fRight, fBottom, fTop, mfNearBound - fDistPart, mfFarBound + fDistPart);
+ Ortho(aNewProjection, fLeft, fRight, fBottom, fTop, gfNearBound - fDistPart, gfFarBound + fDistPart);
}
// Set to true to guarantee loop termination
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 169f6e6455aa..a9ee7f1cc274 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -56,7 +56,6 @@ struct ImplConfigData
OUString maFileName;
sal_uInt32 mnDataUpdateId;
sal_uInt32 mnTimeStamp;
- LineEnd meLineEnd;
bool mbModified;
bool mbRead;
bool mbIsUTF8BOM;
@@ -373,22 +372,9 @@ static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uInt32&
sal_uInt32 nKeyLen;
sal_uInt32 nLineEndLen;
- if ( pData->meLineEnd == LINEEND_CR )
- {
- aLineEndBuf[0] = '\r';
- nLineEndLen = 1;
- }
- else if ( pData->meLineEnd == LINEEND_LF )
- {
- aLineEndBuf[0] = '\n';
- nLineEndLen = 1;
- }
- else
- {
- aLineEndBuf[0] = '\r';
- aLineEndBuf[1] = '\n';
- nLineEndLen = 2;
- }
+ aLineEndBuf[0] = '\r';
+ aLineEndBuf[1] = '\n';
+ nLineEndLen = 2;
nBufLen = 0;
pGroup = pData->mpFirstGroup;
@@ -584,7 +570,6 @@ static std::unique_ptr<ImplConfigData> ImplGetConfigData( const OUString& rFileN
pData->maFileName = rFileName;
pData->mpFirstGroup = nullptr;
pData->mnDataUpdateId = 0;
- pData->meLineEnd = LINEEND_CRLF;
pData->mbRead = false;
pData->mbIsUTF8BOM = false;
ImplReadConfig( pData.get() );
diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
index 67939f3b4126..47aad2a694a6 100644
--- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx
@@ -44,6 +44,7 @@ using namespace com::sun::star;
// DAVAuthListener_Impl Implementation.
+static constexpr sal_uInt32 g_nRedirectLimit = 5;
// virtual
int DAVAuthListener_Impl::authenticate(
@@ -131,8 +132,7 @@ DAVResourceAccess::DAVResourceAccess(
const OUString & rURL )
: m_aURL( rURL ),
m_xSessionFactory( rSessionFactory ),
- m_xContext( rxContext ),
- m_nRedirectLimit( 5 )
+ m_xContext( rxContext )
{
}
@@ -144,8 +144,7 @@ DAVResourceAccess::DAVResourceAccess( const DAVResourceAccess & rOther )
m_xSession( rOther.m_xSession ),
m_xSessionFactory( rOther.m_xSessionFactory ),
m_xContext( rOther.m_xContext ),
- m_aRedirectURIs( rOther.m_aRedirectURIs ),
- m_nRedirectLimit( rOther.m_nRedirectLimit )
+ m_aRedirectURIs( rOther.m_aRedirectURIs )
{
}
@@ -160,7 +159,6 @@ DAVResourceAccess & DAVResourceAccess::operator=(
m_xSessionFactory = rOther.m_xSessionFactory;
m_xContext = rOther.m_xContext;
m_aRedirectURIs = rOther.m_aRedirectURIs;
- m_nRedirectLimit = rOther.m_nRedirectLimit;
return *this;
}
@@ -1126,7 +1124,7 @@ bool DAVResourceAccess::detectRedirectCycle(
// A pratical limit may be 5, due to earlier specifications:
// <https://tools.ietf.org/html/rfc2068#section-10.3>
// it can be raised keeping in mind the added net activity.
- if( static_cast< size_t >( m_nRedirectLimit ) <= m_aRedirectURIs.size() )
+ if( static_cast< size_t >( g_nRedirectLimit ) <= m_aRedirectURIs.size() )
return true;
// try to detect a cyclical redirection
diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx
index be1191b0974d..09d0a88b7be0 100644
--- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx
+++ b/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx
@@ -62,7 +62,6 @@ class DAVResourceAccess
rtl::Reference< DAVSessionFactory > m_xSessionFactory;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
std::vector< NeonUri > m_aRedirectURIs;
- sal_uInt32 m_nRedirectLimit;
public:
DAVResourceAccess( const css::uno::Reference< css::uno::XComponentContext > & rxContext,
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index f2f4761d5cea..1e070a3e2a2c 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -204,7 +204,6 @@ public:
drawing::ColorMode eColorMode;
GraphicBorderLine aBorders[4];
- sal_Int32 nCurrentBorderLine;
bool bIsGraphic;
@@ -259,7 +258,6 @@ public:
,nContrast(0)
,nBrightness(0)
,eColorMode( drawing::ColorMode_STANDARD )
- ,nCurrentBorderLine(BORDER_TOP)
,bIsGraphic(false)
,bSizeProtected(false)
,bPositionProtected(false)
@@ -490,7 +488,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
//border properties
case NS_ooxml::LN_CT_Border_sz:
- m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineWidth = nIntValue;
+ m_pImpl->aBorders[BORDER_TOP].nLineWidth = nIntValue;
break;
case NS_ooxml::LN_CT_Border_val:
//graphic borders don't support different line types
@@ -498,7 +496,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
case NS_ooxml::LN_CT_Border_space:
break;
case NS_ooxml::LN_CT_Border_shadow:
- m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].bHasShadow = nIntValue != 0;
+ m_pImpl->aBorders[BORDER_TOP].bHasShadow = nIntValue != 0;
break;
case NS_ooxml::LN_CT_Border_frame:
break;
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index ada5df34c839..35ae974dd7b8 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1750,7 +1750,6 @@ ParagraphProperties::ParagraphProperties()
, m_hRule( -1 )
, m_xAlign( -1 )
, m_yAlign( -1 )
- , m_bAnchorLock( false )
, m_nDropCapLength( 0 )
{
}
@@ -1773,8 +1772,7 @@ bool ParagraphProperties::operator==( const ParagraphProperties& rCompare )
m_vSpace == rCompare.m_vSpace &&
m_hRule == rCompare.m_hRule &&
m_xAlign == rCompare.m_xAlign &&
- m_yAlign == rCompare.m_yAlign &&
- m_bAnchorLock == rCompare.m_bAnchorLock );
+ m_yAlign == rCompare.m_yAlign );
}
void ParagraphProperties::ResetFrameProperties()
@@ -1796,7 +1794,6 @@ void ParagraphProperties::ResetFrameProperties()
m_hRule = -1;
m_xAlign = -1;
m_yAlign = -1;
- m_bAnchorLock = false;
m_nDropCapLength = 0;
}
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index c587bdad4242..d5d2073ddb26 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -399,7 +399,6 @@ private:
sal_Int32 m_hRule; // from ST_HeightRule exact, atLeast, auto
sal_Int32 m_xAlign; // from ST_XAlign center, inside, left, outside, right
sal_Int32 m_yAlign; // from ST_YAlign bottom, center, inline, inside, outside, top
- bool m_bAnchorLock;
sal_Int8 m_nDropCapLength; // number of characters
OUString m_sParaStyleName;
More information about the Libreoffice-commits
mailing list