[Libreoffice-commits] .: 2 commits - binfilter/bf_basic binfilter/bf_sfx2 binfilter/inc
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Jan 27 05:00:51 PST 2012
binfilter/bf_basic/source/sbx/sbxobj.cxx | 5
binfilter/bf_sfx2/source/doc/sfx2_dinfobj.cxx | 232 --------------------------
binfilter/bf_sfx2/source/inc/dinfobj.hxx | 62 ------
binfilter/inc/bf_basic/sbx.hxx | 1
binfilter/inc/bf_basic/sbxobj.hxx | 4
binfilter/inc/bf_sfx2/progress.hxx | 1
binfilter/inc/bf_svx/boxobj.hxx | 2
7 files changed, 1 insertion(+), 306 deletions(-)
New commits:
commit 8d5e6ebac9ce8b488a97fcb0dc49f2355a212bee
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 27 09:53:16 2012 +0000
SvDispatch class doesn't exist anymore
diff --git a/binfilter/bf_basic/source/sbx/sbxobj.cxx b/binfilter/bf_basic/source/sbx/sbxobj.cxx
index 2230015..f918bb6 100644
--- a/binfilter/bf_basic/source/sbx/sbxobj.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxobj.cxx
@@ -839,11 +839,6 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill )
--nLevel;
}
-SvDispatch* SbxObject::GetSvDispatch()
-{
- return NULL;
-}
-
SbxClassType SbxMethod::GetClass() const
{
return SbxCLASS_METHOD;
diff --git a/binfilter/inc/bf_basic/sbx.hxx b/binfilter/inc/bf_basic/sbx.hxx
index b564e06..fc62648 100644
--- a/binfilter/inc/bf_basic/sbx.hxx
+++ b/binfilter/inc/bf_basic/sbx.hxx
@@ -48,7 +48,6 @@ class String;
class UniString;
class SvStream;
-class SvDispatch;
///////////////////////////////////////////////////////////////////////////
diff --git a/binfilter/inc/bf_basic/sbxobj.hxx b/binfilter/inc/bf_basic/sbxobj.hxx
index 50b05e1..1c58622 100644
--- a/binfilter/inc/bf_basic/sbxobj.hxx
+++ b/binfilter/inc/bf_basic/sbxobj.hxx
@@ -38,8 +38,6 @@
///////////////////////////////////////////////////////////////////////////
-class SvDispatch;
-
namespace binfilter {
class SbxProperty;
@@ -103,8 +101,6 @@ public:
SbxArray* GetMethods() { return pMethods; }
SbxArray* GetProperties() { return pProps; }
SbxArray* GetObjects() { return pObjs; }
- // Hooks
- virtual SvDispatch* GetSvDispatch();
// Debugging
void Dump( SvStream&, BOOL bDumpAll=FALSE );
};
diff --git a/binfilter/inc/bf_sfx2/progress.hxx b/binfilter/inc/bf_sfx2/progress.hxx
index 73bacc1..a6cfb0a 100644
--- a/binfilter/inc/bf_sfx2/progress.hxx
+++ b/binfilter/inc/bf_sfx2/progress.hxx
@@ -37,7 +37,6 @@ namespace binfilter {
class SfxObjectShell;
class SfxStatusBarManager;
class INetHint;
-class SvDispatch;
struct SfxProgress_Impl;
struct PlugInLoadStatus;
struct SvProgressArg;
diff --git a/binfilter/inc/bf_svx/boxobj.hxx b/binfilter/inc/bf_svx/boxobj.hxx
index d6e2103..02fe4ae 100644
--- a/binfilter/inc/bf_svx/boxobj.hxx
+++ b/binfilter/inc/bf_svx/boxobj.hxx
@@ -63,7 +63,7 @@ private:
#endif
protected:
- // Schnittstelle zum SbxObject/SvDispatch/SfxShell..Object
+ // Schnittstelle zum SbxObject/SfxShell..Object
void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType );
virtual ULONG SetProperty( USHORT nSID, SbxVariable &rRet );
commit fac28e54bff98e0e2d357f45546f433b6ef59164
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 27 09:31:55 2012 +0000
sfx2_dinfobj not compiled anymore
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_dinfobj.cxx b/binfilter/bf_sfx2/source/doc/sfx2_dinfobj.cxx
deleted file mode 100644
index 206dbca..0000000
--- a/binfilter/bf_sfx2/source/doc/sfx2_dinfobj.cxx
+++ /dev/null
@@ -1,232 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifdef _MSC_VER
-#pragma hdrstop
-#endif
-
-#include "app.hxx"
-#include "objface.hxx"
-#include "sfxsids.hrc"
-#include "docfile.hxx"
-#include "openflag.hxx"
-#include "dinfobj.hxx"
-#include "fcontnr.hxx"
-
-#include "bf_basic/sbx.hxx"
-//========================================================================
-
-#define DocumentInfo
-namespace binfilter {
-#include "sfxslots.hxx"
-
-#define aTypeLibInfo aDocumentInfoTypeLibImpl
-
-//=========================================================================
-
-SfxDocumentInfoObject_Impl::SfxDocumentInfoObject_Impl()
-: SvDispatch( DEFINE_CONST_UNICODE( "DocumentInfo" ) ),
- pMedium(0)
-{
- // Sbx-Flags
- SetType( SbxOBJECT );
- SetFlag( SBX_FIXED );
- SetFlag( SBX_DONTSTORE );
- ResetFlag( SBX_WRITE );
-}
-
-//--------------------------------------------------------------------
-
-SfxDocumentInfoObject_Impl::~SfxDocumentInfoObject_Impl()
-{
- delete pMedium;
-}
-
-//--------------------------------------------------------------------
-
-SvGlobalName SfxDocumentInfoObject_Impl::GetTypeName() const
-{
- SvGlobalName aName;
- aName.MakeId( String::CreateFromAscii( aTypeLibInfo.pShellUId ) );
- return aName;
-}
-
-//--------------------------------------------------------------------
-
-BOOL SfxDocumentInfoObject_Impl::FillTypeLibInfo( String * pName,
- USHORT * pMajor, USHORT * pMinor ) const
-{
- *pName = String::CreateFromAscii( aTypeLibInfo.pTypeLibName );
- *pMajor = aTypeLibInfo.nMajorVer;
- *pMinor = aTypeLibInfo.nMinorVer;
- return TRUE;
-}
-
-//------------------------------------------------------------------------
-
-void SfxDocumentInfoObject_Impl::Notify( SfxBroadcaster& rBC,
- const SfxHint& rHint )
-
-/* [Beschreibung]
-
- Diese Klasse ist nicht von SfxShellObject abgeleitet, da keine
- SfxShell die Verarbeitung "ubernimmt. Das Ansprechen der Properties
- und Methoden arbeitet daher auch via Notify().
-*/
-
-{
- // vor Selbstzerst"orung sch"utzen
- DBG_ASSERT( GetRefCount() != SV_NO_DELETE_REFCOUNT,
- "notify on unreferenced object => dying!!!" )
- SbxObjectRef xSelfRef( this );
-
- const SbxHint* pHint = PTR_CAST(SbxHint,&rHint);
- if( pHint )
- {
- // Art des Hint und SID auswerten
- ULONG nHint = pHint ? pHint->GetId() : 0;
- SbxVariable* pVar = pHint->GetVar();
- BOOL bRead = BOOL( nHint == SBX_HINT_DATAWANTED &&
- pVar->GetClass() == SbxCLASS_PROPERTY );
- BOOL bWrite = BOOL( nHint == SBX_HINT_DATACHANGED &&
- pVar->GetClass() == SbxCLASS_PROPERTY );
- BOOL bCall = BOOL( nHint == SBX_HINT_DATAWANTED &&
- pVar->GetClass() == SbxCLASS_METHOD );
- INT16 nSID = (INT16) ( pVar->GetUserData() & 0xFFFF );
-
- // Methode Load?
- if ( bCall && ( SID_DOCINFO_LOAD == nSID ) )
- {
- // ggf. altes Medium freigeben
- if ( pMedium )
- DELETEZ(pMedium);
-
- // 1. Parameter ist Dateiname
- SbxArray *pArgs = pVar->GetParameters();
- if ( !pArgs )
- {
- // Parameter fehlt
- pVar->PutBool( FALSE );
- return;
- }
-
- // Medium erstellen
- String aName( pArgs->Get(1)->GetString() );
- pMedium = new SfxMedium( aName, SFX_STREAM_READWRITE, TRUE );
- if ( !pMedium->GetStorage() )
- {
- // Datei existiert nicht oder ist kein Storage
- pVar->PutBool( FALSE );
- return;
- }
-
- // Storage "offnen
- SvStorageRef xStor = pMedium->GetStorage();
- if ( !xStor.Is() || SVSTREAM_OK != pMedium->GetError() )
- {
- // Fallback auf r/o
- delete pMedium;
- pMedium = new SfxMedium( aName, SFX_STREAM_READONLY, TRUE );
- xStor = pMedium->GetStorage();
-
- // konnte jetzt ge"offnet werden?
- if ( !xStor.Is() || SVSTREAM_OK != pMedium->GetError() )
- {
- pVar->PutBool( FALSE );
- return;
- }
- }
-
- // Filter-Detection wegen FileFormat-Version
- const SfxFilter *pFilter = 0;
- if ( 0 != SFX_APP()->GetFilterMatcher().GuessFilter( *pMedium, &pFilter ) ||
- !pFilter )
- {
- // unbekannted Dateiformat
- pVar->PutBool( FALSE );
- return;
- }
-
- xStor->SetVersion( pFilter->GetVersion() );
-
- // DocInfo laden
- BOOL bOK = aDocInfo().Load( xStor );
- pVar->PutBool( bOK );
- if ( bOK )
- aDocInfo.SetValue( aName );
- return;
- }
-
- // Methode Save?
- else if ( bCall && ( SID_DOCINFO_SAVE == nSID ) )
- {
- // existiert ein Medium?
- if ( !pMedium )
- {
- // ohne Medium kein Speichern
- pVar->PutBool( FALSE );
- return;
- }
-
- // ggf. Filter-Detection wegen FileFormat-Version
- const SfxFilter *pFilter = 0;
- SFX_APP()->GetFilterMatcher().GuessFilter( *pMedium, &pFilter );
-
- // Storage "offnen
- SvStorageRef xStor = pMedium->GetStorage();
- xStor->SetVersion( pFilter
- ? pFilter->GetVersion()
- : SOFFICE_FILEFORMAT_CURRENT );
- // DocInfo speichern
- BOOL bOK = aDocInfo().Save( xStor ) && xStor->Commit();
- pVar->PutBool( bOK );
- return;
- }
-
- // Property auslesen?
- else if ( bRead && ( SID_DOCINFO == nSID ) )
- {
- aDocInfo.FillVariable( *pVar, SFX_MAPUNIT_MM, SFX_MAPUNIT_MM );
- return;
- }
-
- // Property setzen?
- else if ( bWrite && SID_DOCINFO == nSID )
- {
- aDocInfo.SetVariable( *pVar, SFX_MAPUNIT_MM, SFX_MAPUNIT_MM );
- return;
- }
- }
-
- SvDispatch::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
-}
-
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sfx2/source/inc/dinfobj.hxx b/binfilter/bf_sfx2/source/inc/dinfobj.hxx
deleted file mode 100644
index d98e31c..0000000
--- a/binfilter/bf_sfx2/source/inc/dinfobj.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SFX_DINFOBJ_HXX
-#define _SFX_DINFOBJ_HXX
-
-
-#include <bf_so3/auto.hxx>
-#include "dinfdlg.hxx"
-namespace binfilter {
-
-class SfxMedium;
-
-//=========================================================================
-
-class SfxDocumentInfoObject_Impl: public SvDispatch
-{
- SfxDocumentInfoItem aDocInfo;
- SfxMedium* pMedium;
-
-protected:
- SvGlobalName GetTypeName() const;
- BOOL FillTypeLibInfo( String * pName,
- USHORT * pMajor, USHORT * pMinor ) const;
-
-public:
- SfxDocumentInfoObject_Impl();
- ~SfxDocumentInfoObject_Impl();
-
- virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
- const SfxHint& rHint, const TypeId& rHintType );
-};
-
-
-}//end of namespace binfilter
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list