diff options
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/dialogs/ServerDetailsControls.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/langtab.cxx | 13 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 6 | ||||
-rw-r--r-- | svtools/source/uno/toolboxcontroller.cxx | 25 |
4 files changed, 39 insertions, 7 deletions
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index bfbc2e21593b..b3724f87ee00 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -175,11 +175,13 @@ bool DavDetailsContainer::verifyScheme( const OUString& rScheme ) { bValid = true; m_pDialog->m_xCBDavs->set_active(false); + ToggledDavsHdl(*m_pDialog->m_xCBDavs); } else if ( rScheme == "https://" ) { bValid = true; m_pDialog->m_xCBDavs->set_active(true); + ToggledDavsHdl(*m_pDialog->m_xCBDavs); } return bValid; } diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index 2b4311cde7f6..519e7da7268c 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -208,23 +208,24 @@ bool SvtLanguageTable::HasLanguageType( const LanguageType eType ) OUString SvtLanguageTableImpl::GetString( const LanguageType eType ) const { - LanguageType eLang = MsLangId::getReplacementForObsoleteLanguage( eType ); - sal_uInt32 nPos = FindIndex(eLang); + const LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( eType); + const sal_uInt32 nPos = (eType == LANGUAGE_PROCESS_OR_USER_DEFAULT ? + FindIndex(LANGUAGE_SYSTEM) : FindIndex( nLang)); if ( RESARRAY_INDEX_NOTFOUND != nPos && nPos < GetEntryCount() ) return m_aStrings[nPos].first; //Rather than return a fairly useless "Unknown" name, return a geeky but usable-in-a-pinch lang-tag - OUString sLangTag( lcl_getDescription( LanguageTag::convertToBcp47(eType))); + OUString sLangTag( lcl_getDescription( LanguageTag::convertToBcp47(nLang))); SAL_WARN("svtools.misc", "Language: 0x" - << std::hex << eType + << std::hex << nLang << " with unknown name, so returning lang-tag of: " << sLangTag); // And add it to the table if it is an on-the-fly-id, which it usually is, // so it is available in all subsequent language boxes. - if (LanguageTag::isOnTheFlyID( eType)) - const_cast<SvtLanguageTableImpl*>(this)->AddItem( sLangTag, eType); + if (LanguageTag::isOnTheFlyID( nLang)) + const_cast<SvtLanguageTableImpl*>(this)->AddItem( sLangTag, nLang); return sLangTag; } diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 67f5a87862ad..563ef0f76755 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1058,6 +1058,7 @@ HtmlTokenId HTMLParser::GetNextToken_() sTmpBuffer.appendUtf32( nNextCh ); nNextCh = GetNextChar(); } while( '>' != nNextCh && '/' != nNextCh && !rtl::isAsciiWhiteSpace( nNextCh ) && + !linguistic::IsControlChar(nNextCh) && IsParserWorking() && !rInput.eof() ); if( !sTmpBuffer.isEmpty() ) @@ -1135,8 +1136,11 @@ HtmlTokenId HTMLParser::GetNextToken_() if( !bDone ) sTmpBuffer.appendUtf32(nNextCh); } - else + else if (!linguistic::IsControlChar(nNextCh) + || nNextCh == '\r' || nNextCh == '\n' || nNextCh == '\t') + { sTmpBuffer.appendUtf32(nNextCh); + } if( !bDone ) nNextCh = GetNextChar(); } diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 8bd9d94f2366..5193979f36d2 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/util/URLTransformer.hpp> +#include <vcl/commandinfoprovider.hxx> #include <vcl/svapp.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/toolbox.hxx> @@ -501,6 +502,30 @@ void ToolboxController::bindListener() catch ( Exception& ) { } + + // it may be a command alias + if (!xDispatch.is()) + { + try + { + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(listener.first, + vcl::CommandInfoProvider::GetModuleIdentifier(m_xFrame)); + OUString sRealCommand = vcl::CommandInfoProvider::GetRealCommandForCommand(aProperties); + + if (!sRealCommand.isEmpty()) + { + aTargetURL.Complete = sRealCommand; + if ( m_xUrlTransformer.is() ) + m_xUrlTransformer->parseStrict( aTargetURL ); + + xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); + } + } + catch ( Exception& ) + { + } + } + listener.second = xDispatch; Listener aListener( aTargetURL, xDispatch ); |