diff options
author | Niklas Nebel <nn@openoffice.org> | 2010-05-26 19:09:46 +0200 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2010-05-26 19:09:46 +0200 |
commit | 6b758c65f7b74edb3145f7de28630419878dd4ef (patch) | |
tree | d410a66c17aeb41494533918087aba675bf7b92a /cui | |
parent | 7d676f28e931c0cb87174f7bfa5cf204b7f60812 (diff) | |
parent | aa9ff28ea9237d6098d59b7608f64111174a9cdd (diff) |
calc54: merge with DEV300_m79
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hldoctp.cxx | 14 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 29 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 15 |
3 files changed, 41 insertions, 17 deletions
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index d8e5878c3a8e..a87d7710f484 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -39,7 +39,6 @@ sal_Char __READONLY_DATA sHash[] = "#"; sal_Char __READONLY_DATA sFileScheme[] = INET_FILE_SCHEME; -sal_Char __READONLY_DATA sPortalFileScheme[] = "vnd.sun.star.wfs://"; sal_Char __READONLY_DATA sNewsSRVScheme[] = "news://"; // TODO news:// is nonsense sal_Char __READONLY_DATA sHTTPScheme[] = INET_HTTP_SCHEME; @@ -170,8 +169,7 @@ void SvxHyperlinkDocTp::GetCurentItemData ( String& aStrURL, String& aStrName, // get data from standard-fields aStrURL = GetCurrentURL(); - if( aStrURL.EqualsIgnoreCaseAscii( sFileScheme ) || - aStrURL.EqualsIgnoreCaseAscii( sPortalFileScheme ) ) + if( aStrURL.EqualsIgnoreCaseAscii( sFileScheme ) ) aStrURL=aEmptyStr; GetDataFromCommonFields( aStrName, aStrIntName, aStrFrame, eMode ); @@ -212,8 +210,7 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickFileopenHdl_Impl, void *, EMPTYARG ) com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0, GetParent() ); String aOldURL( GetCurrentURL() ); - if( aOldURL.EqualsIgnoreCaseAscii( sFileScheme, 0, sizeof( sFileScheme ) - 1 ) || - aOldURL.EqualsIgnoreCaseAscii( sPortalFileScheme, 0, sizeof( sFileScheme ) - 1 ) ) + if( aOldURL.EqualsIgnoreCaseAscii( sFileScheme, 0, sizeof( sFileScheme ) - 1 ) ) { aDlg.SetDisplayDirectory( aOldURL ); } @@ -250,15 +247,13 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickTargetHdl_Impl, void *, EMPTYARG ) if ( GetPathType ( maStrURL ) == Type_ExistsFile || maStrURL == aEmptyStr || maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) || - maStrURL.EqualsIgnoreCaseAscii( sPortalFileScheme ) || maStrURL.SearchAscii( sHash ) == 0 ) { mpMarkWnd->SetError( LERR_NOERROR ); EnterWait(); - if ( maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) || - maStrURL.EqualsIgnoreCaseAscii( sPortalFileScheme ) ) + if ( maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) ) mpMarkWnd->RefreshTree ( aEmptyStr ); else mpMarkWnd->RefreshTree ( maStrURL ); @@ -305,8 +300,7 @@ IMPL_LINK ( SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, EMPTYARG ) { EnterWait(); - if ( maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) || - maStrURL.EqualsIgnoreCaseAscii( sPortalFileScheme ) ) + if ( maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) ) mpMarkWnd->RefreshTree ( aEmptyStr ); else mpMarkWnd->RefreshTree ( maStrURL ); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 00e74da32557..880f8d263c6b 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -129,6 +129,13 @@ #include <svx/drawitem.hxx> #include <rtl/uri.hxx> +#ifdef LINUX +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#endif + using namespace ::com::sun::star; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; @@ -2195,6 +2202,28 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) if ( nPageId == RID_SVXPAGE_INET_MOZPLUGIN ) continue; #endif +#ifdef LINUX + // Disable Mozilla Plug-in tab-page on Linux if we find a + // globally installed plugin + if ( nPageId == RID_SVXPAGE_INET_MOZPLUGIN ) { + struct stat sb; + char *p; + bool bHaveSystemWidePlugin = false; + char mozpaths[]="/usr/lib/mozilla/plugins/libnpsoplugin.so:/usr/lib/firefox/plugins/libnpsoplugin.so:/usr/lib/mozilla-firefox/plugins/libnpsoplugin.so:/usr/lib/iceweasel/plugins/libnpsoplugin.so:/usr/lib/iceape/plugins/libnpsoplugin.so:/usr/lib/browser-plugins/libnpsoplugin.so:/usr/lib64/browser-plugins/libnpsoplugin.so"; + + p = strtok(mozpaths, ":"); + while (p != NULL) { + if (stat(p, &sb) != -1) { + bHaveSystemWidePlugin = true; + break; + } + p = strtok(NULL, ":"); + } + + if (bHaveSystemWidePlugin == true) + continue; + } +#endif AddTabPage( nPageId, rInetArray.GetString(i), nGroup ); } } diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 696c1c62cb23..1f166b8f8d41 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -3386,11 +3386,6 @@ USHORT* SvxCharPositionPage::GetRanges() } // ----------------------------------------------------------------------- -#define ENABLE_AND_CHECK( aCheckBox ) \ - if ( !aCheckBox.IsEnabled() ) \ - aCheckBox.Enable(); \ - aCheckBox.Check( TRUE ) - void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { String sUser = GetUserData(); @@ -3431,6 +3426,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) m_aFontSizeEdit.Enable(); short nFac; + sal_Bool bAutomatic(sal_False); if ( nEsc > 0 ) { @@ -3438,8 +3434,8 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) m_aHighPosBtn.Check( TRUE ); if ( nEsc == DFLT_ESC_AUTO_SUPER ) { - ENABLE_AND_CHECK( m_aHighLowRB ); nEsc = DFLT_ESC_SUPER; + bAutomatic = sal_True; } } else @@ -3448,10 +3444,15 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) m_aLowPosBtn.Check( TRUE ); if ( nEsc == DFLT_ESC_AUTO_SUB ) { - ENABLE_AND_CHECK( m_aHighLowRB ); nEsc = DFLT_ESC_SUB; + bAutomatic = sal_True; } } + if (!m_aHighLowRB.IsEnabled()) + { + m_aHighLowRB.Enable(); + } + m_aHighLowRB.Check(bAutomatic); if ( m_aHighLowRB.IsChecked() ) { |