[Libreoffice-commits] core.git: compilerplugins/clang include/svtools svtools/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 20 17:31:41 UTC 2020
compilerplugins/clang/singlevalfields.could-be-bool.results | 10 -
compilerplugins/clang/singlevalfields.results | 78 +++++-------
include/svtools/valueset.hxx | 1
svtools/source/control/valueacc.cxx | 1
svtools/source/control/valueimp.hxx | 1
svtools/source/control/valueset.cxx | 48 +++----
6 files changed, 61 insertions(+), 78 deletions(-)
New commits:
commit e6da8c07dd5584b2d385cbd50f065fecb9b76038
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Feb 20 16:24:33 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Feb 20 18:31:05 2020 +0100
loplugin:singlevalfields
Change-Id: I9ff752b06facfbb04c10c8f9b46b650143b02ca4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89117
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/singlevalfields.could-be-bool.results b/compilerplugins/clang/singlevalfields.could-be-bool.results
index 7c0d9d3961b7..096e5431b48a 100644
--- a/compilerplugins/clang/singlevalfields.could-be-bool.results
+++ b/compilerplugins/clang/singlevalfields.could-be-bool.results
@@ -34,15 +34,15 @@ include/tools/ref.hxx:126
include/vbahelper/vbapagesetupbase.hxx:50
VbaPageSetupBase mnOrientPortrait
sal_Int32
-include/vcl/dialog.hxx:48
- Dialog mnMousePositioned
- long
include/vcl/headbar.hxx:208
HeaderBar mnBorderOff1
long
include/vcl/headbar.hxx:209
HeaderBar mnBorderOff2
long
+include/vcl/toolkit/dialog.hxx:52
+ Dialog mnMousePositioned
+ long
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:191
(anonymous) g_bInGetJavaVM
sig_atomic_t
@@ -88,7 +88,7 @@ svx/source/inc/cell.hxx:204
svx/source/table/tablertfimporter.cxx:57
sdr::table::(anonymous namespace)::RTFCellDefault mnRowSpan
sal_Int32
-sw/source/filter/ww8/docxexport.hxx:98
+sw/source/filter/ww8/docxexport.hxx:99
DocxExport m_nHeadersFootersInSection
sal_Int32
sw/source/filter/ww8/ww8scan.hxx:58
@@ -118,6 +118,6 @@ vcl/workben/icontest.cxx:147
workdir/LexTarget/l10ntools/source/cfglex.cxx:2293
/home/noel/libo2/workdir/LexTarget/l10ntools/source/cfglex.cxx bText
int
-writerfilter/source/dmapper/PageBordersHandler.hxx:53
+writerfilter/source/dmapper/PageBordersHandler.hxx:51
writerfilter::dmapper::PageBordersHandler m_eOffsetFrom
class SectionPropertyMap::BorderOffsetFrom
diff --git a/compilerplugins/clang/singlevalfields.results b/compilerplugins/clang/singlevalfields.results
index 5c4f47158587..3f00bed44f28 100644
--- a/compilerplugins/clang/singlevalfields.results
+++ b/compilerplugins/clang/singlevalfields.results
@@ -1,13 +1,13 @@
-avmedia/inc/mediacontrol.hxx:72
+avmedia/inc/mediacontrol.hxx:64
avmedia::MediaControl maIdle
avmedia MediaControl Idle
-avmedia/inc/mediacontrol.hxx:73
+avmedia/inc/mediacontrol.hxx:65
avmedia::MediaControl maChangeTimeIdle
avmedia MediaControl Change Time Idle
-avmedia/source/framework/soundhandler.hxx:115
+avmedia/source/framework/soundhandler.hxx:114
avmedia::SoundHandler m_aUpdateIdle
avmedia SoundHandler Update
-basctl/source/basicide/baside2.hxx:86
+basctl/source/basicide/baside2.hxx:81
basctl::EditorWindow aHighlighter
0
basctl/source/inc/dlged.hxx:132
@@ -40,6 +40,18 @@ bridges/source/jni_uno/jni_bridge.h:53
bridges/source/jni_uno/jni_uno2java.cxx:391
jni_uno::(anonymous namespace)::UNO_proxy m_ref
1
+canvas/inc/rendering/irendermodule.hxx:35
+ canvas::Vertex g
+ 1
+canvas/inc/rendering/irendermodule.hxx:35
+ canvas::Vertex r
+ 1
+canvas/inc/rendering/irendermodule.hxx:35
+ canvas::Vertex b
+ 1
+canvas/inc/rendering/irendermodule.hxx:37
+ canvas::Vertex z
+ 0
chart2/source/controller/dialogs/DataBrowser.cxx:209
chart::impl::SeriesHeader m_aUpdateDataTimer
UpdateDataTimer
@@ -58,7 +70,7 @@ chart2/source/controller/inc/TitleDialogData.hxx:36
chart2/source/model/main/DataPoint.hxx:108
chart::DataPoint m_bNoParentPropAllowed
0
-comphelper/source/misc/threadpool.cxx:39
+comphelper/source/misc/threadpool.cxx:40
comphelper gbIsWorkerThread
1
connectivity/source/inc/dbase/DIndexIter.hxx:36
@@ -109,7 +121,7 @@ cui/source/inc/linkdlg.hxx:46
cui/source/inc/thesdlg.hxx:32
SvxThesaurusDialog m_aModifyIdle
cui SvxThesaurusDialog LookUp Modify
-cui/source/options/optgdlg.cxx:1237
+cui/source/options/optgdlg.cxx:1277
LanguageConfig_Impl aLanguageOptions
0
cui/source/options/optjava.hxx:60
@@ -196,18 +208,6 @@ include/basegfx/pixel/bpixel.hxx:43
include/basic/sbxvar.hxx:73
SbxValues::(anonymous) pData
0
-include/canvas/rendering/irendermodule.hxx:36
- canvas::Vertex g
- 1
-include/canvas/rendering/irendermodule.hxx:36
- canvas::Vertex r
- 1
-include/canvas/rendering/irendermodule.hxx:36
- canvas::Vertex b
- 1
-include/canvas/rendering/irendermodule.hxx:38
- canvas::Vertex z
- 0
include/comphelper/parallelsort.hxx:89
comphelper::(anonymous namespace)::ProfileZone mbDummy
1
@@ -271,6 +271,9 @@ include/svtools/svparser.hxx:74
include/svtools/tabbar.hxx:323
TabBar mnOffY
0
+include/svtools/valueset.hxx:219
+ ValueSet mnSpacing
+ 0
include/svx/ctredlin.hxx:91
SvxRedlinTable aDaTiFirst
0
@@ -298,9 +301,6 @@ include/svx/deflt3d.hxx:53
include/svx/deflt3d.hxx:54
E3dDefaultAttributes bDefaultExtrudeSmoothFrontBack
0
-include/svx/fillctrl.hxx:53
- SvxFillToolBoxControl mpFillControl
- 0
include/svx/fontwork.hxx:77
SvxFontWorkDialog aInputIdle
SvxFontWorkDialog Input
@@ -337,18 +337,9 @@ include/vcl/settings.hxx:146
include/vcl/settings.hxx:147
DialogStyle action_area_border
5
-io/qa/textinputstream.cxx:97
- (anonymous namespace)::Input open_
- 1
libreofficekit/source/gtk/lokdocview.cxx:86
(anonymous namespace)::LOKDocViewPrivateImpl m_bIsLoading
0
-odk/source/unoapploader/unx/unoapploader.c:39
- /home/noel/libo2/odk/source/unoapploader/unx/unoapploader.c PATHSEPARATOR
- :
-odk/source/unoapploader/unx/unoapploader.c:81
- main ENVVARNAME
- LD_LIBRARY_PATH
oox/source/core/contexthandler2.cxx:36
oox::core::ElementInfo maChars
0
@@ -475,9 +466,6 @@ sc/inc/scmod.hxx:84
sc/inc/table.hxx:180
ScTable mpRowHeights
0
-sc/qa/extras/check_data_pilot_field.cxx:62
- sc_apitest::CheckDataPilotField mMaxFieldIndex
- 6
sc/qa/unit/screenshots/screenshots.cxx:40
ScScreenshotTest mCsv
some, strings, here, separated, by, commas
@@ -652,6 +640,9 @@ svgio/source/svgreader/svgdocumenthandler.cxx:82
svl/source/crypto/cryptosign.cxx:153
(anonymous namespace)::TimeStampReq extensions
0
+svtools/source/control/valueimp.hxx:62
+ ValueSetItem mpData
+ 0
svx/inc/sdr/overlay/overlaymanagerbuffered.hxx:44
sdr::overlay::OverlayManagerBuffered maBufferIdle
sdr overlay OverlayManagerBuffered Idle
@@ -931,6 +922,9 @@ sw/source/uibase/inc/unotools.hxx:45
unotools/source/config/saveopt.cxx:82
(anonymous namespace)::SvtSaveOptions_Impl bROUserAutoSave
0
+vcl/headless/svpgdi.cxx:1327
+ SvpSalGraphics::drawPolyLine bDoDirectCairoStroke
+ 1
vcl/inc/canvasbitmap.hxx:55
vcl::unotools::VclCanvasBitmap m_nEndianness
0
@@ -952,9 +946,6 @@ vcl/inc/salprn.hxx:44
vcl/inc/salwtype.hxx:157
SalWheelMouseEvent mbDeltaIsPixel
0
-vcl/inc/slider.hxx:39
- Slider mnChannelPixOffset
- 0
vcl/inc/svdata.hxx:278
ImplSVNWFData mbMenuBarDockingAreaCommonBG
0
@@ -1048,25 +1039,28 @@ vcl/source/gdi/pdfwriter_impl.hxx:735
vcl/unx/gtk3/a11y/gtk3atkutil.cxx:700
ooo_atk_util_ensure_event_listener bInited
1
-vcl/unx/gtk3/gtk3gtkinst.cxx:12932
+vcl/unx/gtk3/gtk3gtkinst.cxx:13120
(anonymous namespace)::ensure_intercept_drawing_area_accessibility bDone
1
+vcl/unx/gtk3/gtk3gtkinst.cxx:13148
+ (anonymous namespace)::ensure_disable_ctrl_page_up_down_bindings bDone
+ 1
workdir/LexTarget/l10ntools/source/xrmlex.cxx:706
/home/noel/libo2/workdir/LexTarget/l10ntools/source/xrmlex.cxx bText
0
-writerfilter/source/dmapper/DomainMapper_Impl.hxx:155
+writerfilter/source/dmapper/DomainMapper_Impl.hxx:148
writerfilter::dmapper::FieldParagraph m_bRemove
0
-writerfilter/source/dmapper/SettingsTable.cxx:263
+writerfilter/source/dmapper/SettingsTable.cxx:264
writerfilter::dmapper::SettingsTable_Impl m_pThemeFontLangProps
3
-writerfilter/source/rtftok/rtfdocumentimpl.hxx:871
+writerfilter/source/rtftok/rtfdocumentimpl.hxx:872
writerfilter::rtftok::RTFDocumentImpl m_nNestedTRLeft
0
-writerfilter/source/rtftok/rtfdocumentimpl.hxx:872
+writerfilter/source/rtftok/rtfdocumentimpl.hxx:873
writerfilter::rtftok::RTFDocumentImpl m_nTopLevelTRLeft
0
-writerfilter/source/rtftok/rtfdocumentimpl.hxx:875
+writerfilter/source/rtftok/rtfdocumentimpl.hxx:876
writerfilter::rtftok::RTFDocumentImpl m_nNestedCurrentCellX
0
writerfilter/source/rtftok/rtftokenizer.hxx:72
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index 7d31ab07e83d..a280b274e967 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -216,7 +216,6 @@ private:
sal_uInt16 mnUserCols;
sal_uInt16 mnUserVisLines;
sal_uInt16 mnFirstLine;
- sal_uInt16 mnSpacing;
DrawFrameStyle mnFrameStyle;
Color maColor;
Link<ValueSet*,void> maSelectHdl;
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index e205a937429b..cb7e3b92f432 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -41,7 +41,6 @@ ValueSetItem::ValueSetItem( ValueSet& rParent )
, mnId(0)
, meType(VALUESETITEM_NONE)
, mbVisible(true)
- , mpData(nullptr)
, mxAcc()
{
}
diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx
index 2e26f0c72d6f..af9a35508155 100644
--- a/svtools/source/control/valueimp.hxx
+++ b/svtools/source/control/valueimp.hxx
@@ -59,7 +59,6 @@ struct ValueSetItem
Image maImage;
Color maColor;
OUString maText;
- void* mpData;
rtl::Reference< ValueItemAcc > mxAcc;
explicit ValueSetItem( ValueSet& rParent );
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 299ee0209557..ffaa03cf14e5 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -83,7 +83,6 @@ ValueSet::ValueSet( vcl::Window* pParent, WinBits nWinStyle ) :
mnCurCol = 0;
mnUserCols = 0;
mnUserVisLines = 0;
- mnSpacing = 0;
mnFrameStyle = DrawFrameStyle::NONE;
mbFormat = true;
mbHighlight = false;
@@ -391,7 +390,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext)
if (nStyle & WB_NONEFIELD)
{
nNoneHeight = nTxtHeight + nOff;
- nNoneSpace = mnSpacing;
+ nNoneSpace = 0;
}
else
{
@@ -410,7 +409,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext)
{
if (mnUserItemWidth)
{
- mnCols = static_cast<sal_uInt16>((aWinSize.Width() - nScrBarWidth + mnSpacing) / (mnUserItemWidth + mnSpacing));
+ mnCols = static_cast<sal_uInt16>((aWinSize.Width() - nScrBarWidth) / mnUserItemWidth);
if (mnCols <= 0)
mnCols = 1;
}
@@ -439,7 +438,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext)
}
else if (mnUserItemHeight)
{
- mnVisLines = (nCalcHeight - nNoneSpace + mnSpacing) / (mnUserItemHeight + mnSpacing);
+ mnVisLines = (nCalcHeight - nNoneSpace) / mnUserItemHeight;
if (!mnVisLines)
mnVisLines = 1;
}
@@ -462,16 +461,15 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext)
}
// calculate item size
- const long nColSpace = (mnCols - 1) * static_cast<long>(mnSpacing);
- const long nLineSpace = ((mnVisLines - 1) * mnSpacing) + nNoneSpace;
+ const long nLineSpace = nNoneSpace;
if (mnUserItemWidth && !mnUserCols)
{
mnItemWidth = mnUserItemWidth;
- if (mnItemWidth > aWinSize.Width() - nScrBarWidth - nColSpace)
- mnItemWidth = aWinSize.Width() - nScrBarWidth - nColSpace;
+ if (mnItemWidth > aWinSize.Width() - nScrBarWidth)
+ mnItemWidth = aWinSize.Width() - nScrBarWidth;
}
else
- mnItemWidth = (aWinSize.Width() - nScrBarWidth-nColSpace) / mnCols;
+ mnItemWidth = (aWinSize.Width() - nScrBarWidth) / mnCols;
if (mnUserItemHeight && !mnUserVisLines)
{
mnItemHeight = mnUserItemHeight;
@@ -543,7 +541,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext)
}
// calculate offsets
- long nAllItemWidth = (mnItemWidth * mnCols) + nColSpace;
+ long nAllItemWidth = mnItemWidth * mnCols;
long nAllItemHeight = (mnItemHeight * mnVisLines) + nNoneHeight + nLineSpace;
long nStartX = (aWinSize.Width() - nScrBarWidth - nAllItemWidth) / 2;
long nStartY = (aWinSize.Height() - nAllItemHeight) / 2;
@@ -578,8 +576,8 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext)
maItemListRect.SetLeft( x );
maItemListRect.SetTop( y );
- maItemListRect.SetRight( x + mnCols * (mnItemWidth + mnSpacing) - mnSpacing - 1 );
- maItemListRect.SetBottom( y + mnVisLines * (mnItemHeight + mnSpacing) - mnSpacing - 1 );
+ maItemListRect.SetRight( x + mnCols * mnItemWidth - 1 );
+ maItemListRect.SetBottom( y + mnVisLines * mnItemHeight - 1 );
for (size_t i = 0; i < nItemCount; i++)
{
@@ -602,10 +600,10 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext)
if (!((i + 1) % mnCols))
{
x = nStartX;
- y += mnItemHeight + mnSpacing;
+ y += mnItemHeight;
}
else
- x += mnItemWidth + mnSpacing;
+ x += mnItemWidth;
}
else
{
@@ -631,7 +629,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext)
if (nStyle & WB_NONEFIELD)
{
aPos.setY( nStartY + nNoneHeight + 1 );
- aSize.setHeight( ((mnItemHeight + mnSpacing) * mnVisLines) - 2 - mnSpacing );
+ aSize.setHeight( (mnItemHeight * mnVisLines) - 2 );
}
mxScrollBar->SetPosSizePixel(aPos, aSize);
mxScrollBar->SetRangeMax(mnLines);
@@ -885,10 +883,10 @@ size_t ValueSet::ImplGetItem( const Point& rPos ) const
const int yc = rPos.Y() - maItemListRect.Top();
// The point is inside the area of item list,
// let's find the containing item.
- const int col = xc / (mnItemWidth + mnSpacing);
- const int x = xc % (mnItemWidth + mnSpacing);
- const int row = yc / (mnItemHeight + mnSpacing);
- const int y = yc % (mnItemHeight + mnSpacing);
+ const int col = xc / mnItemWidth;
+ const int x = xc % mnItemWidth;
+ const int row = yc / mnItemHeight;
+ const int y = yc % mnItemHeight;
if (x < mnItemWidth && y < mnItemHeight)
{
@@ -1465,8 +1463,8 @@ tools::Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const
const size_t row = mnCols ? nPos/mnCols : 0;
const size_t col = mnCols ? nPos%mnCols : 0;
- const long x = maItemListRect.Left()+col*(mnItemWidth+mnSpacing);
- const long y = maItemListRect.Top()+row*(mnItemHeight+mnSpacing);
+ const long x = maItemListRect.Left()+col*mnItemWidth;
+ const long y = maItemListRect.Top()+row*mnItemHeight;
return tools::Rectangle( Point(x, y), Size(mnItemWidth, mnItemHeight) );
}
@@ -1767,12 +1765,6 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
else
n = 0;
- if ( mnSpacing )
- {
- aSize.AdjustWidth(mnSpacing * (nCalcCols - 1) );
- aSize.AdjustHeight(mnSpacing * (nCalcLines - 1) );
- }
-
if ( nStyle & WB_NAMEFIELD )
{
aSize.AdjustHeight(nTxtHeight + NAME_OFFSET );
@@ -1782,7 +1774,7 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
if ( nStyle & WB_NONEFIELD )
{
- aSize.AdjustHeight(nTxtHeight + n + mnSpacing );
+ aSize.AdjustHeight(nTxtHeight + n);
}
// sum possible ScrollBar width
More information about the Libreoffice-commits
mailing list