[ooo-build-commit] patches/dev300 patches/vba

Noel Power noelp at kemper.freedesktop.org
Thu Nov 12 02:38:23 PST 2009


 patches/dev300/apply                            |    1 
 patches/vba/vba-fix-override-exportproblem.diff |   71 ++++++++++++++++++++++++
 2 files changed, 72 insertions(+)

New commits:
commit bca5ce761130f284a963405cc6c150e4d3e98c8e
Author: Noel Power <noel.power at novell.com>
Date:   Thu Nov 12 10:35:33 2009 +0000

    fix problem when override code still is invoked for form controls
    
    if a document containing ocx controls ( with the specifial control name override behaviour ) is roundtripped, when that document is re-read the controlname override hack is exectuted ( but this should only be executed for ocx controls only ).
    * patches/dev300/apply:
    * patches/vba/vba-fix-override-exportproblem.diff: limit control name override logic to ocx controls only

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 847122f..a20062c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1678,6 +1678,7 @@ vba-basic-not-fix.diff, i#105321, Fong
 vba-autofiltermode.diff, n#549383
 vba-combobox-listindex-fix.diff, n#539220
 vba-fix-selection-dot-inproject.diff
+vba-fix-override-exportproblem.diff
 [VBAUntested]
 SectionOwner => noelpwer
 # doesn't work
diff --git a/patches/vba/vba-fix-override-exportproblem.diff b/patches/vba/vba-fix-override-exportproblem.diff
new file mode 100644
index 0000000..4667775
--- /dev/null
+++ b/patches/vba/vba-fix-override-exportproblem.diff
@@ -0,0 +1,71 @@
+diff --git sc/source/filter/excel/xiescher.cxx sc/source/filter/excel/xiescher.cxx
+index 5eb246e..7a36a07 100644
+--- sc/source/filter/excel/xiescher.cxx
++++ sc/source/filter/excel/xiescher.cxx
+@@ -401,16 +401,11 @@ void XclImpDrawObjBase::SetAnchor( const XclObjAnchor& rAnchor )
+ 
+ String XclImpDrawObjBase::GetObjName() const
+ {
+-    String sName( GetObjectManager().GetOleNameOverride( GetObjId() ) );
+-  
+-    
+     /*  #118053# #i51348# Always return a non-empty name. Create English
+         default names depending on the object type. This is not implemented as
+         virtual functions in derived classes, as class type and object type may
+         not match. */
+-    if ( sName.Len() == 0 )
+-        sName = ( (maObjName.Len() > 0) ? maObjName : GetObjectManager().GetDefaultObjName( *this ) );
+-    return sName;
++    return (maObjName.Len() > 0) ? maObjName : GetObjectManager().GetDefaultObjName( *this );
+ }
+ 
+ bool XclImpDrawObjBase::IsValidSize( const Rectangle& rAnchorRect ) const
+@@ -2788,6 +2783,17 @@ SdrObject* XclImpPictureObj::DoCreateSdrObj( const Rectangle& rAnchorRect, ScfPr
+     return xSdrObj.release();
+ }
+ 
++String XclImpPictureObj::GetObjName() const
++{
++    if( IsOcxControl() )
++    {
++        String sName( GetObjectManager().GetOleNameOverride( GetObjId() ) );
++        if ( sName.Len() > 0 )
++            return sName;
++    }
++    return XclImpDrawObjBase::GetObjName();
++}
++
+ void XclImpPictureObj::DoProcessSdrObj( SdrObject& rSdrObj ) const
+ {
+     if( IsOcxControl() )
+diff --git sc/source/filter/inc/xiescher.hxx sc/source/filter/inc/xiescher.hxx
+index a673a5e..a9eca6e 100644
+--- sc/source/filter/inc/xiescher.hxx
++++ sc/source/filter/inc/xiescher.hxx
+@@ -95,7 +95,7 @@ public:
+     /** Returns the Excel object type from OBJ record. */
+     inline sal_uInt16   GetObjType() const { return mnObjType; }
+     /** Returns the name of this object, may generate a default name. */
+-    String              GetObjName() const;
++    virtual String              GetObjName() const;
+     /** Returns associated macro name, if set, otherwise zero length string. */
+     inline const String& GetMacroName() const { return maMacroName; }
+ 
+@@ -860,7 +860,8 @@ class XclImpPictureObj : public XclImpRectObj, public XclImpControlHelper
+ {
+ public:
+     explicit            XclImpPictureObj( const XclImpRoot& rRoot );
+-
++    /** Returns the ObjectName - can use non-obvious lookup for override in the associated vba document module stream**/
++    virtual String              GetObjName() const;
+     /** Returns the graphic imported from the IMGDATA record. */
+     inline const Graphic& GetGraphic() const { return maGraphic; }
+     /** Returns the visible area of the imported graphic. */
+@@ -891,7 +892,6 @@ protected:
+     virtual SdrObject*  DoCreateSdrObj( const Rectangle& rAnchorRect, ScfProgressBar& rProgress ) const;
+     /** Overloaded to do additional processing on the SdrObject. */
+     virtual void        DoProcessSdrObj( SdrObject& rSdrObj ) const;
+-
+ private:
+     /** Reads and sets the picture flags from a BIFF3-BIFF5 OBJ picture record. */
+     void                ReadFlags3( XclImpStream& rStrm );


More information about the ooo-build-commit mailing list