[Libreoffice-commits] .: binfilter/bf_so3 binfilter/inc

Joseph Powers jpowers at kemper.freedesktop.org
Mon Jan 17 20:46:34 PST 2011


 binfilter/bf_so3/source/inplace/ipenv.cxx |  129 ++++--------------------------
 binfilter/inc/bf_so3/iface.hxx            |    9 --
 binfilter/inc/bf_so3/ipenv.hxx            |   12 +-
 binfilter/inc/bf_so3/so2dll.hxx           |    5 -
 4 files changed, 29 insertions(+), 126 deletions(-)

New commits:
commit 44e0f28d0cffb344803c4737616dea1d41534676
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Mon Jan 17 20:43:41 2011 -0800

    Remove DECLARE_LIST(SvContainerEnvironmentList,SvContainerEnvironment*)
    
    I also removed SvAppFrame::pChildList and its related code. The code never
    inserted anyting into the list; thus, it could never having anything in it
    to process.

diff --git a/binfilter/bf_so3/source/inplace/ipenv.cxx b/binfilter/bf_so3/source/inplace/ipenv.cxx
index 0a47d4f..94a8d47 100644
--- a/binfilter/bf_so3/source/inplace/ipenv.cxx
+++ b/binfilter/bf_so3/source/inplace/ipenv.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -48,62 +48,7 @@ namespace binfilter {
 //=========================================================================
 //==========SvContainerEnvironment=========================================
 //=========================================================================
-/************************************************************************
-|*	  SvPrint( ... )
-|*
-|*	  Beschreibung
-*************************************************************************/
-#ifdef DBG_UTIL
-ByteString SvPrint( const SvBorder & rThis )
-{
-    ByteString aStr( "LTRB( " );
-    aStr += ByteString::CreateFromInt32(rThis.Left());
-    aStr += ", ";
-    aStr += ByteString::CreateFromInt32(rThis.Top());
-    aStr += ", ";
-    aStr += ByteString::CreateFromInt32(rThis.Right());
-    aStr += ", ";
-    aStr += ByteString::CreateFromInt32(rThis.Bottom());
-    aStr += " )";
-    return aStr;
-}
-ByteString SvPrint( const Point & rPos )
-{
-    ByteString aStr( "( " );
-    aStr += ByteString::CreateFromInt32(rPos.X());
-    aStr += ", ";
-    aStr += ByteString::CreateFromInt32(rPos.Y());
-    aStr += " )";
-    return aStr;
-}
-ByteString SvPrint( const Size & rSize )
-{
-    ByteString aStr( "( " );
-    aStr += ByteString::CreateFromInt32(rSize.Width());
-    aStr += ", ";
-    aStr += ByteString::CreateFromInt32(rSize.Height());
-    aStr += " )";
-    return aStr;
-}
 
-ByteString SvPrint( const Rectangle & rRect )
-{
-    ByteString aStr( "LTRB( " );
-    aStr += ByteString::CreateFromInt32(rRect.Left());
-    aStr += ", ";
-    aStr += ByteString::CreateFromInt32(rRect.Top());
-    aStr += ", ";
-    aStr += ByteString::CreateFromInt32(rRect.Right());
-    aStr += ", ";
-    aStr += ByteString::CreateFromInt32(rRect.Bottom());
-    aStr += " )";
-    return aStr;
-}
-#endif
-
-//=========================================================================
-//=========================================================================
-//=========================================================================
 SO2_IMPL_INTERFACE1(SvAppFrame,SvObject)
 
 ::IUnknown * SvAppFrame::GetMemberInterface( const SvGlobalName & )
@@ -154,8 +99,8 @@ static void InsertInContList( SvContainerEnvironment * p )
 {
     SoDll * pSoApp = SOAPP;
     if( !pSoApp->pContEnvList )
-        pSoApp->pContEnvList = new SvContainerEnvironmentList( 2, 2 );
-    pSoApp->pContEnvList->Insert( p, LIST_APPEND );
+        pSoApp->pContEnvList = new SvContainerEnvironmentList();
+    pSoApp->pContEnvList->push_back( p );
 }
 
 #define INIT_CTOR	 				\
@@ -186,14 +131,9 @@ SvContainerEnvironment::SvContainerEnvironment
     , pIPEnv( NULL )
     , pObj( pCl )
     , pParent( NULL )
-    , pChildList( NULL )
     , pTopWin( pTopWinP )
     , pDocWin( pDocWinP )
     , INIT_CTOR
-/*	[Beschreibung]
-
-    [Querverweise]
-*/
 {
     InsertInContList( this );
 }
@@ -222,9 +162,18 @@ SvContainerEnvironment::~SvContainerEnvironment()
         delete pTopWin;
 
     SoDll * pSoApp = SOAPP;
-    pSoApp->pContEnvList->Remove( this );
-    if( pParent )
-        pParent->pChildList->Remove( this );
+    for( SvContainerEnvironmentList::iterator it = pSoApp->pContEnvList->begin();
+         it < pSoApp->pContEnvList->end();
+         ++it
+       )
+    {
+        if ( *it == this )
+        {
+            pSoApp->pContEnvList->erase( it );
+            break;
+        }
+    }
+
     delete pAccel;
 
     DBG_ASSERT( !xAppFrame.Is() || 1 == xAppFrame->GetRefCount(),
@@ -236,7 +185,7 @@ SvContainerEnvironment::~SvContainerEnvironment()
 //=========================================================================
 
 //=========================================================================
-SvContainerEnvironment * SvContainerEnvironment::GetChild
+SvContainerEnvironment* SvContainerEnvironment::GetChild
 (
     ULONG nChildPos	/* Position des Childs in der Liste */
 ) const
@@ -256,7 +205,7 @@ SvContainerEnvironment * SvContainerEnvironment::GetChild
     <SvContainerEnvironment::()>
 */
 {
-    return pChildList ? pChildList->GetObject( nChildPos ) : NULL;
+    return NULL;
 }
 
 //=========================================================================
@@ -267,19 +216,6 @@ void SvContainerEnvironment::ResetChilds()
     stehen, werden abgebrochen.
 */
 {
-    if( pChildList )
-    {
-        // original Liste wird durch Disconnect ver"andert
-        SvContainerEnvironmentList aList( *pChildList );
-        SvContainerEnvironment * pChild = aList.First();
-        while( pChild )
-        {
-            if( pChild->pObj )
-                // Child disconnecten
-                pChild->pObj->GetProtocol().Reset();
-            pChild = aList.Next();
-        }
-    }
 }
 
 //=========================================================================
@@ -413,7 +349,7 @@ MenuBar * SvContainerEnvironment::QueryMenu
 (
     USHORT * ,
     USHORT * ,
-    USHORT * 
+    USHORT *
 )
 {
     return 0;
@@ -442,11 +378,8 @@ void SvContainerEnvironment::MenuReleased()
 |*
 |*	  Beschreibung
 *************************************************************************/
-void SvContainerEnvironment::UIToolsShown( BOOL bShow )
+void SvContainerEnvironment::UIToolsShown( BOOL /* bShow */ )
 {
-    (void)bShow;
-    //if( !IsStub() && !bShow )
-    //	SvSO::SetAppBorder( 0, 0, 0, 0 );
 }
 
 /*************************************************************************
@@ -971,10 +904,6 @@ void SvInPlaceEnvironment::DoShowUITools( BOOL bShow )
         // unbedingt zuerst setzen
         pSoApp->pUIShowIPEnv = this;
 
-        // this is only for MDI apps!
-//        if( pUIEnv )
-//            pUIEnv->DoShowUITools( FALSE );
-
         // kein Child darf UI-Aktiv sein
         SvContainerEnvironment * pEnv = GetContainerEnv();
         pEnv->ResetChilds2IPActive();
@@ -986,26 +915,6 @@ void SvInPlaceEnvironment::DoShowUITools( BOOL bShow )
             pPar->GetIPClient()->GetProtocol().Reset2InPlaceActive();
             pPar = pPar->GetParent();
         }
-/*
-        SvContainerEnvironmentList * pList = pSoApp->pContEnvList;
-        if( pList )
-        {
-            for( ULONG i = 0; i < pList->Count(); i++ )
-            {
-                SvContainerEnvironment * pFrm = pList->GetObject( i );
-                if( !pFrm->IsStub() && pFrm->GetIPEnv()
-                  && pFrm->GetIPEnv()->IsShowUITools() )
-                {
-                    SvInPlaceClient * pCl = pFrm->GetIPClient();
-                    if( pCl && pCl->GetProtocol().IsUIActive() )
-                        // Objekte-UI-Tools ueber UIActivate( FALSE ) wegnehmen
-                        pCl->GetProtocol().Reset2InPlaceActive();
-                    else
-                        pFrm->GetIPEnv()->DoShowUITools( FALSE );
-                }
-            }
-        }
-*/
     }
     else if( !bShow && !GetContainerEnv()->IsStub() )
     {
diff --git a/binfilter/inc/bf_so3/iface.hxx b/binfilter/inc/bf_so3/iface.hxx
index bcb88c4..af702b6 100644
--- a/binfilter/inc/bf_so3/iface.hxx
+++ b/binfilter/inc/bf_so3/iface.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -311,13 +311,6 @@ RECT GetSysRect( const Rectangle & rRect );
 Rectangle GetSvRect( const RECT & rRect );
 #endif
 
-#ifdef DBG_UTIL
-ByteString  SvPrint( const SvBorder & );
-ByteString  SvPrint( const Rectangle & );
-ByteString  SvPrint( const Point & );
-ByteString  SvPrint( const Size & );
-#endif
-
 //=========================================================================
 
 }
diff --git a/binfilter/inc/bf_so3/ipenv.hxx b/binfilter/inc/bf_so3/ipenv.hxx
index 0ce94ff..fdf150d 100644
--- a/binfilter/inc/bf_so3/ipenv.hxx
+++ b/binfilter/inc/bf_so3/ipenv.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -50,10 +50,10 @@ namespace binfilter {
 
 class  SvInPlaceClient;
 class  SvInPlaceObject;
-class  SvContainerEnvironment;
 class  SvInPlaceClipWindow;
 class  SvInPlaceWindow;
-class  SvContainerEnvironmentList;
+class  SvContainerEnvironment;
+
 //=========================================================================
 class SO3_DLLPUBLIC SvAppFrame : public SvObject
 {
@@ -104,8 +104,7 @@ friend class SvInPlaceObject;
 private:
     SvInPlaceEnvironment *		pIPEnv; // IP-Env des Objektes
     SvInPlaceClient *			pObj;	// kann auch NULL sein
-    SvContainerEnvironment *	pParent;// fuer IP in IP
-    SvContainerEnvironmentList * pChildList; // fuer IP in IP
+    SvContainerEnvironment*     pParent;// fuer IP in IP
     WorkWindow *            	pTopWin;// Application window
     WorkWindow *            	pDocWin;// doc window != pTopWin
     SvAppFrameRef				xAppFrame;
@@ -134,7 +133,7 @@ private:
     SO3_DLLPRIVATE void			ResetIPEnv()
                     { pIPEnv = NULL; }
     SO3_DLLPRIVATE void			MakeWinContext_Impl();
-    //void			DeleteWindows_Impl();
+
 protected:
     virtual void	ShowUIByChildDeactivate();
 
@@ -214,7 +213,6 @@ public:
     virtual void 	ShowDocument( const INetURLObject &,
                                   const XubString & );
 };
-DECLARE_LIST(SvContainerEnvironmentList,SvContainerEnvironment*)
 
 /*************************************************************************/
 class SO3_DLLPUBLIC SvInPlaceEnvironment
diff --git a/binfilter/inc/bf_so3/so2dll.hxx b/binfilter/inc/bf_so3/so2dll.hxx
index 65b808b..eee94ec 100644
--- a/binfilter/inc/bf_so3/so2dll.hxx
+++ b/binfilter/inc/bf_so3/so2dll.hxx
@@ -32,6 +32,7 @@
 #include <tools/pstm.hxx>
 #include <tools/link.hxx>
 #include <tools/globname.hxx>
+#include <vector>
 
 #include "bf_so3/so3dllapi.h"
 
@@ -55,13 +56,15 @@ class SvInPlaceClient;
 class SvInPlaceClientList;
 class SvInPlaceObjectList;
 class ImplSvEditObjectProtocol;
-class SvContainerEnvironmentList;
 class SvInPlaceEnvironment;
 class SvVerbList;
 struct SvBindingData;
 class SvObjectList;
 class ImpFactory;
 
+class  SvContainerEnvironment;
+typedef ::std::vector< SvContainerEnvironment* > SvContainerEnvironmentList;
+
 //=========================================================================
 struct SO3_DLLPUBLIC ConvertTo_Impl
 /*  [Beschreibung]


More information about the Libreoffice-commits mailing list