[Libreoffice-commits] core.git: accessibility/source include/sfx2 include/vcl sc/source sd/source sfx2/source vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jun 8 13:02:11 UTC 2019
accessibility/source/extended/accessiblelistbox.cxx | 7 -----
accessibility/source/extended/accessiblelistboxentry.cxx | 4 ---
include/sfx2/templatelocalview.hxx | 3 --
include/sfx2/thumbnailview.hxx | 1
include/vcl/treelistbox.hxx | 10 -------
sc/source/ui/app/inputwin.cxx | 17 +++++++------
sc/source/ui/inc/inputwin.hxx | 2 -
sd/source/ui/dlg/BulletAndPositionDlg.cxx | 11 +-------
sd/source/ui/inc/BulletAndPositionDlg.hxx | 1
sfx2/source/control/templatelocalview.cxx | 6 +---
sfx2/source/control/thumbnailview.cxx | 19 +--------------
vcl/source/treelist/treelistbox.cxx | 1
12 files changed, 15 insertions(+), 67 deletions(-)
New commits:
commit 516bdf7989dc2e2650490893e1ead054d40eaf37
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Jun 8 12:39:25 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jun 8 15:01:13 2019 +0200
loplugin:singlevalfields
Change-Id: I7c00b7d932bf96a0725eac5482580461baea6977
Reviewed-on: https://gerrit.libreoffice.org/73697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index 63f7ff87ac10..0441de61dfbc 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -394,13 +394,6 @@ namespace accessibility
{
::comphelper::OExternalLockGuard aGuard( this );
- if(getListBox())
- {
- SvTreeAccRoleType nType = getListBox()->GetAllEntriesAccessibleRoleType();
- if( nType == SvTreeAccRoleType::TREE)
- return AccessibleRole::TREE;
- }
-
//o is: return AccessibleRole::TREE;
bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
if(!bHasButtons && (getListBox()->GetTreeFlags() & SvTreeFlags::CHKBTN))
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index b3257345a822..12dd5fbbc629 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -397,10 +397,6 @@ namespace accessibility
SvTreeListBox* pBox = getListBox();
if(pBox)
{
- SvTreeAccRoleType nType = pBox->GetAllEntriesAccessibleRoleType();
- if( nType == SvTreeAccRoleType::TREE)
- return AccessibleRole::TREE_ITEM;
-
SvTreeFlags treeFlag = pBox->GetTreeFlags();
if(treeFlag & SvTreeFlags::CHKBTN )
{
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index 001929c4d848..def518dca0e0 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -241,9 +241,6 @@ protected:
TemplateViewItem *maSelectedItem;
- long mnThumbnailWidth;
- long mnThumbnailHeight;
-
Point maPosition; //store the point of click event
Link<void*,void> maOpenRegionHdl;
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index a1400841dafc..dd9c860afbcc 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -303,7 +303,6 @@ protected:
bool mbScroll : 1;
bool mbHasVisibleItems : 1;
bool mbShowTooltips : 1;
- bool mbIsMultiSelectionEnabled: 1;
Color maFillColor; ///< Background color of the thumbnail view widget.
Color maTextColor; ///< Text color.
Color maHighlightColor; ///< Color of the highlight (background) of the hovered item.
diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx
index 4cfd06a37937..4265b71deae9 100644
--- a/include/vcl/treelistbox.hxx
+++ b/include/vcl/treelistbox.hxx
@@ -105,12 +105,6 @@ namespace o3tl
template<> struct typed_flags<SvTreeFlags> : is_typed_flags<SvTreeFlags, 0x1f> {};
}
-enum class SvTreeAccRoleType
-{
- NONE = 0x00,
- TREE = 0x02
-};
-
enum class SvLBoxItemType {String, Button, ContextBmp};
class VCL_DLLPUBLIC SvLBoxTab
@@ -222,7 +216,6 @@ class VCL_DLLPUBLIC SvTreeListBox
short nEntryHeightOffs;
short nIndent;
short nFocusWidth;
- SvTreeAccRoleType nAllItemAccRoleType;
sal_uInt16 nFirstSelTab;
sal_uInt16 nLastSelTab;
long mnCheckboxItemWidth;
@@ -501,9 +494,6 @@ public:
/** Enables, that one cell of a tablistbox entry can be focused */
void EnableCellFocus();
- // For overwriting accessible role for all entries - normally 0, so each entry can be different
- SvTreeAccRoleType GetAllEntriesAccessibleRoleType() const { return nAllItemAccRoleType; }
-
SvTreeFlags GetTreeFlags() const {return nTreeFlags;}
static OUString SearchEntryTextWithHeadTitle(SvTreeListEntry* pEntry);
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index e206a3506669..14cd3595c5be 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -991,16 +991,17 @@ void ScInputBarGroup::TextGrabFocus()
maTextWndGroup->TextGrabFocus();
}
+constexpr long gnBorderWidth = INPUTLINE_INSET_MARGIN + 1;
+constexpr long gnBorderHeight = INPUTLINE_INSET_MARGIN + 1;
+
ScTextWndGroup::ScTextWndGroup(vcl::Window* pParent, ScTabViewShell* pViewSh)
: ScTextWndBase(pParent, WinBits(WB_TABSTOP)),
maTextWnd(VclPtr<ScTextWnd>::Create(this, pViewSh)),
maScrollBar(VclPtr<ScrollBar>::Create(this, WB_TABSTOP | WB_VERT | WB_DRAG))
{
- mnBorderWidth = INPUTLINE_INSET_MARGIN + 1;
- mnBorderHeight = INPUTLINE_INSET_MARGIN + 1;
- maTextWnd->SetPosPixel(Point(mnBorderWidth, mnBorderHeight));
+ maTextWnd->SetPosPixel(Point(gnBorderWidth, gnBorderHeight));
Size aSize = GetSizePixel();
- maTextWnd->SetSizePixel(Size(aSize.Width() - 2 * mnBorderWidth, aSize.Height() - 2 * mnBorderHeight));
+ maTextWnd->SetSizePixel(Size(aSize.Width() - 2 * gnBorderWidth, aSize.Height() - 2 * gnBorderHeight));
maTextWnd->Show();
maTextWnd->SetQuickHelpText(ScResId(SCSTR_QHELP_INPUTWND));
maTextWnd->SetHelpId(HID_INSWIN_INPUT);
@@ -1044,7 +1045,7 @@ long ScTextWndGroup::GetNumLines()
long ScTextWndGroup::GetPixelHeightForLines(long nLines)
{
- return maTextWnd->GetPixelHeightForLines(nLines) + 2 * mnBorderHeight;
+ return maTextWnd->GetPixelHeightForLines(nLines) + 2 * gnBorderHeight;
}
ScrollBar& ScTextWndGroup::GetScrollBar()
@@ -1110,13 +1111,13 @@ void ScTextWndGroup::Resize()
maScrollBar->SetLineSize(maTextWnd->GetTextHeight());
maScrollBar->Resize();
maScrollBar->Show();
- maTextWnd->SetSizePixel(Size(aSize.Width() - aScrollBarSize.Width() - mnBorderWidth - 1,
- aSize.Height() - 2 * mnBorderHeight));
+ maTextWnd->SetSizePixel(Size(aSize.Width() - aScrollBarSize.Width() - gnBorderWidth - 1,
+ aSize.Height() - 2 * gnBorderHeight));
}
else
{
maScrollBar->Hide();
- maTextWnd->SetSizePixel(Size(aSize.Width() - 2 * mnBorderWidth, aSize.Height() - 2 * mnBorderHeight));
+ maTextWnd->SetSizePixel(Size(aSize.Width() - 2 * gnBorderWidth, aSize.Height() - 2 * gnBorderHeight));
}
maTextWnd->Resize();
Invalidate();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 6d5c91cca001..cdf3048519be 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -212,8 +212,6 @@ private:
VclPtr<ScTextWnd> maTextWnd;
VclPtr<ScrollBar> maScrollBar;
- long mnBorderWidth, mnBorderHeight;
-
DECL_LINK(Impl_ScrollHdl, ScrollBar*, void);
};
diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index 806506d8d292..6575850c6a6b 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -117,7 +117,6 @@ SvxBulletAndPositionDlg::SvxBulletAndPositionDlg(weld::Window* pWindow, const Sf
: GenericDialogController(pWindow, "cui/ui/bulletandposition.ui", "BulletAndPosition")
, bLastWidthModified(false)
, bModified(false)
- , bAutomaticCharStyles(true)
, bInInitControl(false)
, bLabelAlignmentPosAndSpaceModeActive(false)
, bApplyToMaster(false)
@@ -794,10 +793,7 @@ IMPL_LINK(SvxBulletAndPositionDlg, NumberTypeSelectHdl_Impl, weld::ComboBox&, rB
pActNum->SetLevel(i, aNumFmt);
SwitchNumberType(SHOW_BULLET);
// allocation of the drawing pattern is automatic
- if (bAutomaticCharStyles)
- {
- sSelectStyle = m_sBulletCharFormatName;
- }
+ sSelectStyle = m_sBulletCharFormatName;
}
else
{
@@ -808,10 +804,7 @@ IMPL_LINK(SvxBulletAndPositionDlg, NumberTypeSelectHdl_Impl, weld::ComboBox&, rB
CheckForStartValue_Impl(nNumberingType);
// allocation of the drawing pattern is automatic
- if (bAutomaticCharStyles)
- {
- sSelectStyle = m_sNumCharFmtName;
- }
+ sSelectStyle = m_sNumCharFmtName;
}
}
nMask <<= 1;
diff --git a/sd/source/ui/inc/BulletAndPositionDlg.hxx b/sd/source/ui/inc/BulletAndPositionDlg.hxx
index 3e2402eb0bef..fb95af11c6f0 100644
--- a/sd/source/ui/inc/BulletAndPositionDlg.hxx
+++ b/sd/source/ui/inc/BulletAndPositionDlg.hxx
@@ -62,7 +62,6 @@ class SvxBulletAndPositionDlg : public weld::GenericDialogController
bool bLastWidthModified : 1;
bool bModified : 1;
- bool bAutomaticCharStyles : 1;
bool bInInitControl : 1; // workaround for Modify-error, is said to be corrected from 391 on
bool bLabelAlignmentPosAndSpaceModeActive;
bool bApplyToMaster;
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index d7b75e740f67..4cf0d8ad084c 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -498,8 +498,6 @@ SfxTemplateLocalView::SfxTemplateLocalView(std::unique_ptr<weld::ScrolledWindow>
: SfxThumbnailView(std::move(xWindow), std::move(xMenu))
, mnCurRegionId(0)
, maSelectedItem(nullptr)
- , mnThumbnailWidth(TEMPLATE_THUMBNAIL_MAX_WIDTH)
- , mnThumbnailHeight(TEMPLATE_THUMBNAIL_MAX_HEIGHT)
, maPosition(0,0)
, mpDocTemplates(new SfxDocumentTemplates)
{
@@ -538,8 +536,8 @@ void SfxTemplateLocalView::Populate()
aProperties.aPath = aURL;
aProperties.aRegionName = aRegionName;
aProperties.aThumbnail = TemplateLocalView::fetchThumbnail(aURL,
- mnThumbnailWidth,
- mnThumbnailHeight);
+ TEMPLATE_THUMBNAIL_MAX_WIDTH,
+ TEMPLATE_THUMBNAIL_MAX_HEIGHT);
pItem->maTemplates.push_back(aProperties);
maAllTemplates.push_back(aProperties);
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index b97285f28096..6f5dea4a9249 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -142,7 +142,6 @@ void ThumbnailView::ImplInit()
mbScroll = false;
mbHasVisibleItems = false;
mbShowTooltips = false;
- mbIsMultiSelectionEnabled = true;
maFilterFunc = ViewFilterAll();
maFillColor = GetSettings().GetStyleSettings().GetFieldColor();
maTextColor = GetSettings().GetStyleSettings().GetWindowTextColor();
@@ -602,7 +601,7 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt )
Control::KeyInput( rKEvt );
}
- if ( pNext && mbIsMultiSelectionEnabled)
+ if ( pNext )
{
if (aKeyCode.IsShift() && bValidRange)
{
@@ -665,12 +664,6 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt )
MakeItemVisible(pNext->mnId);
}
- else if(pNext && !mbIsMultiSelectionEnabled)
- {
- deselectItems();
- SelectItem(pNext->mnId);
- MakeItemVisible(pNext->mnId);
- }
}
void ThumbnailView::MakeItemVisible( sal_uInt16 nItemId )
@@ -723,15 +716,7 @@ void ThumbnailView::MouseButtonDown( const MouseEvent& rMEvt )
return;
}
- if ( rMEvt.GetClicks() == 1 && !mbIsMultiSelectionEnabled )
- {
- deselectItems();
- pItem->setSelection(!pItem->isSelected());
-
- if (!pItem->isHighlighted())
- DrawItem(pItem);
- }
- else if(rMEvt.GetClicks() == 1)
+ if(rMEvt.GetClicks() == 1)
{
if (rMEvt.IsMod1())
{
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index b91fb5552d61..ce1e91937b11 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -1300,7 +1300,6 @@ void SvTreeListBox::InitTreeView()
nFirstSelTab = 0;
nLastSelTab = 0;
nFocusWidth = -1;
- nAllItemAccRoleType = SvTreeAccRoleType::NONE;
mnCheckboxItemWidth = 0;
nTreeFlags = SvTreeFlags::RECALCTABS;
More information about the Libreoffice-commits
mailing list