From 710128334ee6f2dd538a67d2ecaf2d7b07bb6868 Mon Sep 17 00:00:00 2001 From: ka Date: Fri, 4 Feb 2011 14:49:25 +0100 Subject: ka102: SVG import implementation --- .../schema/org/openoffice/Office/Common.xcs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'officecfg/registry/schema/org/openoffice/Office/Common.xcs') diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index ae171230dd13..2475bd6f35ba 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -4833,6 +4833,33 @@ 1 + + + KA + Specifies default settings of SVG export dialog. + + + + KA + Specifies if SVG Tiny profile should be used for export. + + false + + + + KA + Specifies if fonts should be embedded into SVG file. + + true + + + + KA + Specifies if text decoration like underlining and strike-through be drawm by using SVG attributes (true) or by drawing SVG primitives (false). + + true + + -- cgit v1.2.3 From 5dd2784030e00fa1857b30ee8c5da62e221bfd32 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 17 Mar 2011 09:16:41 +0100 Subject: mav60: #164341# support AES encryption --- .../schema/org/openoffice/Office/Common.xcs | 20 +++++++++-- sfx2/source/doc/objstor.cxx | 39 ++++++++++++++++++---- 2 files changed, 50 insertions(+), 9 deletions(-) (limited to 'officecfg/registry/schema/org/openoffice/Office/Common.xcs') diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index ae171230dd13..4516c884bb0f 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -2392,9 +2392,23 @@ ODFVER_LATEST - - 3 - + + 3 + + + + MAV + Specifies whether SHA1 algorithm instead of SHA256 should be used in ODF12 for StartKey and Checksum generation during encryption. + + false + + + + MAV + Specifies whether Blowfish algorithm instead of AES should be used in ODF12 for encryption. + + false + diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 9a86e962cac6..a80ba1ddc2a1 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -357,24 +357,51 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto const_cast( this )->SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); } - ::rtl::OUString aVersion; SvtSaveOptions aSaveOpt; SvtSaveOptions::ODFDefaultVersion nDefVersion = aSaveOpt.GetODFDefaultVersion(); - // older versions can not have this property set, it exists only starting from ODF1.2 - if ( nDefVersion >= SvtSaveOptions::ODFVER_012 ) - aVersion = ODFVER_012_TEXT; + uno::Sequence< beans::NamedValue > aEncryptionAlgs( 3 ); + aEncryptionAlg[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StartKeyGenerationAlgorithm" ) ); + aEncryptionAlg[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EncryptionAlgorithm" ) ); + aEncryptionAlg[2].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ChecksumAlgorithm" ) ); + // the default values, that should be used for ODF1.1 and older formats + aEncryptionAlg[0].Value <<= xml::crypto::CipherID::SHA1; + aEncryptionAlg[1].Value <<= xml::crypto::CipherID::BLOWFISH_CFB_8; + aEncryptionAlg[2].Value <<= xml::crypto::CipherID::SHA1_1K; - if ( aVersion.getLength() ) + if ( nDefVersion >= SvtSaveOptions::ODFVER_012 ) { try { - xProps->setPropertyValue( ::rtl::OUString::createFromAscii( "Version" ), uno::makeAny( aVersion ) ); + // older versions can not have this property set, it exists only starting from ODF1.2 + xProps->setPropertyValue( ::rtl::OUString::createFromAscii( "Version" ), uno::makeAny( ODFVER_012_TEXT ) ); } catch( uno::Exception& ) { } + + if ( !aSaveOpt.IsUseSHA1_ODF12() ) + { + aEncryptionAlg[0].Value <<= xml::crypto::CipherID::SHA256; + aEncryptionAlg[2].Value <<= xml::crypto::CipherID::SHA256_1K; + } + if ( !aSaveOpt.IsUseBlowfish_ODF12() ) + aEncryptionAlg[1].Value <<= xml::crypto::CipherID::AES_CBC; + } + + try + { + // set the encryption algorithms accordingly; + // the setting does not trigger encryption, + // it just provides the format for the case that contents should be encrypted + uno::Reference< embed::XEncryptionProtectedStorage > xEncr( xStorage, uno::UNO_QUERY_THROW ); + xEncr->setEncryptionAlgorithms( aEncryptionAlg ); } + catch( uno::Exception& ) + { + const_cast( this )->SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); + } + } } } -- cgit v1.2.3