summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2012-11-05 14:34:27 +0100
committerPetr Mladek <pmladek@suse.cz>2012-11-05 14:34:27 +0100
commitef15a5a4acd3174752484c6aeb570d4d6444b645 (patch)
tree3d1d5b58f85737aa46241aea4c4dabea520cecc2 /vcl
parenta1b0ce05e851e9724c046888a01869eddf9e9db2 (diff)
parentc309ce0227a14330094191c1ef15fa00899defcb (diff)
Merge remote-tracking branch 'origin/libreoffice-3-6-3' into suse-3.6
Conflicts: desktop/source/app/sofficemain.cxx instsetoo_native/util/openoffice.lst solenv/inc/minor.mk Change-Id: I3e9510067c7173f6c71368e70ba6dfe168c5318e
Diffstat (limited to 'vcl')
-rw-r--r--vcl/aqua/source/a11y/aqua11yfocustracker.cxx15
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapper.mm11
-rw-r--r--vcl/aqua/source/app/salsys.cxx19
-rw-r--r--vcl/aqua/source/gdi/salatslayout.cxx2
-rw-r--r--vcl/generic/app/gensys.cxx60
-rw-r--r--vcl/inc/aqua/salsys.h2
-rw-r--r--vcl/inc/generic/gensys.h2
-rw-r--r--vcl/inc/ios/salsys.h2
-rw-r--r--vcl/inc/salsys.hxx7
-rw-r--r--vcl/inc/vcl/svapp.hxx6
-rw-r--r--vcl/inc/win/salsys.h2
-rw-r--r--vcl/ios/source/app/salsys.cxx19
-rw-r--r--vcl/source/app/svapp.cxx2
-rw-r--r--vcl/source/app/svdata.cxx12
-rw-r--r--vcl/source/control/button.cxx13
-rw-r--r--vcl/win/source/app/salinfo.cxx2
16 files changed, 131 insertions, 45 deletions
diff --git a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx b/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
index 822b2b498c99..3bb11688d107 100644
--- a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
+++ b/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
@@ -81,7 +81,20 @@ long AquaA11yFocusTracker::WindowEventHandler(AquaA11yFocusTracker *pFocusTracke
pFocusTracker->tabpage_activated( getWindow(pEvent) );
break;
case VCLEVENT_MENU_HIGHLIGHT:
- pFocusTracker->menu_highlighted( static_cast < const VclMenuEvent * > (pEvent) );
+ // Inspired by code in WindowEventHandler in
+ // vcl/unx/gtk/a11y/atkutil.cxx, find out what kind of event
+ // it is to avoid blindly using a static_cast and crash,
+ // fdo#47275.
+ if( const VclMenuEvent* pMenuEvent = dynamic_cast < const VclMenuEvent* > (pEvent) )
+ {
+ pFocusTracker->menu_highlighted( pMenuEvent );
+ }
+ else if( const VclAccessibleEvent* pAccEvent = dynamic_cast < const VclAccessibleEvent* > (pEvent) )
+ {
+ Reference< XAccessible > xAccessible = pAccEvent->GetAccessible();
+ if( xAccessible.is() )
+ pFocusTracker->setFocusedObject( xAccessible );
+ }
break;
default:
break;
diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index 9f4e55e408a0..1be3e4ae5910 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -378,8 +378,17 @@ static BOOL isPopupMenuOpen = NO;
-(id)windowAttribute {
// go upstairs until reaching the broken connection
AquaA11yWrapper * aWrapper = self;
+ int loops = 0;
while ( [ aWrapper accessibleContext ] -> getAccessibleParent().is() ) {
- aWrapper = [ AquaA11yFactory wrapperForAccessibleContext: [ aWrapper accessibleContext ] -> getAccessibleParent() -> getAccessibleContext() ];
+ AquaA11yWrapper *aTentativeParentWrapper = [ AquaA11yFactory wrapperForAccessibleContext: [ aWrapper accessibleContext ] -> getAccessibleParent() -> getAccessibleContext() ];
+ // Quick-and-dirty fix for infinite loop after fixing crash in
+ // fdo#47275
+ if ( aTentativeParentWrapper == aWrapper )
+ break;
+ // Even dirtier fix for infinite loop in fdo#55156
+ if ( loops++ == 100 )
+ break;
+ aWrapper = aTentativeParentWrapper;
[ aWrapper autorelease ];
}
// get associated NSWindow
diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx
index 7c6f683751c8..6c65178cae92 100644
--- a/vcl/aqua/source/app/salsys.cxx
+++ b/vcl/aqua/source/app/salsys.cxx
@@ -106,9 +106,13 @@ rtl::OUString AquaSalSystem::GetDisplayScreenName( unsigned int nScreen )
return aRet;
}
-static NSString* getStandardString( int nButtonId )
+static NSString* getStandardString( int nButtonId, bool bUseResources )
{
- rtl::OUString aText( Button::GetStandardText( nButtonId ) );
+ rtl::OUString aText;
+ if( bUseResources )
+ {
+ aText = Button::GetStandardText( nButtonId );
+ }
if( aText.isEmpty() ) // this is for bad cases, we might be missing the vcl resource
{
switch( nButtonId )
@@ -127,7 +131,7 @@ static NSString* getStandardString( int nButtonId )
int AquaSalSystem::ShowNativeMessageBox( const rtl::OUString& rTitle,
const rtl::OUString& rMessage,
int nButtonCombination,
- int nDefaultButton)
+ int nDefaultButton, bool bUseResources)
{
NSString* pTitle = CreateNSString( rTitle );
NSString* pMessage = CreateNSString( rMessage );
@@ -166,11 +170,14 @@ int AquaSalSystem::ShowNativeMessageBox( const rtl::OUString& rTitle,
if( aButtonIds[nC].nDefaultButton == nDefaultButton )
{
if( aButtonIds[nC].nTextIds[0] != -1 )
- pDefText = getStandardString( aButtonIds[nC].nTextIds[0] );
+ pDefText = getStandardString(
+ aButtonIds[nC].nTextIds[0], bUseResources );
if( aButtonIds[nC].nTextIds[1] != -1 )
- pAltText = getStandardString( aButtonIds[nC].nTextIds[1] );
+ pAltText = getStandardString(
+ aButtonIds[nC].nTextIds[1], bUseResources );
if( aButtonIds[nC].nTextIds[2] != -1 )
- pOthText = getStandardString( aButtonIds[nC].nTextIds[2] );
+ pOthText = getStandardString(
+ aButtonIds[nC].nTextIds[2], bUseResources );
break;
}
}
diff --git a/vcl/aqua/source/gdi/salatslayout.cxx b/vcl/aqua/source/gdi/salatslayout.cxx
index f368f514aff1..cf827ef595f2 100644
--- a/vcl/aqua/source/gdi/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/salatslayout.cxx
@@ -436,7 +436,7 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
{
const SubPortion& rSubPortion = *it;
// calculate sub-portion offset for rotated text
- Fixed nXOfsFixed = 0, nYOfsFixed = 0;
+ Fixed nXOfsFixed = rSubPortion.mnXOffset, nYOfsFixed = 0;
if( rAquaGraphics.mnATSUIRotation != 0 )
{
const double fRadians = rAquaGraphics.mnATSUIRotation * (M_PI/0xB40000);
diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx
index ded4900e8809..4a26a4b19968 100644
--- a/vcl/generic/app/gensys.cxx
+++ b/vcl/generic/app/gensys.cxx
@@ -47,6 +47,47 @@
using namespace com::sun::star;
+namespace {
+
+OUString GetNativeMessageBoxButtonText( int nButtonId, bool bUseResources )
+{
+ OUString aText;
+ if( bUseResources )
+ {
+ aText = Button::GetStandardText( nButtonId );
+ }
+ if( aText.isEmpty() )
+ {
+ switch( nButtonId )
+ {
+ case BUTTON_OK:
+ aText = "OK";
+ break;
+ case BUTTON_CANCEL:
+ aText = "Cancel";
+ break;
+ case BUTTON_ABORT:
+ aText = "Abort";
+ break;
+ case BUTTON_RETRY:
+ aText = "Retry";
+ break;
+ case BUTTON_IGNORE:
+ aText = "Ignore";
+ break;
+ case BUTTON_YES:
+ aText = "Yes";
+ break;
+ case BUTTON_NO:
+ aText = "No";
+ break;
+ }
+ }
+ return aText;
+}
+
+}
+
SalGenericSystem::SalGenericSystem()
{
}
@@ -56,7 +97,8 @@ SalGenericSystem::~SalGenericSystem()
}
int SalGenericSystem::ShowNativeMessageBox( const rtl::OUString& rTitle, const rtl::OUString& rMessage,
- int nButtonCombination, int nDefaultButton )
+ int nButtonCombination, int nDefaultButton,
+ bool bUseResources )
{
int nDefButton = 0;
std::list< rtl::OUString > aButtons;
@@ -67,15 +109,15 @@ int SalGenericSystem::ShowNativeMessageBox( const rtl::OUString& rTitle, const r
if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK ||
nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL )
{
- aButtons.push_back( Button::GetStandardText( BUTTON_OK ) );
+ aButtons.push_back( GetNativeMessageBoxButtonText( BUTTON_OK, bUseResources ) );
nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK;
}
if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL ||
nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO )
{
- aButtons.push_back( Button::GetStandardText( BUTTON_YES ) );
+ aButtons.push_back( GetNativeMessageBoxButtonText( BUTTON_YES, bUseResources ) );
nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES;
- aButtons.push_back( Button::GetStandardText( BUTTON_NO ) );
+ aButtons.push_back( GetNativeMessageBoxButtonText( BUTTON_NO, bUseResources ) );
nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO;
if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO )
nDefButton = 1;
@@ -86,21 +128,21 @@ int SalGenericSystem::ShowNativeMessageBox( const rtl::OUString& rTitle, const r
{
if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL )
{
- aButtons.push_back( Button::GetStandardText( BUTTON_RETRY ) );
+ aButtons.push_back( GetNativeMessageBoxButtonText( BUTTON_RETRY, bUseResources ) );
nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY;
}
- aButtons.push_back( Button::GetStandardText( BUTTON_CANCEL ) );
+ aButtons.push_back( GetNativeMessageBoxButtonText( BUTTON_CANCEL, bUseResources ) );
nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL;
if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL )
nDefButton = aButtons.size()-1;
}
if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE )
{
- aButtons.push_back( Button::GetStandardText( BUTTON_ABORT ) );
+ aButtons.push_back( GetNativeMessageBoxButtonText( BUTTON_ABORT, bUseResources ) );
nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT;
- aButtons.push_back( Button::GetStandardText( BUTTON_RETRY ) );
+ aButtons.push_back( GetNativeMessageBoxButtonText( BUTTON_RETRY, bUseResources ) );
nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY;
- aButtons.push_back( Button::GetStandardText( BUTTON_IGNORE ) );
+ aButtons.push_back( GetNativeMessageBoxButtonText( BUTTON_IGNORE, bUseResources ) );
nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE;
switch( nDefaultButton )
{
diff --git a/vcl/inc/aqua/salsys.h b/vcl/inc/aqua/salsys.h
index 6491cab50048..d352ebb87ddb 100644
--- a/vcl/inc/aqua/salsys.h
+++ b/vcl/inc/aqua/salsys.h
@@ -52,7 +52,7 @@ public:
virtual int ShowNativeMessageBox( const rtl::OUString& rTitle,
const rtl::OUString& rMessage,
int nButtonCombination,
- int nDefaultButton);
+ int nDefaultButton, bool bUseResources);
};
diff --git a/vcl/inc/generic/gensys.h b/vcl/inc/generic/gensys.h
index e485cc50f215..bf98fe657b16 100644
--- a/vcl/inc/generic/gensys.h
+++ b/vcl/inc/generic/gensys.h
@@ -51,7 +51,7 @@ class VCL_DLLPUBLIC SalGenericSystem : public SalSystem
virtual int ShowNativeMessageBox( const rtl::OUString& rTitle,
const rtl::OUString& rMessage,
int nButtonCombination,
- int nDefaultButton);
+ int nDefaultButton, bool bUseResources);
// simple helpers primarily for X Windowing W_CLASS hints
static const char *getFrameResName();
diff --git a/vcl/inc/ios/salsys.h b/vcl/inc/ios/salsys.h
index 2184d2b23c30..17c831cf88a2 100644
--- a/vcl/inc/ios/salsys.h
+++ b/vcl/inc/ios/salsys.h
@@ -46,7 +46,7 @@ public:
virtual int ShowNativeMessageBox( const rtl::OUString& rTitle,
const rtl::OUString& rMessage,
int nButtonCombination,
- int nDefaultButton);
+ int nDefaultButton, bool bUseResources);
};
#endif // _SV_SALSYS_H
diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx
index 6c9eb37ae011..60b89ad917f6 100644
--- a/vcl/inc/salsys.hxx
+++ b/vcl/inc/salsys.hxx
@@ -133,6 +133,10 @@ public:
The effect of specifying a button that doesn't belong
to the specified button combination is undefined.
+ @param bUseResources
+ If false, assume initialization of the application failed early and do
+ not try to access any resources.
+
@returns the identifier of the button that was pressed by the user.
See button identifier above. If the function fails the
return value is 0.
@@ -140,7 +144,8 @@ public:
virtual int ShowNativeMessageBox( const rtl::OUString& rTitle,
const rtl::OUString& rMessage,
int nButtonCombination,
- int nDefaultButton) = 0;
+ int nDefaultButton,
+ bool bUseResources ) = 0;
};
SalSystem* ImplGetSalSystem();
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index af766f4a9762..9e1d88d9cbf0 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -111,9 +111,9 @@ class VCL_DLLPUBLIC ApplicationEvent
{
public:
enum Type {
- TYPE_ACCEPT, TYPE_APPEAR, TYPE_HELP, TYPE_OPEN, TYPE_OPENHELPURL,
- TYPE_PRINT, TYPE_PRIVATE_DOSHUTDOWN, TYPE_QUICKSTART, TYPE_SHOWDIALOG,
- TYPE_UNACCEPT
+ TYPE_ACCEPT, TYPE_APPEAR, TYPE_HELP, TYPE_VERSION, TYPE_OPEN,
+ TYPE_OPENHELPURL, TYPE_PRINT, TYPE_PRIVATE_DOSHUTDOWN, TYPE_QUICKSTART,
+ TYPE_SHOWDIALOG, TYPE_UNACCEPT
};
ApplicationEvent() {}
diff --git a/vcl/inc/win/salsys.h b/vcl/inc/win/salsys.h
index b15c1a773600..c70b03219730 100644
--- a/vcl/inc/win/salsys.h
+++ b/vcl/inc/win/salsys.h
@@ -76,7 +76,7 @@ public:
virtual int ShowNativeMessageBox( const rtl::OUString& rTitle,
const rtl::OUString& rMessage,
int nButtonCombination,
- int nDefaultButton);
+ int nDefaultButton, bool bUseResources);
bool initMonitors();
// discards monitorinfo; used by WM_DISPLAYCHANGED handler
void clearMonitors();
diff --git a/vcl/ios/source/app/salsys.cxx b/vcl/ios/source/app/salsys.cxx
index 02cd6442525a..8501e3f6ba8d 100644
--- a/vcl/ios/source/app/salsys.cxx
+++ b/vcl/ios/source/app/salsys.cxx
@@ -106,9 +106,13 @@ rtl::OUString IosSalSystem::GetDisplayScreenName( unsigned int nScreen )
return aRet;
}
-static NSString* getStandardString( int nButtonId )
+static NSString* getStandardString( int nButtonId, bool bUseResources )
{
- rtl::OUString aText( Button::GetStandardText( nButtonId ) );
+ rtl::OUString aText;
+ if( bUseResources )
+ {
+ aText = Button::GetStandardText( nButtonId );
+ }
if( ! aText.getLength() ) // this is for bad cases, we might be missing the vcl resource
{
switch( nButtonId )
@@ -150,7 +154,7 @@ static NSString* getStandardString( int nButtonId )
int IosSalSystem::ShowNativeMessageBox( const rtl::OUString& rTitle,
const rtl::OUString& rMessage,
int nButtonCombination,
- int nDefaultButton)
+ int nDefaultButton, bool bUseResources)
{
NSString* pTitle = CreateNSString( rTitle );
NSString* pMessage = CreateNSString( rMessage );
@@ -189,11 +193,14 @@ int IosSalSystem::ShowNativeMessageBox( const rtl::OUString& rTitle,
if( aButtonIds[nC].nDefaultButton == nDefaultButton )
{
if( aButtonIds[nC].nTextIds[0] != -1 )
- pDefText = getStandardString( aButtonIds[nC].nTextIds[0] );
+ pDefText = getStandardString(
+ aButtonIds[nC].nTextIds[0], bUseResources );
if( aButtonIds[nC].nTextIds[1] != -1 )
- pAltText = getStandardString( aButtonIds[nC].nTextIds[1] );
+ pAltText = getStandardString(
+ aButtonIds[nC].nTextIds[1], bUseResources );
if( aButtonIds[nC].nTextIds[2] != -1 )
- pOthText = getStandardString( aButtonIds[nC].nTextIds[2] );
+ pOthText = getStandardString(
+ aButtonIds[nC].nTextIds[2], bUseResources );
break;
}
}
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 7e6d54471169..b98f3a6a68b0 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1736,7 +1736,7 @@ void Application::ShowNativeErrorBox(const String& sTitle ,
sTitle,
sMessage,
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK,
- SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK);
+ SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK, false);
if (btn != SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK) {
OSL_TRACE("ShowNativeMessageBox returned %d", btn);
}
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index c1c0954175ef..c7432efbbbfe 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -410,7 +410,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
aTitle,
ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL,
- SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL);
+ SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, true);
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
@@ -434,7 +434,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
aTitle,
ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL,
- SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL);
+ SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, true);
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
@@ -458,7 +458,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
aTitle,
ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL,
- SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL);
+ SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, true);
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
@@ -482,7 +482,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
aTitle,
ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL,
- SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL);
+ SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, true);
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
@@ -522,7 +522,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
aTitle,
ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL,
- SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL);
+ SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, true);
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
@@ -536,7 +536,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
aTitle,
ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK,
- SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK);
+ SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK, true);
}
}
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 96507fde1621..b5ba7e2d18d9 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -152,12 +152,15 @@ XubString Button::GetStandardText( StandardButtonType eButton )
sal_uInt32 nResId = aResIdAry[(sal_uInt16)eButton].nResId;
aText = ResId(nResId, *pResMgr).toString();
- // Windows (apparently) has some magic auto-accelerator evil around
- // ok / cancel so add this only for Unix
-#ifdef UNX
- if( nResId == SV_BUTTONTEXT_OK || nResId == SV_BUTTONTEXT_CANCEL )
- aText.Insert( String::CreateFromAscii("~"), 0 );
+ if (nResId == SV_BUTTONTEXT_OK || nResId == SV_BUTTONTEXT_CANCEL)
+ {
+#ifndef WNT
+ // Windows (apparently) has some magic auto-accelerator evil around
+ // ok / cancel so add accelerators only for Unix
+ if (aText.Search('~') == STRING_NOTFOUND)
+ aText.Insert(String::CreateFromAscii("~"), 0);
#endif
+ }
}
else
{
diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx
index b5576c97ebb1..0a0dcacc79d6 100644
--- a/vcl/win/source/app/salinfo.cxx
+++ b/vcl/win/source/app/salinfo.cxx
@@ -220,7 +220,7 @@ static int DEFAULT_BTN_MAPPING_TABLE[][8] =
{ MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1 } //RETRY_CANCEL
};
-int WinSalSystem::ShowNativeMessageBox(const rtl::OUString& rTitle, const rtl::OUString& rMessage, int nButtonCombination, int nDefaultButton)
+int WinSalSystem::ShowNativeMessageBox(const rtl::OUString& rTitle, const rtl::OUString& rMessage, int nButtonCombination, int nDefaultButton, SAL_UNUSED_PARAMETER bool)
{
DBG_ASSERT( nButtonCombination >= SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK &&
nButtonCombination <= SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL &&