[Libreoffice-commits] .: 7 commits - filter/source

René Engelhard rene at kemper.freedesktop.org
Fri Nov 26 08:51:29 PST 2010


 filter/source/msfilter/svdfppt.cxx |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 8a3506337f6f5e81808025abf755e836aaef73e4
Merge: 710f69a... 94067e3...
Author: Rene Engelhard <rene at debian.org>
Date:   Fri Nov 26 17:50:29 2010 +0100

    Merge branch 'libreoffice-3-3'

commit 94067e34da79c8a09ddd6d5b8fdb35f59dbe2073
Merge: 774703e... 04950a8...
Author: Rene Engelhard <rene at debian.org>
Date:   Fri Nov 26 17:41:20 2010 +0100

    Merge commit 'ooo/OOO330_m17' into libreoffice-3-3

commit 774703e913c5c5e1eef3dca01f951c61ed7f1e01
Author: Noel Power <noel.power at novell.com>
Date:   Fri Nov 26 15:55:48 2010 +0000

    oops revert previous commit, not for stable branch

diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 62d6d41..d310ea3 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -269,44 +269,6 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
             case NS_ooxml::LN_CT_TblPrBase_tblLook: 
                 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
                 break; //todo: table look specifier
-            case NS_ooxml::LN_CT_TcPrBase_textDirection:
-            {
-                TablePropertyMapPtr pPropMap( new TablePropertyMap );
-                const sal_Int16 HORI_LEFT_TOP = 0;
-                /*const sal_Int16 HORI_RIGHT_TOP = 1;*/ // currently not used below
-                const sal_Int16 VERT_TOP_RIGHT = 2;
-                bool bInsertCellProps = true;
-                switch ( nIntValue )
-                {
-                    case 1:  // tbRl
-                    // Binary filter takes BiDirection into account ( but I have no idea about that here )
-                    // or even what it is. But... here's where to handle it if it becomes an issue
-                        pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( VERT_TOP_RIGHT ));
-                        OSL_TRACE("Have inserted textDirection %d", nIntValue );
-                        break;
-                    case 3:  // btLr
-                        // We have to fake this text direction
-                         pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP ));
-                         pPropMap->Insert( PROP_CHAR_ROTATION, false, uno::makeAny( sal_Int16( 900 ) ));
-                        OSL_TRACE("Have inserted textDirection %d", nIntValue );
-                        break;
-                    case 4: // lrTbV
-                        pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP ));
-                        break;
-                    case 5: // tbRlV
-                        pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( VERT_TOP_RIGHT ));
-                        break;
-                    case 0: // lrTb
-                    case NS_ooxml::LN_Value_ST_TextDirection_tbLrV:
-                    default:
-                       // Ignore - we can't handle these
-                       bInsertCellProps = false;
-                       break;
-                }
-                if ( bInsertCellProps )
-                    cellProps( pPropMap );
-                break;
-            }
             case NS_ooxml::LN_CT_TcPrBase_tcW: 
                 /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
                 break; //fixed column width is not supported
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index add98f9..f846293 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -324,7 +324,6 @@ const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
             case PROP_PARA_SPLIT:    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaSplit")); break;
             case PROP_HELP:    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Help")); break;
             case PROP_HEADING_STYLE_NAME:    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); break;
-            case PROP_FRM_DIRECTION:        sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FRMDirection")); break;
 //            case       :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
 //            case       :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
 //            case       :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index 401c3e3..36e48d2 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -287,7 +287,6 @@ enum PropertyIds
 /*250*/ ,PROP_HEADING_STYLE_NAME
 /*251*/ ,PROP_PARA_SPLIT
 /*252*/ ,PROP_HELP
-/*253*/ ,PROP_FRM_DIRECTION
 };
 struct PropertyNameSupplier_Impl;
 class PropertyNameSupplier
commit 4f4013169ddf827807ffe41e99b845b2dc10fa03
Author: Noel Power <noel.power at novell.com>
Date:   Fri Nov 26 15:32:34 2010 +0000

    tentative fix for fdo#30474#

diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index d310ea3..62d6d41 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -269,6 +269,44 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
             case NS_ooxml::LN_CT_TblPrBase_tblLook: 
                 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
                 break; //todo: table look specifier
+            case NS_ooxml::LN_CT_TcPrBase_textDirection:
+            {
+                TablePropertyMapPtr pPropMap( new TablePropertyMap );
+                const sal_Int16 HORI_LEFT_TOP = 0;
+                /*const sal_Int16 HORI_RIGHT_TOP = 1;*/ // currently not used below
+                const sal_Int16 VERT_TOP_RIGHT = 2;
+                bool bInsertCellProps = true;
+                switch ( nIntValue )
+                {
+                    case 1:  // tbRl
+                    // Binary filter takes BiDirection into account ( but I have no idea about that here )
+                    // or even what it is. But... here's where to handle it if it becomes an issue
+                        pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( VERT_TOP_RIGHT ));
+                        OSL_TRACE("Have inserted textDirection %d", nIntValue );
+                        break;
+                    case 3:  // btLr
+                        // We have to fake this text direction
+                         pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP ));
+                         pPropMap->Insert( PROP_CHAR_ROTATION, false, uno::makeAny( sal_Int16( 900 ) ));
+                        OSL_TRACE("Have inserted textDirection %d", nIntValue );
+                        break;
+                    case 4: // lrTbV
+                        pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP ));
+                        break;
+                    case 5: // tbRlV
+                        pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( VERT_TOP_RIGHT ));
+                        break;
+                    case 0: // lrTb
+                    case NS_ooxml::LN_Value_ST_TextDirection_tbLrV:
+                    default:
+                       // Ignore - we can't handle these
+                       bInsertCellProps = false;
+                       break;
+                }
+                if ( bInsertCellProps )
+                    cellProps( pPropMap );
+                break;
+            }
             case NS_ooxml::LN_CT_TcPrBase_tcW: 
                 /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
                 break; //fixed column width is not supported
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index f846293..add98f9 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -324,6 +324,7 @@ const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
             case PROP_PARA_SPLIT:    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaSplit")); break;
             case PROP_HELP:    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Help")); break;
             case PROP_HEADING_STYLE_NAME:    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); break;
+            case PROP_FRM_DIRECTION:        sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FRMDirection")); break;
 //            case       :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
 //            case       :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
 //            case       :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index 36e48d2..401c3e3 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -287,6 +287,7 @@ enum PropertyIds
 /*250*/ ,PROP_HEADING_STYLE_NAME
 /*251*/ ,PROP_PARA_SPLIT
 /*252*/ ,PROP_HELP
+/*253*/ ,PROP_FRM_DIRECTION
 };
 struct PropertyNameSupplier_Impl;
 class PropertyNameSupplier
commit 04950a878291e95b1a4892856c2217cba5858259
Merge: 0975085... f40a410...
Author: Kurt Zenker <kz at openoffice.org>
Date:   Tue Nov 23 16:56:24 2010 +0100

    CWS-TOOLING: integrate CWS os145

commit f40a4108f21c4909061ee8c4db252dbc77ac933b
Author: sj <sj at openoffice.org>
Date:   Tue Nov 23 10:41:33 2010 +0100

    os145: #b7001886# improved ppt import filter

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 8eea204..46a4881 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1475,9 +1475,9 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
 
         if ( bOk && ( nPersistPtrAnz < ( SAL_MAX_UINT32 / sizeof( UINT32 ) ) ) )
             pPersistPtr = new (std::nothrow) UINT32[ nPersistPtrAnz ];
-        if ( bOk && !pPersistPtr )
+        if ( !pPersistPtr )
             bOk = FALSE;
-        else
+        if ( bOk )
         {
             memset( pPersistPtr, 0x00, nPersistPtrAnz * 4 );
 
commit 78a03db7e1092f0edad88004eb809a99c823e842
Author: sj <sj at openoffice.org>
Date:   Mon Nov 22 19:00:24 2010 +0100

    os145: #b7001886# fixing small ppt import problem, improving png reader

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index bd22920..8eea204 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1468,10 +1468,14 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
 
     if ( bOk )
     {
-        // PersistPtrs lesen (alle)
-        nPersistPtrAnz = aUserEditAtom.nMaxPersistWritten + 1;	// 1 mehr, damit ich immer direkt indizieren kann
-        pPersistPtr = new UINT32[ nPersistPtrAnz ];				// (die fangen naemlich eigentlich bei 1 an)
-        if ( !pPersistPtr )
+        nPersistPtrAnz = aUserEditAtom.nMaxPersistWritten + 1;
+        if ( ( nPersistPtrAnz >> 2 ) > nStreamLen )		// sj: at least nPersistPtrAnz is not allowed to be greater than filesize
+            bOk = FALSE;								// (it should not be greater than the PPT_PST_PersistPtrIncrementalBlock, but
+                                                        // we are reading this block later, so we do not have access yet)
+
+        if ( bOk && ( nPersistPtrAnz < ( SAL_MAX_UINT32 / sizeof( UINT32 ) ) ) )
+            pPersistPtr = new (std::nothrow) UINT32[ nPersistPtrAnz ];
+        if ( bOk && !pPersistPtr )
             bOk = FALSE;
         else
         {
@@ -5087,8 +5091,8 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
             rIn >> nCharCount
                 >> aParaPropSet.pParaSet->mnDepth;	// Einruecktiefe
 
-            aParaPropSet.pParaSet->mnDepth = 
-                std::min(sal_uInt16(9),
+            aParaPropSet.pParaSet->mnDepth =		// taking care of about using not more than 9 outliner levels
+                std::min(sal_uInt16(8),
                     aParaPropSet.pParaSet->mnDepth);
 
             nCharCount--;


More information about the Libreoffice-commits mailing list