[Libreoffice-commits] core.git: compilerplugins/clang svtools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Nov 24 12:56:11 UTC 2018
compilerplugins/clang/unusedenumconstants.readonly.results | 2
svtools/source/contnr/fileview.cxx | 30 ++++---------
2 files changed, 10 insertions(+), 22 deletions(-)
New commits:
commit d21b290be2e7905a400100f207d1dc124eba0a26
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 22 15:01:59 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 24 13:55:50 2018 +0100
remove unused FileViewFlags::SHOW_ONLYTITLE
and correct the constant in is_typed_flags
Change-Id: If8aa57be2c64ab8e4fc82d0dae670cb68e3a8926
Reviewed-on: https://gerrit.libreoffice.org/63932
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results b/compilerplugins/clang/unusedenumconstants.readonly.results
index f980ab852405..282427e96af2 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1294,8 +1294,6 @@ svl/source/numbers/zformat.cxx:385
enum BracketFormatSymbolType BRACKET_SYMBOLTYPE_NATNUM18
svl/source/numbers/zformat.cxx:386
enum BracketFormatSymbolType BRACKET_SYMBOLTYPE_NATNUM19
-svtools/source/contnr/fileview.cxx:110
- enum FileViewFlags SHOW_ONLYTITLE
svx/source/inc/docrecovery.hxx:85
enum EDocStates TryLoadBackup
svx/source/inc/docrecovery.hxx:86
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 0576ff86045a..d2dbee92ccbd 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -107,12 +107,11 @@ enum class FileViewFlags
ONLYFOLDER = 0x01,
MULTISELECTION = 0x02,
SHOW_TYPE = 0x04,
- SHOW_ONLYTITLE = 0x10,
SHOW_NONE = 0x20,
};
namespace o3tl
{
- template<> struct typed_flags<FileViewFlags> : is_typed_flags<FileViewFlags, 0x1f> {};
+ template<> struct typed_flags<FileViewFlags> : is_typed_flags<FileViewFlags, 0x27> {};
}
namespace
@@ -391,27 +390,18 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin,
mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), mpHeaderBar->CalcWindowSizePixel() );
HeaderBarItemBits nBits = ( HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER | HeaderBarItemBits::CLICKABLE );
- if (nFlags & FileViewFlags::SHOW_ONLYTITLE)
- {
- long aTabPositions[] = { 20, 600 };
- SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel);
- mpHeaderBar->InsertItem(COLUMN_TITLE, SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE), 600, nBits | HeaderBarItemBits::UPARROW);
- }
- else
- {
- long aTabPositions[] = { 20, 180, 320, 400, 600 };
- SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel);
- SetTabJustify(2, AdjustRight); // column "Size"
+ long aTabPositions[] = { 20, 180, 320, 400, 600 };
+ SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel);
+ SetTabJustify(2, AdjustRight); // column "Size"
- mpHeaderBar->InsertItem(COLUMN_TITLE, SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE), 180, nBits | HeaderBarItemBits::UPARROW);
- if (nFlags & FileViewFlags::SHOW_TYPE)
- {
- mpHeaderBar->InsertItem(COLUMN_TYPE, SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE), 140, nBits);
- }
- mpHeaderBar->InsertItem(COLUMN_SIZE, SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE), 80, nBits);
- mpHeaderBar->InsertItem(COLUMN_DATE, SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE), 500, nBits);
+ mpHeaderBar->InsertItem(COLUMN_TITLE, SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE), 180, nBits | HeaderBarItemBits::UPARROW);
+ if (nFlags & FileViewFlags::SHOW_TYPE)
+ {
+ mpHeaderBar->InsertItem(COLUMN_TYPE, SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE), 140, nBits);
}
+ mpHeaderBar->InsertItem(COLUMN_SIZE, SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE), 80, nBits);
+ mpHeaderBar->InsertItem(COLUMN_DATE, SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE), 500, nBits);
Size aHeadSize = mpHeaderBar->GetSizePixel();
SetPosSizePixel( Point( 0, aHeadSize.Height() ),
More information about the Libreoffice-commits
mailing list