[Libreoffice-commits] core.git: 2 commits - configure.ac framework/source idl/inc idl/source

Matúš Kukan matus.kukan at collabora.com
Mon Mar 17 12:42:49 PDT 2014


 configure.ac                               |    2 +-
 framework/source/services/autorecovery.cxx |    8 +++++---
 idl/inc/database.hxx                       |    2 ++
 idl/source/objects/types.cxx               |   24 ++++++++++++++++++++++--
 idl/source/prj/database.cxx                |    1 +
 5 files changed, 31 insertions(+), 6 deletions(-)

New commits:
commit 4f4d9c06355b64ae30e0c100be0ca55d01c16885
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Mar 17 11:36:31 2014 +0100

    Avoid duplicate symbols in libmerged for Windows too.
    
    This is working version of fc27a685d466dc380a8b68cd48f47db632ed3693
    
    Change-Id: I48e861b5b7692ea051edf52d7ad9cc54ca989e22

diff --git a/configure.ac b/configure.ac
index cbe3f3b..f372fe03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12461,11 +12461,11 @@ if test -n "$enable_mergelibs" -a "$enable_mergelibs" != "no"; then
     if test "$enable_mergelibs" = "all"; then
         MERGELIBS="ALL"
         URELIBS="TRUE"
+        AC_DEFINE(STATIC_LINKING)
     else
         MERGELIBS="CORE"
     fi
     AC_MSG_RESULT([yes])
-    AC_DEFINE(STATIC_LINKING)
 else
     AC_MSG_RESULT([no])
 fi
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 15e87f2..f9abfd2 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -81,6 +81,8 @@ protected:
         aIFaceName = OString();
     }
 public:
+    OUString sSlotMapFile;
+
                 explicit SvIdlDataBase( const SvCommand& rCmd );
                 ~SvIdlDataBase();
     static sal_Bool IsBinaryFormat( SvStream & rInStm );
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 1797fa2..265be88 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -1398,7 +1398,7 @@ sal_uLong SvMetaType::MakeSfx( OStringBuffer& rAttrArray )
 }
 
 void SvMetaType::WriteSfxItem(
-    const OString& rItemName, SvIdlDataBase &, SvStream & rOutStm )
+    const OString& rItemName, SvIdlDataBase& rBase, SvStream& rOutStm )
 {
     WriteStars( rOutStm );
     OStringBuffer aVarName(" a");
@@ -1411,14 +1411,34 @@ void SvMetaType::WriteSfxItem(
         OString::number(nAttrCount));
     aTypeName.append(aAttrCount);
 
-    rOutStm.WriteCharPtr( "extern " ).WriteCharPtr( aTypeName.getStr() )
+    bool bExport = false, bReturn = false;
+    // these are exported from sfx library
+    if (rItemName == "SfxBoolItem" ||
+        rItemName == "SfxStringItem" ||
+        rItemName == "SfxUInt16Item" ||
+        rItemName == "SfxUInt32Item" ||
+        rItemName == "SfxVoidItem")
+    {
+        bExport = true;
+        if (!rBase.sSlotMapFile.endsWith("sfxslots.hxx"))
+            bReturn = true;
+    }
+
+    rOutStm.WriteCharPtr( "extern " );
+    if (bExport)
+        rOutStm.WriteCharPtr( "SFX2_DLLPUBLIC " );
+    rOutStm.WriteCharPtr( aTypeName.getStr() )
            .WriteCharPtr( aVarName.getStr() ).WriteChar( ';' ) << endl;
+    if (bReturn)
+        return;
 
     // write the implementation part
     rOutStm.WriteCharPtr( "#ifdef SFX_TYPEMAP" ) << endl;
     rOutStm.WriteCharPtr( "#if !defined(_WIN32) && ((defined(DISABLE_DYNLOADING) && (defined(ANDROID) || defined(IOS))) || STATIC_LINKING)" ) << endl;
     rOutStm.WriteCharPtr( "__attribute__((__weak__))" ) << endl;
     rOutStm.WriteCharPtr( "#endif" ) << endl;
+    if (bExport)
+        rOutStm.WriteCharPtr( "SFX2_DLLPUBLIC " );
     rOutStm.WriteCharPtr( aTypeName.getStr() ).WriteCharPtr( aVarName.getStr() )
            .WriteCharPtr( " = " ) << endl;
     rOutStm.WriteChar( '{' ) << endl;
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 3ac165d..04f351c 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -34,6 +34,7 @@ SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd )
     , aPersStream( *IDLAPP->pClassMgr, NULL )
     , pIdTable( NULL )
 {
+    sSlotMapFile = rCmd.aSlotMapFile;
 }
 
 SvIdlDataBase::~SvIdlDataBase()
commit ef87ff6680f79362a431db6e7ef2f40cfc576219
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Fri Mar 14 09:42:02 2014 +0100

    fdo#51819: autorecovery: fix saving password in protected documents.
    
    Thanks to sayt at mailinator.com for the idea.
    
    Change-Id: Ib79abafe3d4d3ba21f7914aeb284d86ce662824c

diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 980e92b..4ebd694 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -3233,9 +3233,11 @@ void AutoRecovery::implts_saveOneDoc(const OUString&
     // if the document was loaded with a password, it should be
     // stored with password
     utl::MediaDescriptor lNewArgs;
-    OUString sPassword = lOldArgs.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PASSWORD(), OUString());
-    if (!sPassword.isEmpty())
-        lNewArgs[utl::MediaDescriptor::PROP_PASSWORD()] <<= sPassword;
+    css::uno::Sequence< css::beans::NamedValue > aEncryptionData =
+        lOldArgs.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ENCRYPTIONDATA(),
+                css::uno::Sequence< css::beans::NamedValue >());
+    if (aEncryptionData.getLength() > 0)
+        lNewArgs[utl::MediaDescriptor::PROP_ENCRYPTIONDATA()] <<= aEncryptionData;
 
     // Further it must be saved using the default file format of that application.
     // Otherwhise we will some data lost.


More information about the Libreoffice-commits mailing list