[Libreoffice-commits] .: 2 commits - accessibility/inc accessibility/source dbaccess/source framework/source svtools/inc svtools/source svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Aug 28 08:12:11 PDT 2012
accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx | 4 -
accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx | 2
accessibility/source/helper/acc_factory.cxx | 5 -
dbaccess/source/ui/control/TableGrantCtrl.cxx | 4 -
framework/source/uielement/menubarmanager.cxx | 37 ++++++++++
svtools/inc/svtools/accessiblefactory.hxx | 1
svtools/inc/svtools/editbrowsebox.hxx | 2
svtools/source/brwbox/editbrowsebox2.cxx | 3
svtools/source/contnr/svtabbx.cxx | 2
svtools/source/misc/svtaccessiblefactory.cxx | 1
svx/source/fmcomp/gridctrl.cxx | 2
11 files changed, 45 insertions(+), 18 deletions(-)
New commits:
commit 9cfc64c66ff9e0f0251a006f039bf4e26a63147a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 28 17:07:56 2012 +0200
fdo#36149: Do not display error dialogs while showing a menu
...it apparently leads to crashes, but is probably not good from a usability
perspective anyway (as the menu closes again when the dialog appears/is operated
on by the user).
For now, just disable the Java specific interaction handler here; might make
sense to address this more generally though (there's framework::QuietInteraction
btw).
Change-Id: I6ae303c0084549b5339d219e158cdb89e5a6b331
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 26b1233..0361632 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -49,6 +49,7 @@
#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/util/XStringWidth.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/uno/XCurrentContext.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
@@ -67,6 +68,8 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/extract.hxx>
#include <svtools/menuoptions.hxx>
+#include <svtools/javainteractionhandler.hxx>
+#include <uno/current_context.hxx>
#include <unotools/historyoptions.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/cmdoptions.hxx>
@@ -800,11 +803,45 @@ static void lcl_CheckForChildren(Menu* pMenu, sal_uInt16 nItemId)
// vcl handler
//_________________________________________________________________________________________________________________
+namespace {
+
+class QuietInteractionContext:
+ public cppu::WeakImplHelper1< com::sun::star::uno::XCurrentContext >,
+ private boost::noncopyable
+{
+public:
+ QuietInteractionContext(
+ com::sun::star::uno::Reference< com::sun::star::uno::XCurrentContext >
+ const & context):
+ context_(context) {}
+
+private:
+ virtual ~QuietInteractionContext() {}
+
+ virtual com::sun::star::uno::Any SAL_CALL getValueByName(
+ rtl::OUString const & Name)
+ throw (com::sun::star::uno::RuntimeException)
+ {
+ return Name != JAVA_INTERACTION_HANDLER_NAME && context_.is()
+ ? context_->getValueByName(Name)
+ : com::sun::star::uno::Any();
+ }
+
+ com::sun::star::uno::Reference< com::sun::star::uno::XCurrentContext >
+ context_;
+};
+
+}
+
IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen at sun.com", "MenuBarManager::Activate" );
if ( pMenu == m_pVCLMenu )
{
+ com::sun::star::uno::ContextLayer layer(
+ new QuietInteractionContext(
+ com::sun::star::uno::getCurrentContext()));
+
// set/unset hiding disabled menu entries
sal_Bool bDontHide = SvtMenuOptions().IsEntryHidingEnabled();
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
commit 7f7e0a668204678b06d711487137a9f8b13c91e1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Aug 28 16:49:11 2012 +0200
-Werror,-Wunused-private-field (Clang towards 3.2)
Change-Id: I2a181d1442ef3b41ecba009d160d2d18d6fb71ac
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx
index 3106def..c0af453 100644
--- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx
+++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx
@@ -38,7 +38,6 @@ namespace accessibility
{
private:
TriState m_eState;
- sal_Bool m_bEnabled;
sal_Bool m_bIsTriState;
protected:
@@ -53,8 +52,7 @@ namespace accessibility
sal_Int32 _nRowPos,
sal_uInt16 _nColPos,
const TriState& _eState,
- sal_Bool _bEnabled,
- sal_Bool _bIsTriState = sal_True);
+ sal_Bool _bIsTriState);
// XInterface
DECLARE_XINTERFACE( )
diff --git a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
index 5241bfe..a5331c3 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx
@@ -34,11 +34,9 @@ namespace accessibility
sal_Int32 _nRowPos,
sal_uInt16 _nColPos
,const TriState& _eState,
- sal_Bool _bEnabled,
sal_Bool _bIsTriState)
:AccessibleBrowseBoxCell(_rxParent, _rBrowseBox, _xFocusWindow, _nRowPos, _nColPos, BBTYPE_CHECKBOXCELL)
,m_eState(_eState)
- ,m_bEnabled(_bEnabled)
,m_bIsTriState(_bIsTriState)
{
}
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx
index 92ce2cc..5125ba4 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -210,7 +210,6 @@ inline bool hasFloatingChild(Window *pWindow)
sal_Int32 _nRowPos,
sal_uInt16 _nColPos,
const TriState& _eState,
- sal_Bool _bEnabled,
sal_Bool _bIsTriState
) const;
@@ -501,10 +500,10 @@ inline bool hasFloatingChild(Window *pWindow)
Reference< XAccessible > AccessibleFactory::createAccessibleCheckBoxCell(
const Reference< XAccessible >& _rxParent, IAccessibleTableProvider& _rBrowseBox,
const Reference< XWindow >& _xFocusWindow, sal_Int32 _nRowPos, sal_uInt16 _nColPos,
- const TriState& _eState, sal_Bool _bEnabled, sal_Bool _bIsTriState ) const
+ const TriState& _eState, sal_Bool _bIsTriState ) const
{
return new AccessibleCheckBoxCell( _rxParent, _rBrowseBox, _xFocusWindow,
- _nRowPos, _nColPos, _eState, _bEnabled, _bIsTriState );
+ _nRowPos, _nColPos, _eState, _bIsTriState );
}
//--------------------------------------------------------------------
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index 36e5958..6e548bb 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -470,17 +470,15 @@ Reference< XAccessible > OTableGrantControl::CreateAccessibleCell( sal_Int32 _nR
if(nColumnId != COL_TABLE_NAME)
{
TriState eState = STATE_NOCHECK;
- sal_Bool bEnable = sal_False;
TTablePrivilegeMap::const_iterator aFind = findPrivilege(_nRow);
if(aFind != m_aPrivMap.end())
{
eState = isAllowed(nColumnId,aFind->second.nRights) ? STATE_CHECK : STATE_NOCHECK;
- bEnable = isAllowed(nColumnId,aFind->second.nWithGrant);
}
else
eState = STATE_NOCHECK;
- return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,eState,bEnable );
+ return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,eState );
}
return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos );
}
diff --git a/svtools/inc/svtools/accessiblefactory.hxx b/svtools/inc/svtools/accessiblefactory.hxx
index f747b9a..43aff50 100644
--- a/svtools/inc/svtools/accessiblefactory.hxx
+++ b/svtools/inc/svtools/accessiblefactory.hxx
@@ -155,7 +155,6 @@ namespace svt
sal_Int32 _nRowPos,
sal_uInt16 _nColPos,
const TriState& _eState,
- sal_Bool _bEnabled,
sal_Bool _bIsTriState
) const = 0;
diff --git a/svtools/inc/svtools/editbrowsebox.hxx b/svtools/inc/svtools/editbrowsebox.hxx
index 908bb8e..c9b4389 100644
--- a/svtools/inc/svtools/editbrowsebox.hxx
+++ b/svtools/inc/svtools/editbrowsebox.hxx
@@ -661,7 +661,7 @@ namespace svt
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint);
::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible > CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState,sal_Bool _bEnabled=sal_True);
+ ::com::sun::star::accessibility::XAccessible > CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState);
protected:
// creates the accessible which wraps the active cell
void implCreateActiveAccessible( );
diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx
index 27ddef2..080d4a3 100644
--- a/svtools/source/brwbox/editbrowsebox2.cxx
+++ b/svtools/source/brwbox/editbrowsebox2.cxx
@@ -41,7 +41,7 @@ namespace svt
using namespace ::com::sun::star::accessibility::AccessibleEventId;
// -----------------------------------------------------------------------------
-Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState,sal_Bool _bEnabled)
+Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState)
{
Reference< XAccessible > xAccessible( GetAccessible() );
Reference< XAccessibleContext > xAccContext;
@@ -58,7 +58,6 @@ Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow,
_nRow,
_nColumnPos,
eState,
- _bEnabled,
sal_True
);
}
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 13850f2..eba8095 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -978,7 +978,7 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleCell( sal_Int32 _nR
sal_Bool bIsCheckBox = IsCellCheckBox( _nRow, _nColumnPos, eState );
if ( bIsCheckBox )
xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleCheckBoxCell(
- m_pAccessible->getAccessibleChild( 0 ), *this, NULL, _nRow, _nColumnPos, eState, sal_True, sal_False );
+ m_pAccessible->getAccessibleChild( 0 ), *this, NULL, _nRow, _nColumnPos, eState, sal_False );
else
xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxTableCell(
m_pAccessible->getAccessibleChild( 0 ), *this, NULL, _nRow, _nColumnPos, OFFSET_NONE );
diff --git a/svtools/source/misc/svtaccessiblefactory.cxx b/svtools/source/misc/svtaccessiblefactory.cxx
index ca15bf5..dcda126 100644
--- a/svtools/source/misc/svtaccessiblefactory.cxx
+++ b/svtools/source/misc/svtaccessiblefactory.cxx
@@ -189,7 +189,6 @@ namespace svt
sal_Int32 /*_nRowPos*/,
sal_uInt16 /*_nColPos*/,
const TriState& /*_eState*/,
- sal_Bool /*_bEnabled*/,
sal_Bool /*_bIsTriState*/
) const
{
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index c93692b..61491ba 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3792,7 +3792,7 @@ Reference< XAccessible > DbGridControl::CreateAccessibleCell( sal_Int32 _nRow, s
eValue = STATE_DONTKNOW;
break;
}
- return DbGridControl_Base::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,eValue,sal_True );
+ return DbGridControl_Base::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,eValue );
}
}
return DbGridControl_Base::CreateAccessibleCell( _nRow, _nColumnPos );
More information about the Libreoffice-commits
mailing list