[Libreoffice-commits] core.git: filter/source include/comphelper include/sfx2
Katarina Behrens
Katarina.Behrens at cib.de
Wed Aug 30 16:00:52 UTC 2017
filter/source/config/cache/constant.hxx | 1 +
filter/source/config/cache/filtercache.cxx | 6 ++++++
filter/source/config/fragments/filters/writer8.xcu | 2 +-
include/comphelper/documentconstants.hxx | 4 +++-
include/sfx2/docfilt.hxx | 1 +
5 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit dce78f9caae194da13fa5399298d57701abc8744
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Thu Aug 17 17:56:45 2017 +0200
gpg4libre: Add flag for filters that support GPG encryption
Change-Id: I48518f26a3ccbe430d36fb6657bdeff0943492d3
Reviewed-on: https://gerrit.libreoffice.org/41263
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/filter/source/config/cache/constant.hxx b/filter/source/config/cache/constant.hxx
index da5c904dc984..8f6b46e2fc38 100644
--- a/filter/source/config/cache/constant.hxx
+++ b/filter/source/config/cache/constant.hxx
@@ -104,6 +104,7 @@
#define FLAGNAME_DEFAULT "DEFAULT"
#define FLAGNAME_ENCRYPTION "ENCRYPTION"
#define FLAGNAME_EXPORT "EXPORT"
+#define FLAGNAME_GPGENCRYPTION "GPGENCRYPTION"
#define FLAGNAME_IMPORT "IMPORT"
#define FLAGNAME_INTERNAL "INTERNAL"
#define FLAGNAME_NOTINFILEDIALOG "NOTINFILEDIALOG"
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index 79958452c0ce..e4b245016f54 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -1874,6 +1874,7 @@ css::uno::Sequence< OUString > FilterCache::impl_convertFlagField2FlagNames(SfxF
if (nFlags & SfxFilterFlags::TEMPLATEPATH ) lFlagNames.push_back(FLAGNAME_TEMPLATEPATH );
if (nFlags & SfxFilterFlags::COMBINED ) lFlagNames.push_back(FLAGNAME_COMBINED );
if (nFlags & SfxFilterFlags::SUPPORTSSIGNING) lFlagNames.push_back(FLAGNAME_SUPPORTSSIGNING);
+ if (nFlags & SfxFilterFlags::GPGENCRYPTION) lFlagNames.push_back(FLAGNAME_GPGENCRYPTION);
return comphelper::containerToSequence(lFlagNames);
}
@@ -1919,6 +1920,11 @@ SfxFilterFlags FilterCache::impl_convertFlagNames2FlagField(const css::uno::Sequ
nField |= SfxFilterFlags::EXPORT;
continue;
}
+ if (pNames[i] == FLAGNAME_GPGENCRYPTION)
+ {
+ nField |= SfxFilterFlags::GPGENCRYPTION;
+ continue;
+ }
if (pNames[i] == FLAGNAME_IMPORT)
{
nField |= SfxFilterFlags::IMPORT;
diff --git a/filter/source/config/fragments/filters/writer8.xcu b/filter/source/config/fragments/filters/writer8.xcu
index 410b3a77e717..def9d57d532f 100644
--- a/filter/source/config/fragments/filters/writer8.xcu
+++ b/filter/source/config/fragments/filters/writer8.xcu
@@ -16,7 +16,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<node oor:name="writer8" oor:op="replace">
- <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN DEFAULT PREFERRED ENCRYPTION PASSWORDTOMODIFY</value></prop>
+ <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE OWN DEFAULT PREFERRED ENCRYPTION PASSWORDTOMODIFY GPGENCRYPTION</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"/>
<prop oor:name="UserData"><value>CXML</value></prop>
diff --git a/include/comphelper/documentconstants.hxx b/include/comphelper/documentconstants.hxx
index 75418535c80f..9447a7b17fc6 100644
--- a/include/comphelper/documentconstants.hxx
+++ b/include/comphelper/documentconstants.hxx
@@ -110,13 +110,15 @@ enum class SfxFilterFlags
ENCRYPTION = 0x01000000L,
PASSWORDTOMODIFY = 0x02000000L,
+ GPGENCRYPTION = 0x04000000L,
PREFERED = 0x10000000L,
STARTPRESENTATION = 0x20000000L,
SUPPORTSSIGNING = 0x40000000L,
};
+
namespace o3tl
{
- template<> struct typed_flags<SfxFilterFlags> : is_typed_flags<SfxFilterFlags, 0x739f157fL> {};
+ template<> struct typed_flags<SfxFilterFlags> : is_typed_flags<SfxFilterFlags, 0x779f157fL> {};
}
#define SFX_FILTER_NOTINSTALLED (SfxFilterFlags::MUSTINSTALL | SfxFilterFlags::CONSULTSERVICE)
diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx
index 47454f90e742..75b889f451d3 100644
--- a/include/sfx2/docfilt.hxx
+++ b/include/sfx2/docfilt.hxx
@@ -78,6 +78,7 @@ public:
bool IsOwnFormat() const { return bool(nFormatType & SfxFilterFlags::OWN); }
/// If the filter supports digital signatures.
bool GetSupportsSigning() const { return bool(nFormatType & SfxFilterFlags::SUPPORTSSIGNING); }
+ bool GetGpgEncryption() const { return bool(nFormatType & SfxFilterFlags::GPGENCRYPTION); }
bool IsOwnTemplateFormat() const { return bool(nFormatType & SfxFilterFlags::TEMPLATEPATH); }
bool IsAlienFormat() const { return bool(nFormatType & SfxFilterFlags::ALIEN); }
bool CanImport() const { return bool(nFormatType & SfxFilterFlags::IMPORT); }
More information about the Libreoffice-commits
mailing list