[Libreoffice-commits] core.git: compilerplugins/clang include/vcl svtools/source vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 27 09:15:11 UTC 2018
compilerplugins/clang/unusedenumconstants.readonly.results | 2 -
include/vcl/event.hxx | 7 ++--
svtools/source/control/tabbar.cxx | 12 --------
vcl/source/control/tabctrl.cxx | 12 --------
vcl/source/treelist/headbar.cxx | 12 --------
vcl/source/window/menubarwindow.cxx | 2 -
vcl/source/window/menufloatingwindow.cxx | 2 -
vcl/source/window/menuwindow.cxx | 2 -
vcl/source/window/status.cxx | 19 -------------
vcl/source/window/toolbox.cxx | 19 -------------
10 files changed, 6 insertions(+), 83 deletions(-)
New commits:
commit 40c487469b0dcd367ca76a2407f5ef08287dbabb
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Nov 26 09:50:41 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Nov 27 10:14:46 2018 +0100
remove unused HelpEventMode enum value
Change-Id: I0fffa7b02ac61ef009e566d04b903cc02e9b4b3d
Reviewed-on: https://gerrit.libreoffice.org/64062
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 7c11fde9de35..720771de68c1 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -604,8 +604,6 @@ include/vcl/errinf.hxx:88
enum DialogMask ButtonDefaultsYes
include/vcl/errinf.hxx:89
enum DialogMask ButtonDefaultsNo
-include/vcl/event.hxx:181
- enum HelpEventMode EXTENDED
include/vcl/fontcapabilities.hxx:30
enum vcl::UnicodeCoverage::UnicodeCoverageEnum IPA_EXTENSIONS
include/vcl/fontcapabilities.hxx:31
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index f160a27c4cd1..6cd6f4a54c83 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -170,13 +170,12 @@ enum class HelpEventMode
{
NONE = 0x0000,
CONTEXT = 0x0001,
- EXTENDED = 0x0002,
- BALLOON = 0x0004,
- QUICK = 0x0008
+ BALLOON = 0x0002,
+ QUICK = 0x0004
};
namespace o3tl
{
- template<> struct typed_flags<HelpEventMode> : is_typed_flags<HelpEventMode, 0x0f> {};
+ template<> struct typed_flags<HelpEventMode> : is_typed_flags<HelpEventMode, 0x07> {};
}
class VCL_DLLPUBLIC HelpEvent
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index ac7ff9e66955..884323216aaf 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1391,18 +1391,6 @@ void TabBar::RequestHelp(const HelpEvent& rHEvt)
return;
}
}
- else if (rHEvt.GetMode() & HelpEventMode::EXTENDED)
- {
- OUString aHelpId(OStringToOUString(GetHelpId(nItemId), RTL_TEXTENCODING_UTF8));
- if ( !aHelpId.isEmpty() )
- {
- // trigger Help if available
- Help* pHelp = Application::GetHelp();
- if (pHelp)
- pHelp->Start(aHelpId, this);
- return;
- }
- }
// show text for quick- or balloon-help
// if this is isolated or not fully visible
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index e0079e4cffd3..5e1d5f97707a 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1365,18 +1365,6 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
return;
}
}
- else if ( rHEvt.GetMode() & HelpEventMode::EXTENDED )
- {
- OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
- if ( !aHelpId.isEmpty() )
- {
- // call Help if existing
- Help* pHelp = Application::GetHelp();
- if ( pHelp )
- pHelp->Start( aHelpId, this );
- return;
- }
- }
// for Quick or Ballon Help, we show the text, if it is cut
if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) )
diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx
index 0523ffa21699..96b75c7cb8fe 100644
--- a/vcl/source/treelist/headbar.cxx
+++ b/vcl/source/treelist/headbar.cxx
@@ -1028,18 +1028,6 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
return;
}
}
- else if ( rHEvt.GetMode() & HelpEventMode::EXTENDED )
- {
- OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
- if ( !aHelpId.isEmpty() )
- {
- // display it if help is available
- Help* pHelp = Application::GetHelp();
- if ( pHelp )
- pHelp->Start( aHelpId, this );
- return;
- }
- }
}
Window::RequestHelp( rHEvt );
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index a4c33051046b..290c6ab65ffa 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -1017,7 +1017,7 @@ sal_uInt16 MenuBarWindow::ImplFindEntry( const Point& rMousePos ) const
void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt )
{
sal_uInt16 nId = nHighlightedItem;
- if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
+ if ( rHEvt.GetMode() & HelpEventMode::CONTEXT )
ChangeHighlightItem( ITEMPOS_INVALID, true );
tools::Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index ac79b1f0c510..9574457e9151 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -1257,7 +1257,7 @@ void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt )
// #102618# Get item rect before destroying the window in EndExecute() call
tools::Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
- if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
+ if ( rHEvt.GetMode() & HelpEventMode::CONTEXT )
{
nHighlightedItem = ITEMPOS_INVALID;
EndExecute();
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index 2244a84ddeb0..92ba8c7ab171 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -86,7 +86,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu const * pMen
ImplChangeTipTimeout( oldTimeout, pMenuWindow );
bDone = true;
}
- else if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
+ else if ( rHEvt.GetMode() & HelpEventMode::CONTEXT )
{
// is help in the application selected
Help* pHelp = Application::GetHelp();
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index b0ce426a53c6..12bc7cbc3039 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -801,25 +801,6 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
return;
}
}
- else if ( rHEvt.GetMode() & HelpEventMode::EXTENDED )
- {
- OUString aCommand = GetItemCommand( nItemId );
- OString aHelpId( GetHelpId( nItemId ) );
-
- if ( !aCommand.isEmpty() || !aHelpId.isEmpty() )
- {
- // show help text if there is one
- Help* pHelp = Application::GetHelp();
- if ( pHelp )
- {
- if ( !aCommand.isEmpty() )
- pHelp->Start( aCommand, this );
- else if ( !aHelpId.isEmpty() )
- pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
- }
- return;
- }
- }
}
Window::RequestHelp( rHEvt );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 649e4970708d..824f216ccf0c 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3864,25 +3864,6 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
Help::ShowQuickHelp( this, aTempRect, aStr, rHelpStr, QuickHelpFlags::CtrlText );
return;
}
- else if ( rHEvt.GetMode() & HelpEventMode::EXTENDED )
- {
- OUString aCommand = GetItemCommand( nItemId );
- OString aHelpId( GetHelpId( nItemId ) );
-
- if ( !aCommand.isEmpty() || !aHelpId.isEmpty() )
- {
- // If help is available then trigger it
- Help* pHelp = Application::GetHelp();
- if ( pHelp )
- {
- if ( !aCommand.isEmpty() )
- pHelp->Start( aCommand, this );
- else if ( !aHelpId.isEmpty() )
- pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
- }
- return;
- }
- }
}
DockingWindow::RequestHelp( rHEvt );
More information about the Libreoffice-commits
mailing list