Kaydet (Commit) dce78f9c authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Thorsten Behrens

gpg4libre: Add flag for filters that support GPG encryption

Change-Id: I48518f26a3ccbe430d36fb6657bdeff0943492d3
Reviewed-on: https://gerrit.libreoffice.org/41263Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst d5189db4
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
#define FLAGNAME_DEFAULT "DEFAULT" #define FLAGNAME_DEFAULT "DEFAULT"
#define FLAGNAME_ENCRYPTION "ENCRYPTION" #define FLAGNAME_ENCRYPTION "ENCRYPTION"
#define FLAGNAME_EXPORT "EXPORT" #define FLAGNAME_EXPORT "EXPORT"
#define FLAGNAME_GPGENCRYPTION "GPGENCRYPTION"
#define FLAGNAME_IMPORT "IMPORT" #define FLAGNAME_IMPORT "IMPORT"
#define FLAGNAME_INTERNAL "INTERNAL" #define FLAGNAME_INTERNAL "INTERNAL"
#define FLAGNAME_NOTINFILEDIALOG "NOTINFILEDIALOG" #define FLAGNAME_NOTINFILEDIALOG "NOTINFILEDIALOG"
......
...@@ -1874,6 +1874,7 @@ css::uno::Sequence< OUString > FilterCache::impl_convertFlagField2FlagNames(SfxF ...@@ -1874,6 +1874,7 @@ css::uno::Sequence< OUString > FilterCache::impl_convertFlagField2FlagNames(SfxF
if (nFlags & SfxFilterFlags::TEMPLATEPATH ) lFlagNames.push_back(FLAGNAME_TEMPLATEPATH ); if (nFlags & SfxFilterFlags::TEMPLATEPATH ) lFlagNames.push_back(FLAGNAME_TEMPLATEPATH );
if (nFlags & SfxFilterFlags::COMBINED ) lFlagNames.push_back(FLAGNAME_COMBINED ); if (nFlags & SfxFilterFlags::COMBINED ) lFlagNames.push_back(FLAGNAME_COMBINED );
if (nFlags & SfxFilterFlags::SUPPORTSSIGNING) lFlagNames.push_back(FLAGNAME_SUPPORTSSIGNING); if (nFlags & SfxFilterFlags::SUPPORTSSIGNING) lFlagNames.push_back(FLAGNAME_SUPPORTSSIGNING);
if (nFlags & SfxFilterFlags::GPGENCRYPTION) lFlagNames.push_back(FLAGNAME_GPGENCRYPTION);
return comphelper::containerToSequence(lFlagNames); return comphelper::containerToSequence(lFlagNames);
} }
...@@ -1919,6 +1920,11 @@ SfxFilterFlags FilterCache::impl_convertFlagNames2FlagField(const css::uno::Sequ ...@@ -1919,6 +1920,11 @@ SfxFilterFlags FilterCache::impl_convertFlagNames2FlagField(const css::uno::Sequ
nField |= SfxFilterFlags::EXPORT; nField |= SfxFilterFlags::EXPORT;
continue; continue;
} }
if (pNames[i] == FLAGNAME_GPGENCRYPTION)
{
nField |= SfxFilterFlags::GPGENCRYPTION;
continue;
}
if (pNames[i] == FLAGNAME_IMPORT) if (pNames[i] == FLAGNAME_IMPORT)
{ {
nField |= SfxFilterFlags::IMPORT; nField |= SfxFilterFlags::IMPORT;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--> -->
<node oor:name="writer8" oor:op="replace"> <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="UIComponent"/>
<prop oor:name="FilterService"/> <prop oor:name="FilterService"/>
<prop oor:name="UserData"><value>CXML</value></prop> <prop oor:name="UserData"><value>CXML</value></prop>
......
...@@ -110,13 +110,15 @@ enum class SfxFilterFlags ...@@ -110,13 +110,15 @@ enum class SfxFilterFlags
ENCRYPTION = 0x01000000L, ENCRYPTION = 0x01000000L,
PASSWORDTOMODIFY = 0x02000000L, PASSWORDTOMODIFY = 0x02000000L,
GPGENCRYPTION = 0x04000000L,
PREFERED = 0x10000000L, PREFERED = 0x10000000L,
STARTPRESENTATION = 0x20000000L, STARTPRESENTATION = 0x20000000L,
SUPPORTSSIGNING = 0x40000000L, SUPPORTSSIGNING = 0x40000000L,
}; };
namespace o3tl 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) #define SFX_FILTER_NOTINSTALLED (SfxFilterFlags::MUSTINSTALL | SfxFilterFlags::CONSULTSERVICE)
......
...@@ -78,6 +78,7 @@ public: ...@@ -78,6 +78,7 @@ public:
bool IsOwnFormat() const { return bool(nFormatType & SfxFilterFlags::OWN); } bool IsOwnFormat() const { return bool(nFormatType & SfxFilterFlags::OWN); }
/// If the filter supports digital signatures. /// If the filter supports digital signatures.
bool GetSupportsSigning() const { return bool(nFormatType & SfxFilterFlags::SUPPORTSSIGNING); } 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 IsOwnTemplateFormat() const { return bool(nFormatType & SfxFilterFlags::TEMPLATEPATH); }
bool IsAlienFormat() const { return bool(nFormatType & SfxFilterFlags::ALIEN); } bool IsAlienFormat() const { return bool(nFormatType & SfxFilterFlags::ALIEN); }
bool CanImport() const { return bool(nFormatType & SfxFilterFlags::IMPORT); } bool CanImport() const { return bool(nFormatType & SfxFilterFlags::IMPORT); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment