Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b664d929
Kaydet (Commit)
b664d929
authored
Ara 13, 2011
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Disable gtk3 at run-time, unless in experimental mode.
üst
55b9dc00
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
67 deletions
+79
-67
gensys.cxx
vcl/generic/app/gensys.cxx
+70
-0
gensys.h
vcl/inc/generic/gensys.h
+1
-0
salplug.cxx
vcl/unx/generic/plugadapt/salplug.cxx
+6
-0
salprn-gtk.cxx
vcl/unx/gtk/gdi/salprn-gtk.cxx
+1
-66
gtkframe.cxx
vcl/unx/gtk/window/gtkframe.cxx
+1
-1
No files found.
vcl/generic/app/gensys.cxx
Dosyayı görüntüle @
b664d929
...
...
@@ -40,6 +40,13 @@
#include <osl/process.h>
#include <osl/thread.h>
#include "vcl/unohelp.hxx"
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
using
namespace
com
::
sun
::
star
;
SalGenericSystem
::
SalGenericSystem
()
{
}
...
...
@@ -174,4 +181,67 @@ rtl::OString SalGenericSystem::getFrameResName( SalExtStyle nStyle )
return
aBuf
.
makeStringAndClear
();
}
bool
SalGenericSystem
::
enableExperimentalFeatures
()
{
bool
bEnable
=
true
;
try
{
// get service provider
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
const
xSMgr
(
vcl
::
unohelper
::
GetMultiServiceFactory
());
// create configuration hierachical access name
if
(
xSMgr
.
is
())
{
try
{
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
const
xConfigProvider
(
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
(
xSMgr
->
createInstance
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.configuration.ConfigurationProvider"
))),
uno
::
UNO_QUERY
))
;
if
(
xConfigProvider
.
is
())
{
uno
::
Sequence
<
uno
::
Any
>
aArgs
(
1
);
beans
::
PropertyValue
aVal
;
aVal
.
Name
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"nodepath"
));
aVal
.
Value
<<=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/org.openoffice.Office.Common/Misc"
));
aArgs
.
getArray
()[
0
]
<<=
aVal
;
uno
::
Reference
<
container
::
XNameAccess
>
const
xConfigAccess
(
uno
::
Reference
<
container
::
XNameAccess
>
(
xConfigProvider
->
createInstanceWithArguments
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.configuration.ConfigurationAccess"
)),
aArgs
),
uno
::
UNO_QUERY
))
;
if
(
xConfigAccess
.
is
())
{
try
{
sal_Bool
bValue
=
sal_False
;
uno
::
Any
const
aAny
(
xConfigAccess
->
getByName
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ExperimentalMode"
))));
if
(
aAny
>>=
bValue
)
bEnable
=
bValue
;
}
catch
(
container
::
NoSuchElementException
const
&
)
{
}
catch
(
lang
::
WrappedTargetException
const
&
)
{
}
}
}
}
catch
(
uno
::
Exception
const
&
)
{
}
}
}
catch
(
lang
::
WrappedTargetException
const
&
)
{
}
return
bEnable
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/inc/generic/gensys.h
Dosyayı görüntüle @
b664d929
...
...
@@ -57,6 +57,7 @@ class VCL_DLLPUBLIC SalGenericSystem : public SalSystem
static
const
char
*
getFrameResName
();
static
const
char
*
getFrameClassName
();
static
rtl
::
OString
getFrameResName
(
SalExtStyle
nStyle
);
static
bool
enableExperimentalFeatures
();
};
#endif // _SV_GENSYS_H
...
...
vcl/unx/generic/plugadapt/salplug.cxx
Dosyayı görüntüle @
b664d929
...
...
@@ -33,6 +33,7 @@
#include "rtl/ustrbuf.hxx"
#include "salinst.hxx"
#include "generic/gensys.h"
#include "generic/gendata.hxx"
#include "unx/desktops.hxx"
#include "vcl/printerinfomanager.hxx"
...
...
@@ -52,6 +53,11 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
{
SalInstance
*
pInst
=
NULL
;
// Disable gtk3 plugin load except in experimental mode for now.
if
(
rModuleBase
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"gtk3"
)
)
&&
!
SalGenericSystem
::
enableExperimentalFeatures
()
)
return
NULL
;
OUStringBuffer
aModName
(
128
);
aModName
.
appendAscii
(
SAL_DLLPREFIX
"vclplug_"
);
aModName
.
append
(
rModuleBase
);
...
...
vcl/unx/gtk/gdi/salprn-gtk.cxx
Dosyayı görüntüle @
b664d929
...
...
@@ -39,7 +39,6 @@
#include "vcl/help.hxx"
#include "vcl/print.hxx"
#include "vcl/svapp.hxx"
#include "vcl/unohelp.hxx"
#include "vcl/window.hxx"
#include <gtk/gtk.h>
...
...
@@ -53,7 +52,6 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
...
...
@@ -180,73 +178,10 @@ lcl_getGtkSalInstance()
return
*
static_cast
<
GtkInstance
*>
(
GetGtkSalData
()
->
m_pInstance
);
}
bool
lcl_enableExperimentalFeatures
()
{
bool
bEnable
=
true
;
try
{
// get service provider
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
const
xSMgr
(
vcl
::
unohelper
::
GetMultiServiceFactory
());
// create configuration hierachical access name
if
(
xSMgr
.
is
())
{
try
{
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
const
xConfigProvider
(
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
(
xSMgr
->
createInstance
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.configuration.ConfigurationProvider"
))),
UNO_QUERY
))
;
if
(
xConfigProvider
.
is
())
{
uno
::
Sequence
<
uno
::
Any
>
aArgs
(
1
);
beans
::
PropertyValue
aVal
;
aVal
.
Name
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"nodepath"
));
aVal
.
Value
<<=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/org.openoffice.Office.Common/Misc"
));
aArgs
.
getArray
()[
0
]
<<=
aVal
;
uno
::
Reference
<
container
::
XNameAccess
>
const
xConfigAccess
(
uno
::
Reference
<
container
::
XNameAccess
>
(
xConfigProvider
->
createInstanceWithArguments
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.configuration.ConfigurationAccess"
)),
aArgs
),
UNO_QUERY
))
;
if
(
xConfigAccess
.
is
())
{
try
{
sal_Bool
bValue
=
sal_False
;
uno
::
Any
const
aAny
(
xConfigAccess
->
getByName
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ExperimentalMode"
))));
if
(
aAny
>>=
bValue
)
bEnable
=
bValue
;
}
catch
(
container
::
NoSuchElementException
const
&
)
{
}
catch
(
lang
::
WrappedTargetException
const
&
)
{
}
}
}
}
catch
(
uno
::
Exception
const
&
)
{
}
}
}
catch
(
lang
::
WrappedTargetException
const
&
)
{
}
return
bEnable
;
}
bool
lcl_useSystemPrintDialog
()
{
return
vcl
::
useSystemPrintDialog
()
&&
lcl_
enableExperimentalFeatures
()
return
vcl
::
useSystemPrintDialog
()
&&
SalGenericSystem
::
enableExperimentalFeatures
()
&&
lcl_getGtkSalInstance
().
getPrintWrapper
()
->
supportsPrinting
();
}
...
...
vcl/unx/gtk/window/gtkframe.cxx
Dosyayı görüntüle @
b664d929
...
...
@@ -3285,7 +3285,7 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame )
RevertToParent
,
CurrentTime
);
}
#else
(
void
)
pWidget
;
(
void
)
pWidget
;
(
void
)
bSetFocus
;
# warning FIXME no set input focus ...
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment