Commits

Anonymous committed 39f1df3

CWS-TOOLING: integrate CWS sw301bf03_DEV300

  • Participants
  • Parent commits 3b0e637

Comments (0)

Files changed (9)

File comphelper/inc/comphelper/propertybag.hxx

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: propertybag.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.60.1 $
  *
  * This file is part of OpenOffice.org.
  *
         PropertyBag();
         virtual ~PropertyBag();
 
+        /** allow adding property with empty string as name
+            (by default, such names are rejected with IllegalActionException).
+            @param i_isAllowed
+                iff true, empty property name will be allowed
+         */
+        void setAllowEmptyPropertyName(bool i_isAllowed = true);
+
         /** adds a property to the bag
 
             The type of the property is determined from its initial value (<code>_rInitialValue</code>).
 
             @param _rName
-                the name of the new property. Must not be empty.
+                the name of the new property. Must not be empty unless
+                explicitly allowed with setAllowEmptyPropertyName.
             @param _nHandle
                 the handle of the new property
             @param _nAttributes

File comphelper/source/property/opropertybag.cxx

             );
 
         aArguments.get_ensureType( "AutomaticAddition", m_bAutoAddProperties );
+        bool AllowEmptyPropertyName(false);
+        aArguments.get_ensureType( "AllowEmptyPropertyName",
+            AllowEmptyPropertyName );
+        if (AllowEmptyPropertyName) {
+            m_aDynamicProperties.setAllowEmptyPropertyName(
+                AllowEmptyPropertyName);
+        }
     }
 
     //--------------------------------------------------------------------

File comphelper/source/property/propertybag.cxx

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: propertybag.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.60.1 $
  *
  * This file is part of OpenOffice.org.
  *
     typedef ::std::map< sal_Int32, Any >    MapInt2Any;
     struct PropertyBag_Impl
     {
+        PropertyBag_Impl() : m_bAllowEmptyPropertyName(false) { }
         MapInt2Any  aDefaults;
+        bool m_bAllowEmptyPropertyName;
     };
 
 	//====================================================================
     }
 
 	//--------------------------------------------------------------------
+    void PropertyBag::setAllowEmptyPropertyName( bool i_isAllowed )
+    {
+        m_pImpl->m_bAllowEmptyPropertyName = i_isAllowed;
+    }
+
+	//--------------------------------------------------------------------
     void PropertyBag::addProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Any& _rInitialValue )
     {
         // check type sanity
         Type aPropertyType = _rInitialValue.getValueType();
         if ( aPropertyType.getTypeClass() == TypeClass_VOID )
             throw IllegalTypeException(
-                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The initial vallue must be non-NULL, to determine the property type." ) ),
+                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The initial value must be non-NULL to determine the property type." ) ),
                 // TODO: resource
                 NULL );
 
         // check name/handle sanity
-        if ( !_rName.getLength() )
+        if ( !m_pImpl->m_bAllowEmptyPropertyName && !_rName.getLength() )
             throw IllegalArgumentException(
             ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The property name must not be empty." ) ),
             // TODO: resource

File scp2/source/ooo/file_library_ooo.scp

         Name = "xsec_xmlsec.dll";
     #endif
     Dir = gid_Dir_Program;
-    Styles = (PACKED,UNO_COMPONENT);
+    Styles = (PACKED,UNO_COMPONENT,PATCH);
     RegistryID = gid_Starregistry_Services_Rdb;
 End
 

File sfx2/qa/complex/DocumentMetaData.java

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: DocumentMetaData.java,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.170.1 $
  *
  * This file is part of OpenOffice.org.
  *
             udpc.addProperty("Pi", PropertyAttribute.REMOVEABLE, new Double(d));
             udpc.addProperty("Foo", PropertyAttribute.REMOVEABLE, "bar");
             udpc.addProperty("Removed", PropertyAttribute.REMOVEABLE, "bar");
+            // #i94175#: empty property name is valid ODF 1.1
+            udpc.addProperty("", PropertyAttribute.REMOVEABLE, "eeeeek");
             try {
                 udpc.removeProperty("Info 1");
                 udpc.removeProperty("Removed");
                     udps.getPropertyValue("Pi")));
             assure ("UserDefined string", "bar".equals(
                     udps.getPropertyValue("Foo")));
+            assure ("UserDefined empty name", "eeeeek".equals(
+                    udps.getPropertyValue("")));
 
             try {
                 udps.getPropertyValue("Removed");

File sfx2/source/doc/SfxDocumentMetaData.cxx

     types[7] = ::cppu::UnoType<sal_Int16>::get();
     types[8] = ::cppu::UnoType<sal_Int32>::get();
     types[9] = ::cppu::UnoType<sal_Int64>::get();
-    css::uno::Sequence<css::uno::Any> args(1);
+    css::uno::Sequence<css::uno::Any> args(2);
     args[0] <<= css::beans::NamedValue(
         ::rtl::OUString::createFromAscii("AllowedTypes"),
         css::uno::makeAny(types));
+    // #i94175#:  ODF 1.1 allows empty user-defined property names!
+    args[1] <<= css::beans::NamedValue(
+        ::rtl::OUString::createFromAscii("AllowEmptyPropertyName"),
+        css::uno::makeAny(sal_True));
     m_xUserDefined.set(
         xMsf->createInstanceWithContext(::rtl::OUString::createFromAscii(
                 "com.sun.star.beans.PropertyBag"), m_xContext),
         } catch (css::beans::IllegalTypeException &) {
             DBG_ERROR1("SfxDocumentMetaData: illegal type: %s",
                     OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
-            throw css::uno::RuntimeException(::rtl::OUString::createFromAscii(
-                "SfxDocumentMetaData::init: cannot add property"),
-                *this);
         } catch (css::lang::IllegalArgumentException &) {
             DBG_ERROR1("SfxDocumentMetaData: illegal arg: %s",
                     OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
-            throw css::uno::RuntimeException(::rtl::OUString::createFromAscii(
-                "SfxDocumentMetaData::init: cannot add property"),
-                *this);
         }
     }
 

File sw/source/core/layout/calcmove.cxx

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: calcmove.cxx,v $
- * $Revision: 1.73 $
+ * $Revision: 1.73.252.1 $
  *
  * This file is part of OpenOffice.org.
  *
 		}
 	}
 
+    // --> OD 2008-08-12 #b6732519#
+    if ( GetUpper()->IsSctFrm() &&
+         HasFollow() &&
+         GetFollow()->GetFrm() == GetNext() )
+    {
+        dynamic_cast<SwTxtFrm*>(this)->JoinFrm();
+    }
+    // <--
+
     // --> OD 2004-06-23 #i28701# - move master forward, if it has to move,
     // because of its object positioning.
     if ( !static_cast<SwTxtFrm*>(this)->IsFollow() )

File sw/source/core/layout/wsfrm.cxx

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: wsfrm.cxx,v $
- * $Revision: 1.86 $
+ * $Revision: 1.86.124.1 $
  *
  * This file is part of OpenOffice.org.
  *
         else
             nRstHeight = 0;
 		if( nRstHeight < 0 )
-			nRstHeight = nDist + nRstHeight;
-		else
+        {
+            SwTwips nNextHeight = 0;
+            if( GetUpper()->IsSctFrm() && nDist > LONG_MAX/2 )
+            {
+                SwFrm *pNxt = GetNext();
+                while( pNxt )
+                {
+                    nNextHeight += (pNxt->Frm().*fnRect->fnGetHeight)();
+                    pNxt = pNxt->GetNext();
+                }
+            }
+            nRstHeight = nDist + nRstHeight - nNextHeight;
+        }
+        else
 			nRstHeight = nDist;
         (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() - nDist );
         if( IsVertical() )

File sw/source/filter/html/htmltab.cxx

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: htmltab.cxx,v $
- * $Revision: 1.28 $
+ * $Revision: 1.28.186.1 $
  *
  * This file is part of OpenOffice.org.
  *
 							pCnts->CreateLayoutInfo();
 
                         pCell2->SetContents( pCnts );
-						pLayoutInfo->GetCell( nTopRow, nStartCol )
-								   ->SetContents( pCntsLayoutInfo );
+						SwHTMLTableLayoutCell *pCurrCell = pLayoutInfo->GetCell( nTopRow, nStartCol );
+                        pCurrCell->SetContents( pCntsLayoutInfo );
+                        if( nBoxRowSpan < 0 )
+                            pCurrCell->SetRowSpan( 0 );
 
 						// ggf. COLSPAN beachten
 						for( sal_uInt16 j=nStartCol+1; j<nSplitCol; j++ )