diff options
-rw-r--r-- | sd/inc/drawdoc.hxx | 22 | ||||
-rw-r--r-- | sd/inc/glob.hrc | 47 | ||||
-rw-r--r-- | sd/inc/sdpage.hxx | 8 | ||||
-rw-r--r-- | sd/source/core/drawdoc.cxx | 9 | ||||
-rw-r--r-- | sd/source/core/drawdoc2.cxx | 6 | ||||
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 138 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 27 | ||||
-rw-r--r-- | sd/source/core/glob.src | 31 | ||||
-rw-r--r-- | sd/source/core/sdpage.cxx | 27 | ||||
-rw-r--r-- | sd/source/core/sdpage2.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 99 | ||||
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 6 |
13 files changed, 259 insertions, 180 deletions
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 4b574eae4682..3dd1f366b301 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: drawdoc.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: dl $ $Date: 2001-04-20 09:46:45 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,6 +86,9 @@ #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_ #include <com/sun/star/lang/Locale.hpp> #endif +#ifndef _SOT_STORAGE_HXX +#include <sot/storage.hxx> +#endif #ifdef SVX_LIGHT #define SdOutliner Outliner @@ -144,20 +147,20 @@ class SdDrawDocument; class SdDrawDocShell { private: - SvStream* pStream; + SotStorage* pStorage; Printer* pPrinter; SdDrawDocument* mpDoc; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel; public: - SdDrawDocShell( SvStream* pS ) : pPrinter(NULL), pStream( pS ) {} + SdDrawDocShell( SotStorage* pS ) : pPrinter(NULL), pStorage( pS ) {} ~SdDrawDocShell() { delete pPrinter; } virtual void SetPrinter( Printer* pPrntr ) { pPrinter = pPrntr; } virtual Printer* GetPrinter( BOOL bCreate ) { if( pPrinter == NULL && bCreate ) pPrinter = new Printer(); return pPrinter; } - virtual SvStream* GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const { return pStream; } + virtual SotStorage* GetStorage() const { return pStorage; } ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetModel(); @@ -226,6 +229,10 @@ private: DocumentType eDocType; UINT16 nFileFormatVersion; + SotStorage* pDocStor; + SotStorageRef xPictureStorage; + SotStorageStreamRef xDocStream; + void UpdatePageObjectsInNotes(USHORT nStartPos); DECL_LINK(NotifyUndoActionHdl, SfxUndoAction*); DECL_LINK(WorkStartupHdl, Timer*); @@ -281,7 +288,9 @@ public: void InsertPage(SdrPage* pPage, USHORT nPos=0xFFFF); void DeletePage(USHORT nPgNum); SdrPage* RemovePage(USHORT nPgNum); +#ifndef SVX_LIGHT void RemoveUnnessesaryMasterPages( SdPage* pMaster=NULL, BOOL bOnlyDuplicatePages=FALSE, BOOL bUndo=TRUE ); +#endif void SetMasterPage(USHORT nSdPageNum, const String& rLayoutName, SdDrawDocument* pSourceDoc, BOOL bMaster, BOOL bCheckMasters); @@ -382,7 +391,8 @@ public: virtual void SetChanged(FASTBOOL bFlag = TRUE); void NbcSetChanged(FASTBOOL bFlag = TRUE) { bChanged = bFlag; } - virtual SvStream* GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const; + virtual SvStream* GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo); + virtual void HandsOff(); void SetTextDefaults() const; diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc index 4da16590eef2..b3f648a96eea 100644 --- a/sd/inc/glob.hrc +++ b/sd/inc/glob.hrc @@ -2,9 +2,9 @@ * * $RCSfile: glob.hrc,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: aw $ $Date: 2000-10-31 15:01:16 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -131,25 +131,26 @@ #define STR_POOLSHEET_HEADLINE1 RID_APP_START+766 #define STR_POOLSHEET_HEADLINE2 RID_APP_START+767 #define STR_POOLSHEET_MEASURE RID_APP_START+768 -#define STR_PSEUDOSHEET_TITLE RID_APP_START+769 -#define STR_PSEUDOSHEET_OUTLINE RID_APP_START+770 -#define STR_PSEUDOSHEET_BACKGROUNDOBJECTS RID_APP_START+771 -#define STR_PSEUDOSHEET_BACKGROUND RID_APP_START+772 -#define STR_PSEUDOSHEET_NOTES RID_APP_START+773 -#define STR_GLUEPOINTSOBJECTBARSHELL RID_APP_START+774 -#define STR_EMPTY_STYLESHEET_NAME RID_APP_START+775 -#define STR_LAYER_MEASURELINES RID_APP_START+776 -#define STR_POOLSHEET_OBJWITHOUTFILL_NT RID_APP_START+777 -#define STR_POOLSHEET_TEXTBODY_NT RID_APP_START+778 -#define STR_POOLSHEET_TEXTBODY_JUSTIFY_NT RID_APP_START+779 -#define STR_POOLSHEET_TEXTBODY_INDENT_NT RID_APP_START+780 -#define STR_POOLSHEET_HEADLINE_NT RID_APP_START+781 -#define STR_POOLSHEET_HEADLINE1_NT RID_APP_START+782 -#define STR_POOLSHEET_HEADLINE2_NT RID_APP_START+783 -#define STR_POOLSHEET_MEASURE_NT RID_APP_START+784 +#define STR_POOLSHEET_ARROW RID_APP_START+769 +#define STR_POOLSHEET_OBJWITHOUTFILL_NT RID_APP_START+770 +#define STR_POOLSHEET_TEXTBODY_NT RID_APP_START+771 +#define STR_POOLSHEET_TEXTBODY_JUSTIFY_NT RID_APP_START+772 +#define STR_POOLSHEET_TEXTBODY_INDENT_NT RID_APP_START+773 +#define STR_POOLSHEET_HEADLINE_NT RID_APP_START+774 +#define STR_POOLSHEET_HEADLINE1_NT RID_APP_START+775 +#define STR_POOLSHEET_HEADLINE2_NT RID_APP_START+776 +#define STR_POOLSHEET_MEASURE_NT RID_APP_START+777 +#define STR_PSEUDOSHEET_TITLE RID_APP_START+780 +#define STR_PSEUDOSHEET_OUTLINE RID_APP_START+781 +#define STR_PSEUDOSHEET_BACKGROUNDOBJECTS RID_APP_START+782 +#define STR_PSEUDOSHEET_BACKGROUND RID_APP_START+783 +#define STR_PSEUDOSHEET_NOTES RID_APP_START+784 #define STR_PSEUDOSHEET_SUBTITLE RID_APP_START+785 -#define STR_LAYOUT_DEFAULT_TITLE_NAME RID_APP_START+786 -#define STR_GRAFOBJECTBARSHELL RID_APP_START+787 -#define STR_POWERPOINT_IMPORT RID_APP_START+788 -#define STR_STAROFFICE_XML_DRAW RID_APP_START+789 -#define STR_STAROFFICE_XML_IMPRESS RID_APP_START+790 +#define STR_GLUEPOINTSOBJECTBARSHELL RID_APP_START+790 +#define STR_EMPTY_STYLESHEET_NAME RID_APP_START+791 +#define STR_LAYER_MEASURELINES RID_APP_START+792 +#define STR_LAYOUT_DEFAULT_TITLE_NAME RID_APP_START+793 +#define STR_GRAFOBJECTBARSHELL RID_APP_START+794 +#define STR_POWERPOINT_IMPORT RID_APP_START+795 +#define STR_STAROFFICE_XML_DRAW RID_APP_START+796 +#define STR_STAROFFICE_XML_IMPRESS RID_APP_START+797 diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 66f7b55447d3..c8a22cbf01e0 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpage.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: cl $ $Date: 2001-03-19 09:47:07 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -177,10 +177,8 @@ public: virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND, const SdrInsertReason* pReason=NULL); -#ifndef SVX_LIGHT virtual SdrObject* NbcRemoveObject(ULONG nObjNum); virtual SdrObject* RemoveObject(ULONG nObjNum); -#endif virtual void SetLinkData(const String& rLinkName, const String& rLinkData); @@ -239,10 +237,10 @@ public: #ifndef SVX_LIGHT void ConnectLink(); void DisconnectLink(); -#endif void ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect, BOOL bScaleAllObj); +#endif const String& GetName(); String GetRealName() const { return aPageName; }; diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 307f4330b69f..201082a04eb1 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: drawdoc.cxx,v $ * - * $Revision: 1.31 $ + * $Revision: 1.32 $ * - * last change: $Author: sj $ $Date: 2001-04-24 13:06:10 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -265,6 +265,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) : #endif pDeletedPresObjList(NULL), nFileFormatVersion(SDIOCOMPAT_VERSIONDONTKNOW), + pDocStor(NULL), pCustomShowList(NULL), eLanguage( LANGUAGE_SYSTEM ), eLanguageCJK( LANGUAGE_SYSTEM ), @@ -1270,7 +1271,6 @@ void __EXPORT SdDrawDocument::SetChanged(FASTBOOL bFlag) void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) { -#ifndef SVX_LIGHT if (eMode == NEW_DOC) { // Neues Dokument: @@ -1281,9 +1281,8 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) ((SdStyleSheetPool*)pStyleSheetPool)->CreatePseudosIfNecessary(); } else if (eMode == DOC_LOADED) -#endif // !SVX_LIGHT { - // Dokument wurde geladen: + // Dokument wurde geladen: #ifndef SVX_LIGHT if ( GetMasterSdPageCount(PK_STANDARD) > 1 ) diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 1a093a2258c8..fd3d34ef780d 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: drawdoc2.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: dl $ $Date: 2001-02-12 16:02:32 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1122,6 +1122,7 @@ IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, pTimer ) #ifndef SVX_LIGHT if( pDocSh ) pDocSh->SetWaitCursor( TRUE ); +#endif BOOL bChanged = IsChanged(); // merken @@ -1152,6 +1153,7 @@ IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, pTimer ) SetChanged(bChanged || FALSE); +#ifndef SVX_LIGHT if( pDocSh ) pDocSh->SetWaitCursor( FALSE ); #endif diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 42c3dd03efa9..8e21657a220a 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -2,9 +2,9 @@ * * $RCSfile: drawdoc3.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: ka $ $Date: 2001-03-08 11:18:30 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,6 +74,10 @@ #endif #endif // !SVX_LIGHT +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif + #include <svtools/style.hxx> #include <svx/linkmgr.hxx> #ifndef _SVDPAGV_HXX //autogen @@ -88,8 +92,8 @@ #ifndef _SV_MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif -#ifndef _SVSTOR_HXX //autogen -#include <so3/svstor.hxx> +#ifndef _SOT_STORAGE_HXX +#include <sot/storage.hxx> #endif #ifndef _SOT_FORMATS_HXX //autogen #include <sot/formats.hxx> @@ -140,6 +144,9 @@ #endif #endif // !SVX_LIGHT +#ifdef SVX_LIGHT +#include "glob.hxx" +#endif #define POOL_BUFFER_SIZE (USHORT)32768 @@ -1253,16 +1260,108 @@ List* SdDrawDocument::GetCustomShowList(BOOL bCreate) |* \************************************************************************/ -SvStream* SdDrawDocument::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const +SvStream* SdDrawDocument::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) { - SvStream* pStream = NULL; +#ifdef SVX_LIGHT + SotStorage* pStor = pDocSh ? pDocSh->GetStorage() : NULL; +#else + SotStorage* pStor = pDocSh ? pDocSh->GetMedium()->GetStorage() : NULL; +#endif + SvStream* pRet = NULL; - if (pDocSh) + if( pStor ) { - pStream = ((SdDrawDocShell*) pDocSh)->GetDocumentStream(rStreamInfo); + if( rStreamInfo.maUserData.Len() && + ( rStreamInfo.maUserData.GetToken( 0, ':' ) == + String( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package" ) ) ) ) + { + const String aPicturePath( rStreamInfo.maUserData.GetToken( 1, ':' ) ); + + // graphic from picture stream in picture storage in XML package + if( aPicturePath.GetTokenCount( '/' ) == 2 ) + { + const String aPictureStreamName( aPicturePath.GetToken( 1, '/' ) ); + + if( !xPictureStorage.Is() ) + { + const String aPictureStorageName( aPicturePath.GetToken( 0, '/' ) ); + + if( pStor->IsContained( aPictureStorageName ) && + pStor->IsStorage( aPictureStorageName ) ) + { + xPictureStorage = pStor->OpenUCBStorage( aPictureStorageName, STREAM_READ ); + } + } + + if( xPictureStorage.Is() && + xPictureStorage->IsContained( aPictureStreamName ) && + xPictureStorage->IsStream( aPictureStreamName ) ) + { + pRet = xPictureStorage->OpenSotStream( aPictureStreamName, STREAM_READ ); + + if( pRet ) + { + pRet->SetVersion( xPictureStorage->GetVersion() ); + pRet->SetKey( xPictureStorage->GetKey() ); + } + } + } + + rStreamInfo.mbDeleteAfterUse = ( pRet != NULL ); + } + else + { + // graphic from plain binary document stream + if( !pDocStor ) + { + if( pStor->IsStream( pStarDrawDoc ) ) + { + BOOL bOK = pStor->Rename(pStarDrawDoc, pStarDrawDoc3); + DBG_ASSERT(bOK, "Umbenennung des Streams gescheitert"); + } + + xDocStream = pStor->OpenSotStream( pStarDrawDoc3, STREAM_READ ); + xDocStream->SetVersion( pStor->GetVersion() ); + xDocStream->SetKey( pStor->GetKey() ); + pDocStor = pStor; + } + + pRet = xDocStream; + rStreamInfo.mbDeleteAfterUse = FALSE; + } } - return pStream; +#ifdef DEBUG + if( pRet ) + { + // try to get some information from stream + const ULONG nStartPos = pRet->Tell(); + const ULONG nEndPos = pRet->Seek( STREAM_SEEK_TO_END ); + const ULONG nStmLen = nEndPos - nStartPos; + sal_uChar aTestByte; + + // try to read one byte + if( nStmLen ) + *pRet >> aTestByte; + + pRet->Seek( nStartPos ); + } +#endif + + return pRet; +} + + +/************************************************************************* +|* +|* Release doc stream, if no longer valid +|* +\************************************************************************/ + +void SdDrawDocument::HandsOff() +{ + xPictureStorage = SotStorageRef(); + pDocStor = NULL; } @@ -1428,18 +1527,19 @@ void SdDrawDocument::RemoveUnnessesaryMasterPages(SdPage* pMasterPage, BOOL bOnl |* Ist rLayoutName leer, so wird die erste MasterPage genommen \************************************************************************/ -#ifndef SVX_LIGHT void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, const String& rLayoutName, SdDrawDocument* pSourceDoc, BOOL bMaster, BOOL bCheckMasters) { +#ifndef SVX_LIGHT if( pDocSh ) pDocSh->SetWaitCursor( TRUE ); SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager(); pUndoMgr->EnterListAction(String(SdResId(STR_UNDO_SET_PRESLAYOUT)), String()); +#endif SdPage* pSelectedPage = GetSdPage(nSdPageNum, PK_STANDARD); SdPage* pNotes = (SdPage*) GetPage(pSelectedPage->GetPageNum()+1); @@ -1535,11 +1635,14 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, BOOL bTest = pMySheet->SetName(pHisSheet->GetName()); DBG_ASSERT(bTest, "StyleSheet-Umbenennung fehlgeschlagen"); pMySheet->GetItemSet().ClearItem(0); // alle loeschen + +#ifndef SVX_LIGHT StyleSheetUndoAction* pUndoChStyle = new StyleSheetUndoAction(this, pMySheet, &pHisSheet->GetItemSet()); pUndoMgr->AddUndoAction(pUndoChStyle); pMySheet->GetItemSet().Put(pHisSheet->GetItemSet()); pMySheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); +#endif } else { @@ -1610,11 +1713,13 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, if (pCreatedStyles->Count() > 0) { +#ifndef SVX_LIGHT // UndoAction fuer das Erzeugen und Einfuegen vorn StyleSheets // auf den UndoManager legen SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction( this, pCreatedStyles, TRUE); pUndoMgr->AddUndoAction(pMovStyles); +#endif } else { @@ -1694,11 +1799,13 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, { AutoLayout eAutoLayout = pPage->GetAutoLayout(); + #ifndef SVX_LIGHT SdPresentationLayoutUndoAction * pPLUndoAction = new SdPresentationLayoutUndoAction (this, aOldLayoutName, aLayoutName, eAutoLayout, eAutoLayout, FALSE, pPage); pUndoMgr->AddUndoAction(pPLUndoAction); + #endif pPage->SetPresentationLayout(aLayoutName); pPage->SetAutoLayout(eAutoLayout, TRUE); @@ -1717,7 +1824,9 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, pOldMaster->GetUppBorder(), pOldMaster->GetRgtBorder(), pOldMaster->GetLwrBorder()); +#ifndef SVX_LIGHT pMaster->ScaleObjects(aSize, aBorderRect, TRUE); +#endif pMaster->SetSize(aSize); pMaster->SetBorder(pOldMaster->GetLftBorder(), pOldMaster->GetUppBorder(), @@ -1731,7 +1840,9 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, pOldNotesMaster->GetUppBorder(), pOldNotesMaster->GetRgtBorder(), pOldNotesMaster->GetLwrBorder()); +#ifndef SVX_LIGHT pNotesMaster->ScaleObjects(aSize, aNotesBorderRect, TRUE); +#endif pNotesMaster->SetSize(aSize); pNotesMaster->SetBorder(pOldNotesMaster->GetLftBorder(), pOldNotesMaster->GetUppBorder(), @@ -1790,9 +1901,11 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, \********************************************************************/ ((SdStyleSheetPool*) pStyleSheetPool)->CreateLayoutStyleSheets(aName); List* pCreatedStyles = ((SdStyleSheetPool*) pStyleSheetPool)->CreateLayoutSheetList(aName); +#ifndef SVX_LIGHT SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, pCreatedStyles, TRUE); pUndoMgr->AddUndoAction(pMovStyles); +#endif /********************************************************************* |* Neue MasterPages erzeugen und ins Dokument eintragen @@ -1856,12 +1969,14 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, AutoLayout eNewAutoLayout = pPage->GetPageKind() == PK_STANDARD ? AUTOLAYOUT_NONE : AUTOLAYOUT_NOTES; +#ifndef SVX_LIGHT SdPresentationLayoutUndoAction * pPLUndoAction = new SdPresentationLayoutUndoAction (this, aOldLayoutName, aName, eOldAutoLayout, eNewAutoLayout, TRUE, pPage); pUndoMgr->AddUndoAction(pPLUndoAction); +#endif pPage->SetPresentationLayout(aName); pPage->SetAutoLayout(eNewAutoLayout, TRUE); @@ -1873,6 +1988,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, delete pPageList; } +#ifndef SVX_LIGHT /********************************************************************* |* falls die alten Masterpages nicht mehr benoetigt werden, |* muessen sie und die entsprechenden Praesentationsvorlagen @@ -1893,8 +2009,8 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, if( pDocSh ) pDocSh->SetWaitCursor( FALSE ); -} #endif // !SVX_LIGHT +} diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 0b25213a4788..bd781f712c9e 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -2,9 +2,9 @@ * * $RCSfile: drawdoc4.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: dl $ $Date: 2001-03-21 16:24:40 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -249,7 +249,6 @@ using namespace ::com::sun::star::linguistic2; |* \************************************************************************/ -#ifndef SVX_LIGHT void SdDrawDocument::CreateLayoutTemplates() { SdStyleSheetPool* pStyleSheetPool = (SdStyleSheetPool*)GetStyleSheetPool(); @@ -273,8 +272,6 @@ void SdDrawDocument::CreateLayoutTemplates() String aNullStr; - Bitmap aNullBmp(SdResId(BMP_PRESOBJ_OBJECT)); // irgendeine - XPolygon aNullPol; Color aNullCol(RGB_Color(COL_BLACK)); @@ -302,7 +299,13 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put(XFillGradientItem(pPool,aNullGrad)); rISet.Put(XFillHatchItem(pPool,aNullHatch)); +#ifndef SVX_LIGHT + Bitmap aNullBmp(SdResId(BMP_PRESOBJ_OBJECT)); // irgendeine rISet.Put(XFillBitmapItem(pPool,aNullBmp)); +#else + // leave it empty to avoid resource usage + rISet.Put(XFillBitmapItem()); +#endif // Schattenattribute (Drawing Engine) rISet.Put(SdrShadowItem(FALSE)); @@ -382,7 +385,11 @@ void SdDrawDocument::CreateLayoutTemplates() aArrow[1]=Point(200,400); // \ / aArrow[2]=Point(0,400); // \ / aArrow[3]=Point(100,0); // \/1,0 +#ifdef SVX_LIGHT + pISet->Put(XLineStartItem(SdResId(STR_POOLSHEET_ARROW),aArrow)); +#else pISet->Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW),aArrow)); +#endif pISet->Put(XLineStartWidthItem(700)); pISet->Put(XLineEndWidthItem(300)); // wollte Kohse das wirklich? @@ -600,9 +607,18 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(SvxFontHeightItem(423)); // 12 pt +#ifdef SVX_LIGHT + // avoid SVX resources + pISet->Put(XLineStartItem(SdResId(STR_POOLSHEET_ARROW),aArrow)); +#else pISet->Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW),aArrow)); +#endif pISet->Put(XLineStartWidthItem(200)); +#ifdef SVX_LIGHT + pISet->Put(XLineEndItem(SdResId(STR_POOLSHEET_ARROW),aArrow)); +#else pISet->Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW),aArrow)); +#endif pISet->Put(XLineEndWidthItem(200)); pISet->Put(XLineStyleItem(XLINE_SOLID)); @@ -624,7 +640,6 @@ void SdDrawDocument::CreateLayoutTemplates() String aPrefix = String(SdResId(STR_LAYOUT_DEFAULT_NAME)); pStyleSheetPool->CreateLayoutStyleSheets(aPrefix); } -#endif // !SVX_LIGHT /************************************************************************* diff --git a/sd/source/core/glob.src b/sd/source/core/glob.src index 4e6106c0213f..888c22124224 100644 --- a/sd/source/core/glob.src +++ b/sd/source/core/glob.src @@ -2,9 +2,9 @@ * * $RCSfile: glob.src,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: kz $ $Date: 2001-04-11 18:28:48 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1971,3 +1971,30 @@ String STR_PRESOBJ_IMAGE Text[ language_user1 ] = " "; }; #endif + +String STR_POOLSHEET_ARROW +{ + Text = "Pfeil" ; + Text [ ENGLISH ] = "Arrow" ; + Text [ norwegian ] = "Arrow" ; + Text [ italian ] = "Freccia" ; + Text [ portuguese_brazilian ] = "Arrow" ; + Text [ portuguese ] = "Seta" ; + Text [ french ] = "Flche" ; + Text [ dutch ] = "Pijl" ; + Text [ spanish ] = "Flecha" ; + Text [ danish ] = "Pil" ; + Text [ swedish ] = "Pil" ; + Text [ finnish ] = "Arrow" ; + Text [ english_us ] = "Arrow" ; + Text[ chinese_simplified ] = "ͷ"; + Text[ russian ] = ""; + Text[ polish ] = "Strzaka"; + Text[ japanese ] = ""; + Text[ chinese_traditional ] = "bY"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "ȭǥ"; + Text[ turkish ] = "Ok"; + Text[ language_user1 ] = " "; +}; diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 297bdfa0c2f7..6299f12b9f9b 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpage.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: cl $ $Date: 2001-03-19 09:48:30 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -753,7 +753,6 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang |* \************************************************************************/ -#ifndef SVX_LIGHT void SdPage::CreateTitleAndLayout(BOOL bInit) { SdPage* pMasterPage = this; @@ -999,7 +998,7 @@ void SdPage::CreateTitleAndLayout(BOOL bInit) } } } -#endif // !SVX_LIGHT + /************************************************************************* |* @@ -1117,7 +1116,6 @@ Rectangle SdPage::GetLayoutRect() const void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit) { eAutoLayout = eLayout; -#ifndef SVX_LIGHT bOwnArrangement = TRUE; CreateTitleAndLayout(bInit); @@ -1841,7 +1839,6 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit) aPresObjList = aObjList; bOwnArrangement = FALSE; -#endif // !SVX_LIGHT } /************************************************************************* @@ -1878,9 +1875,9 @@ void SdPage::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* |* \************************************************************************/ -#ifndef SVX_LIGHT SdrObject* SdPage::RemoveObject(ULONG nObjNum) { +#ifndef SVX_LIGHT SdrObject* pObj = FmFormPage::RemoveObject(nObjNum); if (pObj && pObj->GetUserCall()!=this && @@ -1892,10 +1889,12 @@ SdrObject* SdPage::RemoveObject(ULONG nObjNum) } ((SdDrawDocument*) pModel)->RemoveObject(pObj, this); +#else + SdrObject* pObj = SdrPage::RemoveObject(nObjNum); +#endif // !SVX_LIGHT return(pObj); } -#endif // !SVX_LIGHT /************************************************************************* @@ -1904,9 +1903,9 @@ SdrObject* SdPage::RemoveObject(ULONG nObjNum) |* \************************************************************************/ -#ifndef SVX_LIGHT SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum) { +#ifndef SVX_LIGHT SdrObject* pObj = FmFormPage::NbcRemoveObject(nObjNum); if (pObj && pObj->GetUserCall()!=this && @@ -1918,10 +1917,12 @@ SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum) } ((SdDrawDocument*) pModel)->RemoveObject(pObj, this); +#else + SdrObject* pObj = SdrPage::NbcRemoveObject(nObjNum); +#endif // !SVX_LIGHT return(pObj); } -#endif // !SVX_LIGHT /************************************************************************* @@ -2398,7 +2399,6 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR |* \************************************************************************/ -#ifndef SVX_LIGHT BOOL SdPage::InsertPresObj(SdrObject* pObj, PresObjKind eObjKind, BOOL bVertical, Rectangle aRect, BOOL bInit, List& rObjList) { @@ -2520,7 +2520,9 @@ BOOL SdPage::InsertPresObj(SdrObject* pObj, PresObjKind eObjKind, BOOL bVertical aPresObjList.Remove(pSubtitle); RemoveObject( pObj->GetOrdNum() ); ReplaceObject( pObj, pSubtitle->GetOrdNum() ); +#ifndef SVX_LIGHT ( (SdDrawDocument*) pModel)->RemoveObject( pSubtitle, this ); +#endif delete pSubtitle; } } @@ -2571,7 +2573,9 @@ BOOL SdPage::InsertPresObj(SdrObject* pObj, PresObjKind eObjKind, BOOL bVertical aPresObjList.Remove(pOutlineObj); RemoveObject( pObj->GetOrdNum() ); ReplaceObject( pObj, pOutlineObj->GetOrdNum() ); +#ifndef SVX_LIGHT ( (SdDrawDocument*) pModel)->RemoveObject( pOutlineObj, this ); +#endif delete pOutlineObj; } } @@ -2580,7 +2584,6 @@ BOOL SdPage::InsertPresObj(SdrObject* pObj, PresObjKind eObjKind, BOOL bVertical return(bIncrement); } -#endif // !SVX_LIGHT /************************************************************************* diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 396295336465..4fe34a986df0 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpage2.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: cl $ $Date: 2001-03-19 09:48:30 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -135,7 +135,6 @@ using namespace ::com::sun::star; |* \************************************************************************/ -#ifndef SVX_LIGHT void SdPage::SetPresentationLayout(const String& rLayoutName, BOOL bReplaceStyleSheets, BOOL bSetMasterPage, @@ -309,7 +308,7 @@ void SdPage::SetPresentationLayout(const String& rLayoutName, delete (StyleReplaceData*) aReplList.GetObject(i); } } -#endif // !SVX_LIGHT + /************************************************************************* |* diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 62438e8864a9..c573a3e044a9 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docshel4.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.23 $ * - * last change: $Author: dl $ $Date: 2001-04-20 09:45:44 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -701,8 +701,12 @@ BOOL SdDrawDocShell::SaveCompleted( SvStorage * pStor ) void SdDrawDocShell::HandsOff() { SfxInPlaceObject::HandsOff(); - xPictureStorage = SvStorageRef(); - pDocStor = NULL; + +#ifndef SVX_LIGHT + // forward to document + if( pDoc ) + pDoc->HandsOff(); +#endif } /************************************************************************* diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 54f87e29e2d0..35815b23f50d 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docshell.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: ka $ $Date: 2001-03-28 11:55:47 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -220,7 +220,6 @@ SdDrawDocShell::SdDrawDocShell(SfxObjectCreateMode eMode, // pStbMgr( NULL ), bSdDataObj(bDataObject), bOwnPrinter(FALSE), - pDocStor(NULL), eDocType(eDocumentType) { // pDoc = new SdDrawDocument(eDocType, this); @@ -248,7 +247,6 @@ SdDrawDocShell::SdDrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, // pStbMgr( NULL ), bSdDataObj(bDataObject), bOwnPrinter(FALSE), - pDocStor(NULL), eDocType(eDocumentType) { Construct(); @@ -503,99 +501,6 @@ void SdDrawDocShell::ApplySlotFilter() const } -/************************************************************************* -|* -|* Document-Stream herausgeben (fuer load-on-demand Graphiken) -|* -\************************************************************************/ - -SvStream* SdDrawDocShell::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) -{ - SvStorage* pStor = GetMedium()->GetStorage(); - SvStream* pRet = NULL; - - if( pStor ) - { - if( rStreamInfo.maUserData.Len() && - ( rStreamInfo.maUserData.GetToken( 0, ':' ) == - String( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package" ) ) ) ) - { - const String aPicturePath( rStreamInfo.maUserData.GetToken( 1, ':' ) ); - - // graphic from picture stream in picture storage in XML package - if( aPicturePath.GetTokenCount( '/' ) == 2 ) - { - const String aPictureStreamName( aPicturePath.GetToken( 1, '/' ) ); - - if( !xPictureStorage.Is() ) - { - const String aPictureStorageName( aPicturePath.GetToken( 0, '/' ) ); - - if( pStor->IsContained( aPictureStorageName ) && - pStor->IsStorage( aPictureStorageName ) ) - { - xPictureStorage = pStor->OpenUCBStorage( aPictureStorageName, STREAM_READ ); - } - } - - if( xPictureStorage.Is() && - xPictureStorage->IsContained( aPictureStreamName ) && - xPictureStorage->IsStream( aPictureStreamName ) ) - { - pRet = xPictureStorage->OpenStream( aPictureStreamName, STREAM_READ ); - - if( pRet ) - { - pRet->SetVersion( xPictureStorage->GetVersion() ); - pRet->SetKey( xPictureStorage->GetKey() ); - } - } - } - - rStreamInfo.mbDeleteAfterUse = ( pRet != NULL ); - } - else - { - // graphic from plain binary document stream - if( !pDocStor ) - { - if( pStor->IsStream( pStarDrawDoc ) ) - { - BOOL bOK = pStor->Rename(pStarDrawDoc, pStarDrawDoc3); - DBG_ASSERT(bOK, "Umbenennung des Streams gescheitert"); - } - - xDocStream = pStor->OpenStream( pStarDrawDoc3, STREAM_READ ); - xDocStream->SetVersion( pStor->GetVersion() ); - xDocStream->SetKey( pStor->GetKey() ); - pDocStor = pStor; - } - - pRet = xDocStream; - rStreamInfo.mbDeleteAfterUse = FALSE; - } - } - -#ifdef DEBUG - if( pRet ) - { - // try to get some information from stream - const ULONG nStartPos = pRet->Tell(); - const ULONG nEndPos = pRet->Seek( STREAM_SEEK_TO_END ); - const ULONG nStmLen = nEndPos - nStartPos; - sal_uChar aTestByte; - - // try to read one byte - if( nStmLen ) - *pRet >> aTestByte; - - pRet->Seek( nStartPos ); - } -#endif - - return pRet; -} - void SdDrawDocShell::SetModified( BOOL bSet /* = TRUE */ ) { SfxInPlaceObject::SetModified( bSet ); diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index d8aa5d6cfaef..2b64aeaa0dd9 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -2,9 +2,9 @@ * * $RCSfile: UnoDocumentSettings.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: cl $ $Date: 2001-04-26 12:32:32 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:11:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,7 +59,7 @@ * ************************************************************************/ -#include <vector> +#include <stl/vector> #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> |