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
f14e4cff
Kaydet (Commit)
f14e4cff
authored
Nis 01, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace RemoveHiddenContentCfg_Impl with direct configuration access
Change-Id: I422f6f3386419f4ea91c4b3d9c96e759e1361a3a
üst
c1a9f443
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
92 deletions
+19
-92
optinet2.cxx
cui/source/options/optinet2.cxx
+19
-92
No files found.
cui/source/options/optinet2.cxx
Dosyayı görüntüle @
f14e4cff
...
...
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <officecfg/Office/Security.hxx>
#include <tools/config.hxx>
#include <vcl/msgbox.hxx>
#include <svl/intitem.hxx>
...
...
@@ -931,94 +934,6 @@ void SvxSecurityTabPage::Reset( const SfxItemSet* )
{
}
/*--------------------------------------------------------------------*/
class
RemoveHiddenContentCfg_Impl
:
public
utl
::
ConfigItem
{
friend
class
SvxEMailTabPage
;
bool
bHideContent
;
const
Sequence
<
OUString
>
GetPropertyNames
();
virtual
void
ImplCommit
()
SAL_OVERRIDE
;
public
:
RemoveHiddenContentCfg_Impl
();
virtual
void
Notify
(
const
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>&
_rPropertyNames
)
SAL_OVERRIDE
;
};
/* -------------------------------------------------------------------------*/
RemoveHiddenContentCfg_Impl
::
RemoveHiddenContentCfg_Impl
()
:
utl
::
ConfigItem
(
"Office.Security/HiddenContent"
),
bHideContent
(
true
)
{
const
Sequence
<
OUString
>
aNames
=
GetPropertyNames
();
const
Sequence
<
Any
>
aValues
=
GetProperties
(
aNames
);
const
Any
*
pValues
=
aValues
.
getConstArray
();
for
(
sal_Int32
nProp
=
0
;
nProp
<
aValues
.
getLength
();
nProp
++
)
{
if
(
pValues
[
nProp
].
hasValue
())
{
switch
(
nProp
)
{
case
0
:
{
pValues
[
nProp
]
>>=
bHideContent
;
}
break
;
}
}
}
}
/* -------------------------------------------------------------------------*/
const
Sequence
<
OUString
>
RemoveHiddenContentCfg_Impl
::
GetPropertyNames
()
{
Sequence
<
OUString
>
aRet
(
1
);
OUString
*
pRet
=
aRet
.
getArray
();
pRet
[
0
]
=
"RemoveHiddenContent"
;
return
aRet
;
}
/* -------------------------------------------------------------------------*/
void
RemoveHiddenContentCfg_Impl
::
ImplCommit
()
{
const
Sequence
<
OUString
>
aOrgNames
=
GetPropertyNames
();
sal_Int32
nOrgCount
=
aOrgNames
.
getLength
();
Sequence
<
OUString
>
aNames
(
nOrgCount
);
Sequence
<
Any
>
aValues
(
nOrgCount
);
sal_Int32
nRealCount
=
0
;
for
(
int
nProp
=
0
;
nProp
<
nOrgCount
;
nProp
++
)
{
switch
(
nProp
)
{
case
0
:
{
aNames
[
nRealCount
]
=
aOrgNames
[
nProp
];
aValues
[
nRealCount
]
<<=
bHideContent
;
++
nRealCount
;
}
break
;
}
}
aNames
.
realloc
(
nRealCount
);
aValues
.
realloc
(
nRealCount
);
PutProperties
(
aNames
,
aValues
);
}
/* -------------------------------------------------------------------------*/
void
RemoveHiddenContentCfg_Impl
::
Notify
(
const
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>&
)
{
}
class
MailerProgramCfg_Impl
:
public
utl
::
ConfigItem
{
friend
class
SvxEMailTabPage
;
...
...
@@ -1123,8 +1038,13 @@ void MailerProgramCfg_Impl::Notify( const com::sun::star::uno::Sequence< OUStrin
struct
SvxEMailTabPage_Impl
{
SvxEMailTabPage_Impl
()
:
bHideContent
(
officecfg
::
Office
::
Security
::
HiddenContent
::
RemoveHiddenContent
::
get
())
{}
MailerProgramCfg_Impl
aMailConfig
;
RemoveHiddenContentCfg_Impl
aHiddenContentConfig
;
bool
bHideContent
;
};
SvxEMailTabPage
::
SvxEMailTabPage
(
vcl
::
Window
*
pParent
,
const
SfxItemSet
&
rSet
)
...
...
@@ -1167,8 +1087,15 @@ bool SvxEMailTabPage::FillItemSet( SfxItemSet* )
if
(
bMailModified
)
pImpl
->
aMailConfig
.
Commit
();
pImpl
->
aHiddenContentConfig
.
bHideContent
=
m_pSuppressHidden
->
IsChecked
();
pImpl
->
aHiddenContentConfig
.
Commit
();
if
(
pImpl
->
bHideContent
!=
m_pSuppressHidden
->
IsChecked
())
{
pImpl
->
bHideContent
=
m_pSuppressHidden
->
IsChecked
();
std
::
shared_ptr
<
comphelper
::
ConfigurationChanges
>
batch
(
comphelper
::
ConfigurationChanges
::
create
());
officecfg
::
Office
::
Security
::
HiddenContent
::
RemoveHiddenContent
::
set
(
pImpl
->
bHideContent
,
batch
);
batch
->
commit
();
}
return
false
;
}
...
...
@@ -1188,7 +1115,7 @@ void SvxEMailTabPage::Reset( const SfxItemSet* )
m_pMailContainer
->
Enable
(
!
pImpl
->
aMailConfig
.
bROProgram
);
m_pSuppressHidden
->
Check
(
pImpl
->
aHiddenContentConfig
.
bHideContent
);
m_pSuppressHidden
->
Check
(
pImpl
->
bHideContent
);
}
/* -------------------------------------------------------------------------*/
...
...
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