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
663fd492
Kaydet (Commit)
663fd492
authored
Kas 14, 2013
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
startcenter: Make the Help and Extensions button work.
Change-Id: I9017dd830c44f642f7d4821345f3831c9031ff9f
üst
4cdb874b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
6 deletions
+55
-6
backingwindow.cxx
sfx2/source/dialog/backingwindow.cxx
+52
-4
backingwindow.hxx
sfx2/source/dialog/backingwindow.hxx
+3
-2
No files found.
sfx2/source/dialog/backingwindow.cxx
Dosyayı görüntüle @
663fd492
...
...
@@ -25,18 +25,21 @@
#include <unotools/dynamicmenuoptions.hxx>
#include <svtools/openfiledroptargetlistener.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/langhelp.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/document/UpdateDocMode.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/
container/XNameAccess
.hpp>
#include <com/sun/star/
configuration/theDefaultProvider
.hpp>
#include <com/sun/star/
system/SystemShellExecute
.hpp>
#include <com/sun/star/
system/SystemShellExecuteFlags
.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
...
...
@@ -141,6 +144,9 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
mpDBAllButton
->
SetHelpId
(
".HelpId:StartCenter:DBButton"
);
mpMathAllButton
->
SetHelpId
(
".HelpId:StartCenter:MathButton"
);
mpHelpButton
->
SetHelpId
(
".HelpId:StartCenter:Info"
);
mpExtensionsButton
->
SetHelpId
(
".HelpId:StartCenter:Extensions"
);
// init background
SetBackground
();
}
...
...
@@ -216,8 +222,6 @@ void BackingWindow::initControls()
setupButton
(
mpOpenButton
);
setupButton
(
mpTemplateButton
);
mpCreateLabel
->
SetControlForeground
(
aButtonsText
);
setupButton
(
mpWriterAllButton
);
setupButton
(
mpDrawAllButton
);
setupButton
(
mpCalcAllButton
);
...
...
@@ -225,6 +229,12 @@ void BackingWindow::initControls()
setupButton
(
mpImpressAllButton
);
setupButton
(
mpMathAllButton
);
mpHelpButton
->
SetClickHdl
(
LINK
(
this
,
BackingWindow
,
ExtLinkClickHdl
));
mpExtensionsButton
->
SetClickHdl
(
LINK
(
this
,
BackingWindow
,
ExtLinkClickHdl
));
// setup nice colors
mpCreateLabel
->
SetControlForeground
(
aButtonsText
);
mpHelpButton
->
SetControlForeground
(
aButtonsText
);
mpExtensionsButton
->
SetControlForeground
(
aButtonsText
);
...
...
@@ -340,6 +350,44 @@ void BackingWindow::Resize()
Invalidate
();
}
IMPL_LINK
(
BackingWindow
,
ExtLinkClickHdl
,
Button
*
,
pButton
)
{
OUString
aNode
;
if
(
pButton
==
mpExtensionsButton
)
aNode
=
"AddFeatureURL"
;
else
if
(
pButton
==
mpHelpButton
)
aNode
=
"InfoURL"
;
if
(
!
aNode
.
isEmpty
())
{
try
{
Sequence
<
Any
>
args
(
1
);
PropertyValue
val
(
"nodepath"
,
0
,
Any
(
OUString
(
"/org.openoffice.Office.Common/Help/StartCenter"
)),
PropertyState_DIRECT_VALUE
);
args
.
getArray
()[
0
]
<<=
val
;
Reference
<
lang
::
XMultiServiceFactory
>
xConfig
=
configuration
::
theDefaultProvider
::
get
(
comphelper
::
getProcessComponentContext
()
);
Reference
<
container
::
XNameAccess
>
xNameAccess
(
xConfig
->
createInstanceWithArguments
(
SERVICENAME_CFGREADACCESS
,
args
),
UNO_QUERY
);
if
(
xNameAccess
.
is
())
{
OUString
sURL
;
Any
value
(
xNameAccess
->
getByName
(
aNode
));
sURL
=
value
.
get
<
OUString
>
();
localizeWebserviceURI
(
sURL
);
Reference
<
system
::
XSystemShellExecute
>
xSystemShellExecute
(
system
::
SystemShellExecute
::
create
(
comphelper
::
getProcessComponentContext
()));
xSystemShellExecute
->
execute
(
sURL
,
OUString
(),
com
::
sun
::
star
::
system
::
SystemShellExecuteFlags
::
URIS_ONLY
);
}
}
catch
(
const
Exception
&
)
{
}
}
return
0
;
}
IMPL_LINK
(
BackingWindow
,
ClickHdl
,
Button
*
,
pButton
)
{
// dispatch the appropriate URL and end the dialog
...
...
sfx2/source/dialog/backingwindow.hxx
Dosyayı görüntüle @
663fd492
...
...
@@ -95,8 +95,9 @@ class BackingWindow
const
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>&
=
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
()
);
DECL_LINK
(
ClickHdl
,
Button
*
);
DECL_LINK
(
OpenTemplateHdl
,
ThumbnailViewItem
*
);
DECL_LINK
(
ClickHdl
,
Button
*
);
DECL_LINK
(
ExtLinkClickHdl
,
Button
*
);
DECL_LINK
(
OpenTemplateHdl
,
ThumbnailViewItem
*
);
void
initControls
();
...
...
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