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
77cc7147
Kaydet (Commit)
77cc7147
authored
Haz 23, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
LinkUpdateMode is a global setting
Change-Id: Ida1257337c6e0916f2228fe053d9c9f085183af6
üst
17815049
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
43 deletions
+85
-43
securityoptions.hxx
include/unotools/securityoptions.hxx
+2
-0
xmlimprt.cxx
sc/source/filter/xml/xmlimprt.cxx
+9
-1
docsh4.cxx
sc/source/ui/docshell/docsh4.cxx
+15
-3
DocumentLinksAdministrationManager.cxx
sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+10
-0
xmlimp.cxx
sw/source/filter/xml/xmlimp.cxx
+41
-39
securityoptions.cxx
unotools/source/config/securityoptions.cxx
+8
-0
No files found.
include/unotools/securityoptions.hxx
Dosyayı görüntüle @
77cc7147
...
...
@@ -186,6 +186,8 @@ class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtSecurityOptions : public utl::detail
*/
bool
isTrustedLocationUri
(
OUString
const
&
uri
)
const
;
bool
isTrustedLocationUriForUpdatingLinks
(
OUString
const
&
uri
)
const
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
Certificate
>
GetTrustedAuthors
(
)
const
;
void
SetTrustedAuthors
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
Certificate
>&
rAuthors
);
...
...
sc/source/filter/xml/xmlimprt.cxx
Dosyayı görüntüle @
77cc7147
...
...
@@ -2593,6 +2593,9 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa
OUString
sCTName
(
"TrackedChangesProtectionKey"
);
OUString
sVBName
(
"VBACompatibilityMode"
);
OUString
sSCName
(
"ScriptConfiguration"
);
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
aFilteredProps
(
aConfigProps
.
getLength
());
sal_Int32
nFilteredPropsLen
=
0
;
for
(
sal_Int32
i
=
nCount
-
1
;
i
>=
0
;
--
i
)
{
if
(
aConfigProps
[
i
].
Name
==
sCTName
)
...
...
@@ -2627,11 +2630,16 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa
xImportInfo
->
setPropertyValue
(
aConfigProps
[
i
].
Name
,
aConfigProps
[
i
].
Value
);
}
}
if
(
aConfigProps
[
i
].
Name
!=
"LinkUpdateMode"
)
{
aFilteredProps
[
nFilteredPropsLen
++
]
=
aConfigProps
[
i
];
}
}
aFilteredProps
.
realloc
(
nFilteredPropsLen
);
uno
::
Reference
<
uno
::
XInterface
>
xInterface
=
xMultiServiceFactory
->
createInstance
(
"com.sun.star.comp.SpreadsheetSettings"
);
uno
::
Reference
<
beans
::
XPropertySet
>
xProperties
(
xInterface
,
uno
::
UNO_QUERY
);
if
(
xProperties
.
is
())
SvXMLUnitConverter
::
convertPropertySet
(
xProperties
,
a
Config
Props
);
SvXMLUnitConverter
::
convertPropertySet
(
xProperties
,
a
Filtered
Props
);
}
}
}
...
...
sc/source/ui/docshell/docsh4.cxx
Dosyayı görüntüle @
77cc7147
...
...
@@ -48,6 +48,7 @@ using namespace ::com::sun::star;
#include <svl/PasswordHelper.hxx>
#include <svl/documentlockfile.hxx>
#include <svl/sharecontrolfile.hxx>
#include <unotools/securityoptions.hxx>
#include <comphelper/processfactory.hxx>
#include "docuno.hxx"
...
...
@@ -419,12 +420,23 @@ void ScDocShell::Execute( SfxRequest& rReq )
if
(
nCanUpdate
==
com
::
sun
::
star
::
document
::
UpdateDocMode
::
NO_UPDATE
)
nSet
=
LM_NEVER
;
else
if
(
nCanUpdate
==
com
::
sun
::
star
::
document
::
UpdateDocMode
::
QUIET_UPDATE
&&
nSet
==
LM_ON_DEMAND
)
nSet
=
LM_NEVER
;
else
if
(
nCanUpdate
==
com
::
sun
::
star
::
document
::
UpdateDocMode
::
FULL_UPDATE
)
nSet
=
LM_ALWAYS
;
if
(
nSet
==
LM_ALWAYS
&&
!
(
SvtSecurityOptions
()
.
isTrustedLocationUriForUpdatingLinks
(
GetMedium
()
==
nullptr
?
OUString
()
:
GetMedium
()
->
GetName
())))
{
nSet
=
LM_ON_DEMAND
;
}
if
(
nCanUpdate
==
css
::
document
::
UpdateDocMode
::
QUIET_UPDATE
&&
nSet
==
LM_ON_DEMAND
)
{
nSet
=
LM_NEVER
;
}
if
(
nSet
==
LM_ON_DEMAND
)
{
ScopedVclPtrInstance
<
QueryBox
>
aBox
(
GetActiveDialogParent
(),
WinBits
(
WB_YES_NO
|
WB_DEF_YES
),
...
...
sw/source/core/doc/DocumentLinksAdministrationManager.cxx
Dosyayı görüntüle @
77cc7147
...
...
@@ -44,6 +44,7 @@
#include <ndtxt.hxx>
#include <tools/urlobj.hxx>
#include <unotools/charclass.hxx>
#include <unotools/securityoptions.hxx>
using
namespace
::
com
::
sun
::
star
;
...
...
@@ -221,6 +222,15 @@ void DocumentLinksAdministrationManager::UpdateLinks( bool bUI )
case
document
:
:
UpdateDocMode
::
QUIET_UPDATE
:
bAskUpdate
=
false
;
break
;
case
document
:
:
UpdateDocMode
::
FULL_UPDATE
:
bAskUpdate
=
true
;
break
;
}
if
(
nLinkMode
==
AUTOMATIC
&&
!
bAskUpdate
)
{
SfxMedium
*
medium
=
m_rDoc
.
GetDocShell
()
->
GetMedium
();
if
(
!
SvtSecurityOptions
().
isTrustedLocationUriForUpdatingLinks
(
medium
==
nullptr
?
OUString
()
:
medium
->
GetName
()))
{
bAskUpdate
=
true
;
}
}
if
(
bUpdate
&&
(
bUI
||
!
bAskUpdate
)
)
{
SfxMedium
*
pMedium
=
m_rDoc
.
GetDocShell
()
->
GetMedium
();
...
...
sw/source/filter/xml/xmlimp.cxx
Dosyayı görüntüle @
77cc7147
...
...
@@ -1085,47 +1085,47 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
if
(
!
xInfo
.
is
()
)
return
;
std
::
unordered_set
<
OUString
,
OUStringHash
>
aSet
;
aSet
.
insert
(
"ForbiddenCharacters"
);
aSet
.
insert
(
"IsKernAsianPunctuation"
);
aSet
.
insert
(
"CharacterCompressionType"
);
aSet
.
insert
(
"LinkUpdateMode"
);
aSet
.
insert
(
"FieldAutoUpdate"
);
aSet
.
insert
(
"ChartAutoUpdate"
);
aSet
.
insert
(
"AddParaTableSpacing"
);
aSet
.
insert
(
"AddParaTableSpacingAtStart"
);
aSet
.
insert
(
"PrintAnnotationMode"
);
aSet
.
insert
(
"PrintBlackFonts"
);
aSet
.
insert
(
"PrintControls"
);
aSet
.
insert
(
"PrintDrawings"
);
aSet
.
insert
(
"PrintGraphics"
);
aSet
.
insert
(
"PrintLeftPages"
);
aSet
.
insert
(
"PrintPageBackground"
);
aSet
.
insert
(
"PrintProspect"
);
aSet
.
insert
(
"PrintReversed"
);
aSet
.
insert
(
"PrintRightPages"
);
aSet
.
insert
(
"PrintFaxName"
);
aSet
.
insert
(
"PrintPaperFromSetup"
);
aSet
.
insert
(
"PrintTables"
);
aSet
.
insert
(
"PrintSingleJobs"
);
aSet
.
insert
(
"UpdateFromTemplate"
);
aSet
.
insert
(
"PrinterIndependentLayout"
);
aSet
.
insert
(
"PrintEmptyPages"
);
aSet
.
insert
(
"SmallCapsPercentage66"
);
aSet
.
insert
(
"TabOverflow"
);
aSet
.
insert
(
"UnbreakableNumberings"
);
aSet
.
insert
(
"ClippedPictures"
);
aSet
.
insert
(
"BackgroundParaOverDrawings"
);
aSet
.
insert
(
"TabOverMargin"
);
aSet
.
insert
(
"PropLineSpacingShrinksFirstLine"
);
aSet
.
insert
(
"SubtractFlysAnchoredAtFlys"
);
std
::
unordered_set
<
OUString
,
OUStringHash
>
aExcludeAlways
;
aExcludeAlways
.
insert
(
"LinkUpdateMode"
);
std
::
unordered_set
<
OUString
,
OUStringHash
>
aExcludeWhenNotLoadingUserSettings
;
aExcludeWhenNotLoadingUserSettings
.
insert
(
"ForbiddenCharacters"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"IsKernAsianPunctuation"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"CharacterCompressionType"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"FieldAutoUpdate"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"ChartAutoUpdate"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"AddParaTableSpacing"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"AddParaTableSpacingAtStart"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintAnnotationMode"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintBlackFonts"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintControls"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintDrawings"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintGraphics"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintLeftPages"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintPageBackground"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintProspect"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintReversed"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintRightPages"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintFaxName"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintPaperFromSetup"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintTables"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintSingleJobs"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"UpdateFromTemplate"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrinterIndependentLayout"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PrintEmptyPages"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"SmallCapsPercentage66"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"TabOverflow"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"UnbreakableNumberings"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"ClippedPictures"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"BackgroundParaOverDrawings"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"TabOverMargin"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"PropLineSpacingShrinksFirstLine"
);
aExcludeWhenNotLoadingUserSettings
.
insert
(
"SubtractFlysAnchoredAtFlys"
);
sal_Int32
nCount
=
aConfigProps
.
getLength
();
const
PropertyValue
*
pValues
=
aConfigProps
.
getConstArray
();
SvtSaveOptions
aSaveOpt
;
bool
bIsUserSetting
=
aSaveOpt
.
IsLoadUserSettings
(),
bSet
=
bIsUserSetting
;
bool
bIsUserSetting
=
aSaveOpt
.
IsLoadUserSettings
();
// for some properties we don't want to use the application
// default if they're missing. So we watch for them in the loop
...
...
@@ -1163,10 +1163,12 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
while
(
nCount
--
)
{
if
(
!
bIsUserSetting
)
bool
bSet
=
aExcludeAlways
.
find
(
pValues
->
Name
)
==
aExcludeAlways
.
end
();
if
(
bSet
&&
!
bIsUserSetting
&&
(
aExcludeWhenNotLoadingUserSettings
.
find
(
pValues
->
Name
)
!=
aExcludeWhenNotLoadingUserSettings
.
end
())
)
{
// test over the hash value if the entry is in the table.
bSet
=
aSet
.
find
(
pValues
->
Name
)
==
aSet
.
end
();
bSet
=
false
;
}
if
(
bSet
)
...
...
unotools/source/config/securityoptions.cxx
Dosyayı görüntüle @
77cc7147
...
...
@@ -1035,6 +1035,14 @@ bool SvtSecurityOptions::isTrustedLocationUri(OUString const & uri) const {
return
false
;
}
bool
SvtSecurityOptions
::
isTrustedLocationUriForUpdatingLinks
(
OUString
const
&
uri
)
const
{
return
GetMacroSecurityLevel
()
==
0
||
uri
.
isEmpty
()
||
uri
.
startsWithIgnoreAsciiCase
(
"private:"
)
||
isTrustedLocationUri
(
uri
);
}
sal_Int32
SvtSecurityOptions
::
GetMacroSecurityLevel
()
const
{
MutexGuard
aGuard
(
GetInitMutex
()
);
...
...
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