summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-05-27 13:33:32 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-05-27 13:33:32 +0200
commit34b6b6d0a7021bd27167530d27a9a8ebd45004c5 (patch)
tree95ae5d2e57667ac32e6a0a21bdeb7d3d37c067a4 /cui
parent75cff005c9d2e7273631d575fa3cc81412df6d17 (diff)
parentaa9ff28ea9237d6098d59b7608f64111174a9cdd (diff)
cws tl79: merge with DEV300_m79
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/hldoctp.cxx14
-rw-r--r--cui/source/options/treeopt.cxx29
-rw-r--r--cui/source/tabpages/chardlg.cxx15
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 f1651b0bd1dd..b63d9afc647e 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() )
{