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
c163123e
Kaydet (Commit)
c163123e
authored
Şub 14, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
adapt macro security dialog code to .ui
Change-Id: I0527ff30508bd7fd9182ff0bfec87aef7907f1fb
üst
62726df9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
95 deletions
+47
-95
global.hrc
xmlsecurity/inc/xmlsecurity/global.hrc
+0
-3
macrosecurity.hxx
xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
+14
-13
dialogs.hrc
xmlsecurity/source/dialogs/dialogs.hrc
+0
-1
helpids.hrc
xmlsecurity/source/dialogs/helpids.hrc
+0
-1
macrosecurity.cxx
xmlsecurity/source/dialogs/macrosecurity.cxx
+19
-18
macrosecurity.src
xmlsecurity/source/dialogs/macrosecurity.src
+0
-53
macrosecuritydialog.ui
xmlsecurity/uiconfig/ui/macrosecuritydialog.ui
+8
-3
securitylevelpage.ui
xmlsecurity/uiconfig/ui/securitylevelpage.ui
+6
-3
No files found.
xmlsecurity/inc/xmlsecurity/global.hrc
Dosyayı görüntüle @
c163123e
...
...
@@ -25,9 +25,6 @@
#define RID_XMLSECTP_GENERAL 1003
#define RID_XMLSECTP_DETAILS 1004
#define RID_XMLSECTP_CERTPATH 1005
#define RID_XMLSECTP_MACROSEC 1006
#define RID_XMLSECTP_SECLEVEL 1007
#define RID_XMLSECTP_TRUSTSOURCES 1008
#define RID_XMLSECTP_MACROWARN 1009
#define RID_XMLSECTP_READONLY_CONFIG_TIP 1010
#define RID_XMLSECTP_LOCK 1011
...
...
xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
Dosyayı görüntüle @
c163123e
...
...
@@ -58,32 +58,33 @@ private:
friend
class
MacroSecurityLevelTP
;
friend
class
MacroSecurityTrustedSourcesTP
;
TabControl
maTabCtrl
;
OKButton
maOkBtn
;
CancelButton
maCancelBtn
;
HelpButton
maHelpBtn
;
PushButton
maResetBtn
;
TabControl
*
m_pTabCtrl
;
OKButton
*
m_pOkBtn
;
PushButton
*
m_pResetBtn
;
cssu
::
Reference
<
cssu
::
XComponentContext
>
mxCtx
;
cssu
::
Reference
<
dcss
::
xml
::
crypto
::
XSecurityEnvironment
>
mxSecurityEnvironment
;
SvtSecurityOptions
maSecOptions
;
sal_uInt16
m_nSecLevelId
;
sal_uInt16
m_nSecTrustId
;
MacroSecurityTP
*
mpLevelTP
;
MacroSecurityTP
*
mpTrustSrcTP
;
DECL_LINK
(
OkBtnHdl
,
void
*
);
public
:
MacroSecurity
(
Window
*
pParent
,
const
cssu
::
Reference
<
cssu
::
XComponentContext
>&
rxCtx
,
const
cssu
::
Reference
<
dcss
::
xml
::
crypto
::
XSecurityEnvironment
>&
rxSecurityEnvironment
);
virtual
~
MacroSecurity
();
MacroSecurity
(
Window
*
pParent
,
const
cssu
::
Reference
<
cssu
::
XComponentContext
>&
rxCtx
,
const
cssu
::
Reference
<
dcss
::
xml
::
crypto
::
XSecurityEnvironment
>&
rxSecurityEnvironment
);
virtual
~
MacroSecurity
();
inline
void
EnableReset
(
bool
_bEnable
=
true
);
inline
void
EnableReset
(
bool
_bEnable
=
true
)
{
m_pResetBtn
->
Enable
(
_bEnable
);
}
};
inline
void
MacroSecurity
::
EnableReset
(
bool
_bEnable
)
{
maResetBtn
.
Enable
(
_bEnable
);
}
class
MacroSecurityTP
:
public
TabPage
{
protected
:
...
...
xmlsecurity/source/dialogs/dialogs.hrc
Dosyayı görüntüle @
c163123e
...
...
@@ -26,7 +26,6 @@
#define FL_BOTTOM_SEP 50
#define BTN_OK 51
#define BTN_CANCEL 52
#define BTN_HELP 53
#define LB_SIGNATURES 54
#define BTN_VIEWCERT 55
...
...
xmlsecurity/source/dialogs/helpids.hrc
Dosyayı görüntüle @
c163123e
...
...
@@ -23,7 +23,6 @@
// Help-Ids --------------------------------------------------------------
#define HID_XMLSEC_TP_MACROSEC "XMLSECURITY_HID_XMLSEC_TP_MACROSEC"
#define HID_XMLSEC_DLG_CERTVIEWER "XMLSECURITY_HID_XMLSEC_DLG_CERTVIEWER"
#define HID_XMLSEC_TP_GENERAL "XMLSECURITY_HID_XMLSEC_TP_GENERAL"
#define HID_XMLSEC_TP_DETAILS "XMLSECURITY_HID_XMLSEC_TP_DETAILS"
...
...
xmlsecurity/source/dialogs/macrosecurity.cxx
Dosyayı görüntüle @
c163123e
...
...
@@ -62,33 +62,34 @@ IMPL_LINK_NOARG(MacroSecurity, OkBtnHdl)
return
0
;
}
MacroSecurity
::
MacroSecurity
(
Window
*
_pParent
,
const
cssu
::
Reference
<
cssu
::
XComponentContext
>
&
_rxCtx
,
const
cssu
::
Reference
<
dcss
::
xml
::
crypto
::
XSecurityEnvironment
>&
_rxSecurityEnvironment
)
:
TabDialog
(
_pParent
,
XMLSEC_RES
(
RID_XMLSECTP_MACROSEC
)
)
,
maTabCtrl
(
this
,
XMLSEC_RES
(
1
)
)
,
maOkBtn
(
this
,
XMLSEC_RES
(
BTN_OK
)
)
,
maCancelBtn
(
this
,
XMLSEC_RES
(
BTN_CANCEL
)
)
,
maHelpBtn
(
this
,
XMLSEC_RES
(
BTN_HELP
)
)
,
maResetBtn
(
this
,
XMLSEC_RES
(
BTN_RESET
)
)
MacroSecurity
::
MacroSecurity
(
Window
*
_pParent
,
const
cssu
::
Reference
<
cssu
::
XComponentContext
>
&
_rxCtx
,
const
cssu
::
Reference
<
dcss
::
xml
::
crypto
::
XSecurityEnvironment
>&
_rxSecurityEnvironment
)
:
TabDialog
(
_pParent
,
"MacroSecurityDialog"
,
"xmlsec/ui/macrosecuritydialog.ui"
)
,
mxCtx
(
_rxCtx
)
,
mxSecurityEnvironment
(
_rxSecurityEnvironment
)
{
FreeResource
();
get
(
m_pTabCtrl
,
"tabcontrol"
);
get
(
m_pResetBtn
,
"reset"
);
get
(
m_pOkBtn
,
"ok"
);
m
xCtx
=
_rxCtx
;
m
xSecurityEnvironment
=
_rxSecurityEnvironment
;
m
pLevelTP
=
new
MacroSecurityLevelTP
(
m_pTabCtrl
,
this
)
;
m
pTrustSrcTP
=
new
MacroSecurityTrustedSourcesTP
(
m_pTabCtrl
,
this
)
;
m
pLevelTP
=
new
MacroSecurityLevelTP
(
&
maTabCtrl
,
this
);
m
pTrustSrcTP
=
new
MacroSecurityTrustedSourcesTP
(
&
maTabCtrl
,
this
);
m
_nSecLevelId
=
m_pTabCtrl
->
GetPageId
(
"SecurityLevelPage"
);
m
_nSecTrustId
=
m_pTabCtrl
->
GetPageId
(
"SecurityTrustPage"
);
m
aTabCtrl
.
SetTabPage
(
RID_XMLSECTP_SECLEVEL
,
mpLevelTP
);
m
aTabCtrl
.
SetTabPage
(
RID_XMLSECTP_TRUSTSOURCES
,
mpTrustSrcTP
);
m
aTabCtrl
.
SetCurPageId
(
RID_XMLSECTP_SECLEVEL
);
m
_pTabCtrl
->
SetTabPage
(
m_nSecLevelId
,
mpLevelTP
);
m
_pTabCtrl
->
SetTabPage
(
m_nSecTrustId
,
mpTrustSrcTP
);
m
_pTabCtrl
->
SetCurPageId
(
m_nSecLevelId
);
m
aOkBtn
.
SetClickHdl
(
LINK
(
this
,
MacroSecurity
,
OkBtnHdl
)
);
m
_pOkBtn
->
SetClickHdl
(
LINK
(
this
,
MacroSecurity
,
OkBtnHdl
)
);
}
MacroSecurity
::~
MacroSecurity
()
{
delete
m
aTabCtrl
.
GetTabPage
(
RID_XMLSECTP_TRUSTSOURCES
);
delete
m
aTabCtrl
.
GetTabPage
(
RID_XMLSECTP_SECLEVEL
);
delete
m
_pTabCtrl
->
GetTabPage
(
m_nSecTrustId
);
delete
m
_pTabCtrl
->
GetTabPage
(
m_nSecLevelId
);
}
MacroSecurityTP
::
MacroSecurityTP
(
Window
*
_pParent
,
const
OString
&
rID
,
...
...
xmlsecurity/source/dialogs/macrosecurity.src
Dosyayı görüntüle @
c163123e
...
...
@@ -19,59 +19,6 @@
#include "dialogs.hrc"
#include "helpids.hrc"
TabDialog RID_XMLSECTP_MACROSEC
{
HelpID = HID_XMLSEC_TP_MACROSEC;
Size = MAP_APPFONT( TD_WIDTH, TD_HEIGHT );
OutputSize = TRUE;
Closeable = TRUE;
Moveable = TRUE;
SVLook = TRUE;
Text [ en-US ] = "Macro Security";
TabControl 1
{
Pos = MAP_APPFONT( TD_SP_INNERBORDER_LEFT, TD_SP_INNERBORDER_TOP );
Size = MAP_APPFONT( TP_WIDTH, TP_HEIGHT+RIDDER_HEIGHT );
SVLook = TRUE ;
PageList =
{
PageItem
{
Identifier = RID_XMLSECTP_SECLEVEL;
Text [ en-US ] = "Security Level";
};
PageItem
{
Identifier = RID_XMLSECTP_TRUSTSOURCES;
Text [ en-US ] = "Trusted Sources";
};
};
};
OKButton BTN_OK
{
Pos = MAP_APPFONT( MS_COL_H, CV_ROW_A );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
DefButton = TRUE;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT( MS_COL_F, CV_ROW_A );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT( MS_COL_D, CV_ROW_A );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
};
PushButton BTN_RESET
{
Pos = MAP_APPFONT( MS_COL_B, CV_ROW_A );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "Reset";
};
};
String RID_XMLSECTP_READONLY_CONFIG_TIP
{
Text [ en-US ] = "This setting is protected by the Administrator";
...
...
xmlsecurity/uiconfig/ui/macrosecuritydialog.ui
Dosyayı görüntüle @
c163123e
...
...
@@ -20,6 +20,8 @@
<property
name=
"label"
>
gtk-ok
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_default"
>
True
</property>
<property
name=
"has_default"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
...
...
@@ -59,10 +61,11 @@
</child>
<child>
<object
class=
"GtkButton"
id=
"reset"
>
<property
name=
"label"
translatable=
"yes"
>
~Reset
</property>
<property
name=
"label"
>
gtk-revert-to-saved
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
...
...
@@ -79,9 +82,11 @@
</packing>
</child>
<child>
<object
class=
"GtkNotebook"
id=
"
notebook1
"
>
<object
class=
"GtkNotebook"
id=
"
tabcontrol
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
<child>
<placeholder/>
</child>
...
...
@@ -99,7 +104,7 @@
<placeholder/>
</child>
<child
type=
"tab"
>
<object
class=
"GtkLabel"
id=
"
label2
"
>
<object
class=
"GtkLabel"
id=
"
SecurityTrustPage
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Trusted Sources
</property>
...
...
xmlsecurity/uiconfig/ui/securitylevelpage.ui
Dosyayı görüntüle @
c163123e
...
...
@@ -11,7 +11,8 @@
<child>
<object
class=
"GtkRadioButton"
id=
"low:wrap"
>
<property
name=
"label"
translatable=
"yes"
>
_Low (not recommended).
All macros will be executed without confirmation. Use this setting only if you are certain that all documents that will be opened are safe.
</property>
All macros will be executed without confirmation.
Use this setting only if you are certain that all documents that will be opened are safe.
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
...
...
@@ -49,7 +50,8 @@ Confirmation required before executing macros from untrusted sources.</property>
<child>
<object
class=
"GtkRadioButton"
id=
"high:wrap"
>
<property
name=
"label"
translatable=
"yes"
>
H_igh.
Only signed macros from trusted sources are allowed to run. Unsigned macros are disabled.
</property>
Only signed macros from trusted sources are allowed to run.
Unsigned macros are disabled.
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
...
...
@@ -69,7 +71,8 @@ Only signed macros from trusted sources are allowed to run. Unsigned macros are
<child>
<object
class=
"GtkRadioButton"
id=
"vhigh:wrap"
>
<property
name=
"label"
translatable=
"yes"
>
_Very high.
Only macros from trusted file locations are allowed to run. All other macros, regardless whether signed or not, are disabled.
</property>
Only macros from trusted file locations are allowed to run.
All other macros, regardless whether signed or not, are disabled.
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
...
...
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