[ooo-build-commit] .: 2 commits - patches/dev300

René Engelhard rene at kemper.freedesktop.org
Sat Aug 7 08:40:33 PDT 2010


 patches/dev300/apply                                     |   15 
 patches/dev300/cws-koheicopyborder-sc-m2.diff            |  578 
 patches/dev300/cws-koheicopyborder-sc.diff               |    4 
 patches/dev300/pptx-snapshot-at-ooxml03-creation-m2.diff |10324 +++++++++++++++
 patches/dev300/pptx-snapshot-at-ooxml03-creation.diff    |    4 
 5 files changed, 10918 insertions(+), 7 deletions(-)

New commits:
commit c2258e4e813c2c743067d3847da6c527bc553310
Author: Rene Engelhard <rene at debian.org>
Date:   Sat Aug 7 11:39:17 2010 -0400

    update some patches for ooo330-m3
    
    * patches/dev300/apply:
    * patches/dev300/cws-koheicopyborder-sc-m2.diff:
    * patches/dev300/cws-koheicopyborder-sc.diff:
    * patches/dev300/pptx-snapshot-at-ooxml03-creation-m2.diff:
    * patches/dev300/pptx-snapshot-at-ooxml03-creation.diff:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 80f4708..b036a29 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -184,10 +184,16 @@ cws-koheichart02-chart2.diff, kohei
 cws-koheichart02-sc.diff,     kohei
 cws-koheichart02-xmloff.diff, kohei
 
+[ CWSBackports < ooo330-m3 ]
+# koheicopyborder cws (paste on enter, and animated border for copied ranges).
+cws-koheicopyborder-sc-m2.diff,  kohei
+cws-koheicopyborder-svx.diff, kohei
+[ CWSBackports >= ooo330-m3 ]
 # koheicopyborder cws (paste on enter, and animated border for copied ranges).
 cws-koheicopyborder-sc.diff,  kohei
 cws-koheicopyborder-svx.diff, kohei
 
+[ CWSBackports ]
 # vmiklos01 cws (gsoc, rewrite rtf filter)
 cws-vmiklos01.diff, vmiklos
 
@@ -2935,13 +2941,15 @@ pptx-filter-as-a-separate-lib-sd-build-lst-without-transogl.diff
 [ OOXMLExport and OpenGLTransitions ]
 pptx-filter-as-a-separate-lib-sd-build-lst-with-transogl.diff
 
-[ OOXMLExport ]
 # Snapshot of the pptx export filter at the time of creation of ooxml03
 # This is until 0475--fix-crash-introduced-by-Jonathan-s-changes-in-eppt.patch
 # (including)
-
+[ OOXMLExport < ooo330-m3 ]
+pptx-snapshot-at-ooxml03-creation-m2.diff
+[ OOXMLExport >= ooo330-m3 ]
 pptx-snapshot-at-ooxml03-creation.diff
 
+[ OOXMLExport ]
 # ...and the rest from the git tree
 # (until 'more qnimations export work', including)
 
@@ -3136,6 +3144,7 @@ emf+-driver-string.diff, n#519715, rodo
 # FIXME dev300-m77 sd-print-fix-pageoffset.diff, n#537931, rodo # the code has moved to sd/source/ui/view/DocumentRenderer.cxx
 svx-ppt-import-fix-bullet-size.diff, n#515972, rodo
 
+[ Fixes < ooo330-m3 ]
 # correctly import connector style attribute.
 svx-msdff-import-connector-style-fix.diff, n#559393, i#108086, kohei
 
diff --git a/patches/dev300/cws-koheicopyborder-sc-m2.diff b/patches/dev300/cws-koheicopyborder-sc-m2.diff
new file mode 100644
index 0000000..f5edb3f
--- /dev/null
+++ b/patches/dev300/cws-koheicopyborder-sc-m2.diff
@@ -0,0 +1,578 @@
+---
+ sc/source/ui/app/inputhdl.cxx       |    5 ++
+ sc/source/ui/inc/gridwin.hxx        |    3 +
+ sc/source/ui/inc/overlayobject.hxx  |   58 ++++++++++++++++++
+ sc/source/ui/inc/tabview.hxx        |    1 +
+ sc/source/ui/inc/viewdata.hxx       |   12 ++++
+ sc/source/ui/view/cellsh1.cxx       |    9 +++-
+ sc/source/ui/view/gridwin.cxx       |  114 ++++++++++++++++++++++++++++++++++-
+ sc/source/ui/view/makefile.mk       |    2 +
+ sc/source/ui/view/overlayobject.cxx |  104 +++++++++++++++++++++++++++++++
+ sc/source/ui/view/tabview2.cxx      |    7 ++
+ sc/source/ui/view/tabview3.cxx      |    1 +
+ sc/source/ui/view/viewdata.cxx      |    1 +
+ sc/source/ui/view/viewfunc.cxx      |    4 +
+ 13 files changed, 319 insertions(+), 2 deletions(-)
+ create mode 100644 sc/source/ui/inc/overlayobject.hxx
+ create mode 100644 sc/source/ui/view/overlayobject.cxx
+
+diff --git sc/source/ui/app/inputhdl.cxx sc/source/ui/app/inputhdl.cxx
+index 685ea39..c8a85e4 100644
+--- sc/source/ui/app/inputhdl.cxx
++++ sc/source/ui/app/inputhdl.cxx
+@@ -2084,6 +2084,7 @@ IMPL_LINK( ScInputHandler, ModifyHdl, void *, EMPTYARG )
+ 
+ BOOL ScInputHandler::DataChanging( sal_Unicode cTyped, BOOL bFromCommand )		// return TRUE = new view created
+ {
++    pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
+     bInOwnChange = TRUE;				// disable ModifyHdl (reset in DataChanged)
+ 
+     if ( eMode == SC_INPUT_NONE )
+@@ -2304,6 +2305,10 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
+         return;
+     }
+ 
++    if (eNewMode != SC_INPUT_NONE)
++        // Disable paste mode when edit mode starts.
++        pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
++
+     bInOwnChange = TRUE;				// disable ModifyHdl (reset below)
+ 
+     ScInputMode eOldMode = eMode;
+diff --git sc/source/ui/inc/gridwin.hxx sc/source/ui/inc/gridwin.hxx
+index 368db6b..64e21cf 100644
+--- sc/source/ui/inc/gridwin.hxx
++++ sc/source/ui/inc/gridwin.hxx
+@@ -108,6 +108,7 @@ private:
+     // #114409#
+     ::sdr::overlay::OverlayObjectList*				mpOOCursors;
+     ::sdr::overlay::OverlayObjectList*              mpOOSelection;
++    ::sdr::overlay::OverlayObjectList*              mpOOSelectionBorder;
+     ::sdr::overlay::OverlayObjectList*              mpOOAutoFill;
+     ::sdr::overlay::OverlayObjectList*              mpOODragRect;
+     ::sdr::overlay::OverlayObjectList*              mpOOHeader;
+@@ -399,6 +400,8 @@ public:
+     void CursorChanged();
+     void DrawLayerCreated();
+ 
++    void            DeleteCopySourceOverlay();
++    void            UpdateCopySourceOverlay();
+     void            DeleteCursorOverlay();
+     void            UpdateCursorOverlay();
+     void            DeleteSelectionOverlay();
+diff --git sc/source/ui/inc/overlayobject.hxx sc/source/ui/inc/overlayobject.hxx
+new file mode 100644
+index 0000000..3d10407
+--- /dev/null
++++ sc/source/ui/inc/overlayobject.hxx
+@@ -0,0 +1,58 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: gridwin.hxx,v $
++ * $Revision: 1.30 $
++ *
++ * 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 __SC_OVERLAYOBJECT_HXX__
++#define __SC_OVERLAYOBJECT_HXX__
++
++#include "svx/sdr/overlay/overlayobject.hxx"
++
++class OutputDevice;
++class Window;
++
++class ScOverlayDashedBorder : public ::sdr::overlay::OverlayObject
++{
++public:
++    ScOverlayDashedBorder(const ::basegfx::B2DRange& rRange, const Color& rColor, Window* pWin);
++    virtual ~ScOverlayDashedBorder();
++
++    virtual void Trigger(sal_uInt32 nTime);
++
++    virtual void stripeDefinitionHasChanged();
++
++protected:
++    virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
++
++private:
++    ::basegfx::B2DRange maRange;
++    Window* mpParent;
++    bool mbToggle;
++};
++
++#endif
+diff --git sc/source/ui/inc/tabview.hxx sc/source/ui/inc/tabview.hxx
+index d97a600..ccf940b 100644
+--- sc/source/ui/inc/tabview.hxx
++++ sc/source/ui/inc/tabview.hxx
+@@ -437,6 +437,7 @@ public:
+ 
+     void			CreateAnchorHandles(SdrHdlList& rHdl, const ScAddress& rAddress);
+ 
++    void            UpdateCopySourceOverlay();
+     void            UpdateSelectionOverlay();
+     void            UpdateShrinkOverlay();
+     void            UpdateAllOverlays();
+diff --git sc/source/ui/inc/viewdata.hxx sc/source/ui/inc/viewdata.hxx
+index e353681..2c86a47 100644
+--- sc/source/ui/inc/viewdata.hxx
++++ sc/source/ui/inc/viewdata.hxx
+@@ -86,6 +86,13 @@ enum ScMarkType
+ #endif
+ };
+ 
++enum ScPasteFlags
++{
++    SC_PASTE_NONE   = 0,    // No flags specified
++    SC_PASTE_MODE   = 1,    // Enable paste-mode
++    SC_PASTE_BORDER = 2,    // Show a border around the source cells
++};
++
+ class ScDocShell;
+ class ScDocument;
+ class ScDBFunc;
+@@ -207,6 +214,8 @@ private:
+     SCCOL				nTabStartCol;				// fuer Enter nach Tab
+     ScRange				aDelRange;					// fuer AutoFill-Loeschen
+ 
++    ScPasteFlags        nPasteFlags;
++
+     ScSplitPos          eEditActivePart;            // the part that was active when edit mode was started
+     BOOL				bEditActive[4];				// aktiv?
+     BOOL				bActive;					// aktives Fenster ?
+@@ -293,6 +302,8 @@ public:
+     SCCOL			GetFixPosX() const						{ return pThisTab->nFixPosX; }
+     SCROW			GetFixPosY() const						{ return pThisTab->nFixPosY; }
+     BOOL			IsPagebreakMode() const					{ return bPagebreak; }
++    bool            IsPasteMode() const                     { return nPasteFlags & SC_PASTE_MODE; }
++    bool            ShowPasteSource() const                 { return nPasteFlags & SC_PASTE_BORDER; }
+ 
+     void			SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX );
+     void			SetPosY( ScVSplitPos eWhich, SCROW nNewPosY );
+@@ -307,6 +318,7 @@ public:
+     void			SetFixPosX( SCCOL nPos )						{ pThisTab->nFixPosX = nPos; }
+     void			SetFixPosY( SCROW nPos )						{ pThisTab->nFixPosY = nPos; }
+     void			SetPagebreakMode( BOOL bSet );
++    void            SetPasteMode ( ScPasteFlags nFlags )            { nPasteFlags = nFlags; }
+ 
+     void            SetZoomType( SvxZoomType eNew, BOOL bAll );
+     void            SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs );
+diff --git sc/source/ui/view/cellsh1.cxx sc/source/ui/view/cellsh1.cxx
+index 47951fc..d5841fa 100644
+--- sc/source/ui/view/cellsh1.cxx
++++ sc/source/ui/view/cellsh1.cxx
+@@ -1162,11 +1162,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
+         //	Clipboard
+         //
+ 
++
+         case SID_COPY:				// fuer Grafiken in DrawShell
+             {
+-                WaitObject aWait( GetViewData()->GetDialogParent() );
++                ScViewData* pViewData = GetViewData();
++                WaitObject aWait( pViewData->GetDialogParent() );
+                 pTabViewShell->CopyToClip( NULL, FALSE, FALSE, TRUE );
+                 rReq.Done();
++                pViewData->SetPasteMode( (ScPasteFlags) (SC_PASTE_MODE | SC_PASTE_BORDER) );
++                pTabViewShell->ShowCursor();
++                pTabViewShell->UpdateCopySourceOverlay();
+             }
+             break;
+ 
+@@ -1175,6 +1180,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
+                 WaitObject aWait( GetViewData()->GetDialogParent() );
+                 pTabViewShell->CutToClip( NULL, TRUE );
+                 rReq.Done();
++                GetViewData()->SetPasteMode( SC_PASTE_MODE );
++                pTabViewShell->UpdateCopySourceOverlay();
+             }
+             break;
+ 
+diff --git sc/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
+index c0b9dd0..41cbc01 100644
+--- sc/source/ui/view/gridwin.cxx
++++ sc/source/ui/view/gridwin.cxx
+@@ -119,6 +119,9 @@
+ #include "tabprotection.hxx"
+ #include "postit.hxx"
+ #include "dpcontrol.hxx"
++#include "clipparam.hxx"
++#include "cellsh.hxx"
++#include "overlayobject.hxx"
+ 
+ #include "drawview.hxx"
+ #include <svx/sdrpagewindow.hxx>
+@@ -374,6 +377,7 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
+             DragSourceHelper( this ),
+             mpOOCursors( NULL ),
+             mpOOSelection( NULL ),
++            mpOOSelectionBorder( NULL ),
+             mpOOAutoFill( NULL ),
+             mpOODragRect( NULL ),
+             mpOOHeader( NULL ),
+@@ -2964,12 +2968,30 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
+     }
+ }
+ 
++static void ClearSingleSelection( ScViewData* pViewData )
++{
++    SCCOL nX;
++    SCROW nY;
++    ScTransferObj* pTransObj = ScTransferObj::GetOwnClipboard(
++        pViewData->GetActiveWin() );
++    if (!pTransObj)
++        return;
++
++    ScDocument* pClipDoc = pTransObj->GetDocument();
++    pClipDoc->GetClipArea( nX, nY, TRUE );
++    if (nX == 0 && nY == 0)
++    {
++        ScTabView* pView = pViewData->GetView();
++        pView->Unmark();
++    }
++}
++
+ void __EXPORT ScGridWindow::KeyInput(const KeyEvent& rKEvt)
+ {
+     // #96965# Cursor control for ref input dialog
++    const KeyCode& rKeyCode = rKEvt.GetKeyCode();
+     if( SC_MOD()->IsRefDialogOpen() )
+     {
+-        const KeyCode& rKeyCode = rKEvt.GetKeyCode();
+         if( !rKeyCode.GetModifier() && (rKeyCode.GetCode() == KEY_F2) )
+         {
+             SC_MOD()->EndReference();
+@@ -2984,9 +3006,35 @@ void __EXPORT ScGridWindow::KeyInput(const KeyEvent& rKEvt)
+             return;
+         }
+     }
++    else if( rKeyCode.GetCode() == KEY_RETURN && pViewData->IsPasteMode() )
++    {
++        ScTabViewShell* pTabViewShell = pViewData->GetViewShell();
++
++        ScCellShell::PasteFromClipboard( pViewData, pTabViewShell, FALSE );
++        ClearSingleSelection( pViewData );
++
++        uno::Reference<datatransfer::clipboard::XClipboard> xSystemClipboard =
++            TransferableHelper::GetSystemClipboard();
++        if (xSystemClipboard.is())
++        {
++            xSystemClipboard->setContents(
++                    uno::Reference<datatransfer::XTransferable>(),
++                    uno::Reference<datatransfer::clipboard::XClipboardOwner>());
++        }
++
++        // hide the border around the copy source
++        pViewData->SetPasteMode( SC_PASTE_NONE );
++        UpdateCopySourceOverlay();
++        return;
++    }
+     // wenn semi-Modeless-SfxChildWindow-Dialog oben, keine KeyInputs:
+     else if( !pViewData->IsAnyFillMode() )
+     {
++        if (rKeyCode.GetCode() == KEY_ESCAPE)
++        {
++            pViewData->SetPasteMode( SC_PASTE_NONE );
++            UpdateCopySourceOverlay();
++        }
+         //	query for existing note marker before calling ViewShell's keyboard handling
+         //	which may remove the marker
+         BOOL bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() );
+@@ -5067,6 +5115,7 @@ void ScGridWindow::CursorChanged()
+ void ScGridWindow::ImpCreateOverlayObjects()
+ {
+     UpdateCursorOverlay();
++    UpdateCopySourceOverlay();
+     UpdateSelectionOverlay();
+     UpdateAutoFillOverlay();
+     UpdateDragRectOverlay();
+@@ -5078,6 +5127,7 @@ void ScGridWindow::ImpCreateOverlayObjects()
+ void ScGridWindow::ImpDestroyOverlayObjects()
+ {
+     DeleteCursorOverlay();
++    DeleteCopySourceOverlay();
+     DeleteSelectionOverlay();
+     DeleteAutoFillOverlay();
+     DeleteDragRectOverlay();
+@@ -5098,6 +5148,68 @@ void ScGridWindow::DeleteCursorOverlay()
+     DELETEZ( mpOOCursors );
+ }
+ 
++void ScGridWindow::DeleteCopySourceOverlay()
++{
++    DELETEZ( mpOOSelectionBorder );
++}
++
++void ScGridWindow::UpdateCopySourceOverlay()
++{
++    MapMode aDrawMode = GetDrawMapMode();
++    MapMode aOldMode = GetMapMode();
++    if ( aOldMode != aDrawMode )
++        SetMapMode( aDrawMode );
++
++    DeleteCopySourceOverlay();
++
++    if (!pViewData->ShowPasteSource())
++        return;
++    ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();
++    if (!pOverlayManager)
++        return;
++    ScTransferObj* pTransObj = ScTransferObj::GetOwnClipboard( pViewData->GetActiveWin() );
++    if (!pTransObj)
++        return;
++    ScDocument* pClipDoc = pTransObj->GetDocument();
++    if (!pClipDoc)
++        return;
++
++    SCTAB nCurTab = pViewData->GetCurPos().Tab();
++
++    ScClipParam& rClipParam = pClipDoc->GetClipParam();
++    mpOOSelectionBorder = new ::sdr::overlay::OverlayObjectList;
++    for (ScRange* p = rClipParam.maRanges.First(); p; p = rClipParam.maRanges.Next())
++    {
++        if (p->aStart.Tab() != nCurTab)
++            continue;
++
++        SCCOL nClipStartX = p->aStart.Col();
++        SCROW nClipStartY = p->aStart.Row();
++        SCCOL nClipEndX   = p->aEnd.Col();
++        SCROW nClipEndY   = p->aEnd.Row();
++
++        Point aClipStartScrPos = pViewData->GetScrPos( nClipStartX, nClipStartY, eWhich );
++        Point aClipEndScrPos   = pViewData->GetScrPos( nClipEndX + 1, nClipEndY + 1, eWhich );
++        aClipStartScrPos -= Point(1, 1);
++        long nSizeXPix = aClipEndScrPos.X() - aClipStartScrPos.X();
++        long nSizeYPix = aClipEndScrPos.Y() - aClipStartScrPos.Y();
++
++        Rectangle aRect( aClipStartScrPos, Size(nSizeXPix, nSizeYPix) );
++
++
++        Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor();
++
++        Rectangle aLogic = PixelToLogic(aRect, aDrawMode);
++        ::basegfx::B2DRange aRange(aLogic.Left(), aLogic.Top(), aLogic.Right(), aLogic.Bottom());
++        ScOverlayDashedBorder* pDashedBorder = new ScOverlayDashedBorder(aRange, aHighlight, this);
++        pOverlayManager->add(*pDashedBorder);
++        mpOOSelectionBorder->append(*pDashedBorder);
++    }
++
++    if ( aOldMode != aDrawMode )
++        SetMapMode( aOldMode );
++}
++
+ void ScGridWindow::UpdateCursorOverlay()
+ {
+     MapMode aDrawMode = GetDrawMapMode();
+diff --git sc/source/ui/view/makefile.mk sc/source/ui/view/makefile.mk
+index feeacc8..129f4a7 100644
+--- sc/source/ui/view/makefile.mk
++++ sc/source/ui/view/makefile.mk
+@@ -94,6 +94,7 @@ SLOFILES =  \
+         $(SLO)$/output.obj \
+         $(SLO)$/output2.obj \
+         $(SLO)$/output3.obj \
++        $(SLO)$/overlayobject.obj \
+         $(SLO)$/gridmerg.obj \
+         $(SLO)$/invmerge.obj \
+         $(SLO)$/select.obj \
+@@ -147,6 +148,7 @@ EXCEPTIONSFILES= \
+     $(SLO)$/gridwin.obj \
+     $(SLO)$/invmerge.obj \
+     $(SLO)$/output2.obj \
++    $(SLO)$/overlayobject.obj \
+     $(SLO)$/pfuncache.obj \
+     $(SLO)$/spelldialog.obj \
+     $(SLO)$/cellsh1.obj \
+diff --git sc/source/ui/view/overlayobject.cxx sc/source/ui/view/overlayobject.cxx
+new file mode 100644
+index 0000000..7f44f45
+--- /dev/null
++++ sc/source/ui/view/overlayobject.cxx
+@@ -0,0 +1,104 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: gridwin.hxx,v $
++ * $Revision: 1.30 $
++ *
++ * 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.
++ *
++ ************************************************************************/
++
++// MARKER(update_precomp.py): autogen include statement, do not remove
++#include "precompiled_sc.hxx"
++
++#include "overlayobject.hxx"
++#include "vcl/outdev.hxx"
++#include "vcl/lineinfo.hxx"
++#include "vcl/salbtype.hxx"
++#include "vcl/window.hxx"
++#include "tools/fract.hxx"
++#include "basegfx/range/b2drange.hxx"
++#include "basegfx/polygon/b2dpolygon.hxx"
++#include "basegfx/polygon/b2dpolygontools.hxx"
++#include "svx/sdr/overlay/overlaymanager.hxx"
++#include "drawinglayer/primitive2d/baseprimitive2d.hxx"
++#include "drawinglayer/primitive2d/polypolygonprimitive2d.hxx"
++
++using ::sdr::overlay::OverlayObject;
++using ::sdr::overlay::OverlayManager;
++using ::drawinglayer::primitive2d::Primitive2DSequence;
++
++#define DASH_UPDATE_INTERVAL 180    // in msec
++
++ScOverlayDashedBorder::ScOverlayDashedBorder(const ::basegfx::B2DRange& rRange, const Color& rColor, Window* pWin) :
++    OverlayObject(rColor),
++    mpParent(pWin),
++    mbToggle(true)
++{
++    mbAllowsAnimation = true;
++    maRange = rRange;
++}
++
++ScOverlayDashedBorder::~ScOverlayDashedBorder()
++{
++}
++
++void ScOverlayDashedBorder::Trigger(sal_uInt32 nTime)
++{
++    OverlayManager* pMgr = getOverlayManager();
++    if (pMgr)
++    {
++        SetTime(nTime + DASH_UPDATE_INTERVAL);
++        mbToggle = !mbToggle;
++        pMgr->InsertEvent(this);
++        objectChange();
++    }
++}
++
++void ScOverlayDashedBorder::stripeDefinitionHasChanged()
++{
++    objectChange();
++}
++
++Primitive2DSequence ScOverlayDashedBorder::createOverlayObjectPrimitive2DSequence()
++{
++    using ::basegfx::B2DPolygon;
++    using ::basegfx::B2DPolyPolygon;
++
++    OverlayManager* pMgr = getOverlayManager();
++    if (!pMgr)
++        return Primitive2DSequence();
++
++    basegfx::BColor aColorA = pMgr->getStripeColorA().getBColor();
++    basegfx::BColor aColorB = pMgr->getStripeColorB().getBColor();
++    if (!mbToggle)
++        ::std::swap(aColorA, aColorB);
++
++    const basegfx::B2DPolygon aPoly = basegfx::tools::createPolygonFromRect(maRange);
++    B2DPolyPolygon aPolygon(aPoly);
++    const drawinglayer::primitive2d::Primitive2DReference aReference(
++        new drawinglayer::primitive2d::PolyPolygonMarkerPrimitive2D(
++            aPolygon, aColorA, aColorB, pMgr->getStripeLengthPixel()));
++
++    return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
++}
+diff --git sc/source/ui/view/tabview2.cxx sc/source/ui/view/tabview2.cxx
+index 27c0f7d..fa99268 100644
+--- sc/source/ui/view/tabview2.cxx
++++ sc/source/ui/view/tabview2.cxx
+@@ -411,6 +411,13 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
+         aHdrFunc.SetAnchorFlag( FALSE );
+ }
+ 
++void ScTabView::UpdateCopySourceOverlay()
++{
++    for (sal_uInt8 i = 0; i < 4; ++i)
++        if (pGridWin[i] && pGridWin[i]->IsVisible())
++            pGridWin[i]->UpdateCopySourceOverlay();
++}
++
+ void ScTabView::UpdateSelectionOverlay()
+ {
+     for (USHORT i=0; i<4; i++)
+diff --git sc/source/ui/view/tabview3.cxx sc/source/ui/view/tabview3.cxx
+index 47797e7..806db79 100644
+--- sc/source/ui/view/tabview3.cxx
++++ sc/source/ui/view/tabview3.cxx
+@@ -1810,6 +1810,7 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
+ 
+                     pGridWin[i]->DeleteCursorOverlay();
+                     pGridWin[i]->DeleteAutoFillOverlay();
++                    pGridWin[i]->DeleteCopySourceOverlay();
+ 
+                     // flush OverlayManager before changing MapMode to text edit
+                     pGridWin[i]->flushOverlayManager();
+diff --git sc/source/ui/view/viewdata.cxx sc/source/ui/view/viewdata.cxx
+index 7f55a1a..012a1e0 100644
+--- sc/source/ui/view/viewdata.cxx
++++ sc/source/ui/view/viewdata.cxx
+@@ -311,6 +311,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh )
+         eRefType	( SC_REFTYPE_NONE ),
+         nTabNo		( 0 ),
+         nRefTabNo	( 0 ),
++        nPasteFlags ( SC_PASTE_NONE ),
+         eEditActivePart( SC_SPLIT_BOTTOMLEFT ),
+         bActive		( TRUE ),					//! wie initialisieren?
+         bIsRefMode	( FALSE ),
+diff --git sc/source/ui/view/viewfunc.cxx sc/source/ui/view/viewfunc.cxx
+index 93c0cca..e1d2a3b 100644
+--- sc/source/ui/view/viewfunc.cxx
++++ sc/source/ui/view/viewfunc.cxx
+@@ -1894,6 +1894,10 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord )
+ 
+ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
+ {
++    ScViewData* pViewData = GetViewData();
++    pViewData->SetPasteMode( SC_PASTE_NONE );
++    pViewData->GetViewShell()->UpdateCopySourceOverlay();
++
+     // nur wegen Matrix nicht editierbar? Attribute trotzdem ok
+     BOOL bOnlyNotBecauseOfMatrix;
+     BOOL bEditable = SelectionEditable( &bOnlyNotBecauseOfMatrix );
+-- 
+1.7.0.1
+
diff --git a/patches/dev300/cws-koheicopyborder-sc.diff b/patches/dev300/cws-koheicopyborder-sc.diff
index f5edb3f..8955417 100644
--- a/patches/dev300/cws-koheicopyborder-sc.diff
+++ b/patches/dev300/cws-koheicopyborder-sc.diff
@@ -215,16 +215,16 @@ diff --git sc/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
 index c0b9dd0..41cbc01 100644
 --- sc/source/ui/view/gridwin.cxx
 +++ sc/source/ui/view/gridwin.cxx
-@@ -119,6 +119,9 @@
+@@ -121,6 +121,9 @@
  #include "tabprotection.hxx"
  #include "postit.hxx"
  #include "dpcontrol.hxx"
 +#include "clipparam.hxx"
 +#include "cellsh.hxx"
 +#include "overlayobject.hxx"
+ #include "cellsuno.hxx"
  
  #include "drawview.hxx"
- #include <svx/sdrpagewindow.hxx>
 @@ -374,6 +377,7 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
              DragSourceHelper( this ),
              mpOOCursors( NULL ),
diff --git a/patches/dev300/pptx-snapshot-at-ooxml03-creation-m2.diff b/patches/dev300/pptx-snapshot-at-ooxml03-creation-m2.diff
new file mode 100644
index 0000000..a9ea76c
--- /dev/null
+++ b/patches/dev300/pptx-snapshot-at-ooxml03-creation-m2.diff
@@ -0,0 +1,10324 @@
+---
+ .../filters/impress_MS_PowerPoint_2007_XML.xcu     |    2 +-
+ .../impress_MS_PowerPoint_2007_XML_Template.xcu    |    2 +-
+ .../fragments/types/MS_PowerPoint_2007_XML.xcu     |    2 +-
+ oox/inc/oox/ppt/pptimport.hxx                      |    3 +
+ oox/source/ppt/pptimport.cxx                       |   26 +
+ sd/prj/build.lst                                   |    2 +-
+ sd/source/filter/pptx/eppt.hxx                     |  596 +------
+ sd/source/filter/pptx/epptbase.hxx                 |  411 ++++
+ sd/source/filter/pptx/epptooxml.hxx                |  120 ++
+ sd/source/filter/pptx/grouptable.hxx               |   58 +
+ sd/source/filter/pptx/pptx-NOTES                   |    2 +
+ sd/source/filter/pptx/pptx-eppt.cxx                | 1585 ++++------------
+ sd/source/filter/pptx/pptx-epptbase.cxx            |  947 +++++++++
+ sd/source/filter/pptx/pptx-epptooxml.cxx           | 1449 ++++++++++++++
+ sd/source/filter/pptx/pptx-epptso.cxx              | 2091 +-------------------
+ sd/source/filter/pptx/pptx-grouptable.cxx          |  114 ++
+ sd/source/filter/pptx/pptx-stylesheet.cxx          |  485 +++++
+ sd/source/filter/pptx/pptx-text.cxx                | 1410 +++++++++++++
+ sd/source/filter/pptx/text.hxx                     |  246 +++
+ 19 files changed, 5725 insertions(+), 3826 deletions(-)
+ create mode 100644 sd/source/filter/pptx/epptbase.hxx
+ create mode 100644 sd/source/filter/pptx/epptooxml.hxx
+ create mode 100644 sd/source/filter/pptx/grouptable.hxx
+ create mode 100644 sd/source/filter/pptx/pptx-NOTES
+ create mode 100644 sd/source/filter/pptx/pptx-epptbase.cxx
+ create mode 100644 sd/source/filter/pptx/pptx-epptooxml.cxx
+ create mode 100644 sd/source/filter/pptx/pptx-grouptable.cxx
+ create mode 100644 sd/source/filter/pptx/pptx-stylesheet.cxx
+ create mode 100644 sd/source/filter/pptx/pptx-text.cxx
+ create mode 100644 sd/source/filter/pptx/text.hxx
+
+diff --git filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML.xcu filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML.xcu
+index 7fdcbd7..138d449 100644
+--- filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML.xcu
++++ filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML.xcu
+@@ -1,5 +1,5 @@
+ <node oor:name="Impress MS PowerPoint 2007 XML" oor:op="replace">
+-    <prop oor:name="Flags"><value>IMPORT ALIEN 3RDPARTYFILTER PREFERRED</value></prop>
++    <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER PREFERRED</value></prop>
+     <prop oor:name="UIComponent"/>
+     <prop oor:name="FilterService"><value>com.sun.star.comp.Impress.oox.PowerPointImport</value></prop>
+     <prop oor:name="UserData"/>
+diff --git filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu
+index 4fad96f..c8cf6d1 100644
+--- filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu
++++ filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu
+@@ -1,5 +1,5 @@
+ <node oor:name="Impress MS PowerPoint 2007 XML Template" oor:op="replace">
+-    <prop oor:name="Flags"><value>IMPORT ALIEN 3RDPARTYFILTER TEMPLATE TEMPLATEPATH PREFERRED</value></prop>
++    <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER TEMPLATE TEMPLATEPATH PREFERRED</value></prop>
+     <prop oor:name="UIComponent"/>
+     <prop oor:name="FilterService"><value>com.sun.star.comp.Impress.oox.PowerPointImport</value></prop>
+     <prop oor:name="UserData"/>
+diff --git filter/source/config/fragments/types/MS_PowerPoint_2007_XML.xcu filter/source/config/fragments/types/MS_PowerPoint_2007_XML.xcu
+index 99f22ee..1cc12bf 100644
+--- filter/source/config/fragments/types/MS_PowerPoint_2007_XML.xcu
++++ filter/source/config/fragments/types/MS_PowerPoint_2007_XML.xcu
+@@ -1,7 +1,7 @@
+ <node oor:name="MS PowerPoint 2007 XML" oor:op="replace" >
+     <prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
+     <prop oor:name="URLPattern"/>
+-    <prop oor:name="Extensions"><value>pptm pptx</value></prop>
++    <prop oor:name="Extensions"><value>pptx pptm</value></prop>
+     <prop oor:name="MediaType"/>
+     <prop oor:name="Preferred"><value>true</value></prop>
+     <prop oor:name="PreferredFilter"><value>Impress MS PowerPoint 2007 XML</value></prop>
+diff --git oox/inc/oox/ppt/pptimport.hxx oox/inc/oox/ppt/pptimport.hxx
+index 31ea885..0ac93dd 100644
+--- oox/inc/oox/ppt/pptimport.hxx
++++ oox/inc/oox/ppt/pptimport.hxx
+@@ -66,6 +66,9 @@ public:
+ 
+     sal_Int32 getSchemeColor( sal_Int32 nToken ) const;
+ 
++    virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence<   ::com::sun::star::beans::PropertyValue >& rDescriptor )
++        throw( ::com::sun::star::uno::RuntimeException );
++
+ private:
+     virtual GraphicHelper* implCreateGraphicHelper() const;
+     virtual ::rtl::OUString implGetImplementationName() const;
+diff --git oox/source/ppt/pptimport.cxx oox/source/ppt/pptimport.cxx
+index 59c28cb..500c409 100644
+--- oox/source/ppt/pptimport.cxx
++++ oox/source/ppt/pptimport.cxx
+@@ -37,6 +37,9 @@ using namespace ::com::sun::star::uno;
+ using namespace ::com::sun::star::xml::sax;
+ using namespace oox::core;
+ 
++using ::com::sun::star::beans::PropertyValue;
++using ::com::sun::star::lang::XComponent;
++
+ namespace oox { namespace ppt {
+ 
+ OUString SAL_CALL PowerPointImport_getImplementationName() throw()
+@@ -130,6 +133,29 @@ const ::oox::drawingml::Theme* PowerPointImport::getCurrentTheme() const
+     return mpActualSlidePersist ? mpActualSlidePersist->getTheme().get() : 0;
+ }
+ 
++sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDescriptor ) throw( RuntimeException )
++{
++    if( XmlFilterBase::filter( rDescriptor ) )
++        return true;
++
++    if( isExportFilter() ) {
++        Reference< XExporter > xExporter( getGlobalFactory()->createInstance( CREATE_OUSTRING( "com.sun.star.comp.Impress.oox.PowerPointExport" ) ), UNO_QUERY );
++
++        if( xExporter.is() ) {
++            Reference< XComponent > xDocument( getModel(), UNO_QUERY );
++            Reference< XFilter > xFilter( xExporter, UNO_QUERY );
++
++            if( xFilter.is() ) {
++                xExporter->setSourceDocument( xDocument );
++                if( xFilter->filter( rDescriptor ) )
++                    return true;
++            }
++        }
++    }
++
++    return false;
++}
++
+ ::oox::vml::Drawing* PowerPointImport::getVmlDrawing()
+ {
+     return mpActualSlidePersist ? mpActualSlidePersist->getDrawing() : 0;
+diff --git sd/prj/build.lst sd/prj/build.lst
+index 39a07df..16efa83 100644
+--- sd/prj/build.lst
++++ sd/prj/build.lst
+@@ -1,4 +1,4 @@
+-sd      sd      :    filter l10n animations svx stoc canvas NULL
++sd      sd      :    filter l10n animations svx stoc canvas slideshow oox NULL
+ sd	sd										usr1	-	all	sd_mkout NULL
+ sd	sd\inc									nmake		-	all	sd_inc NULL
+ sd	sd\prj									get		-	all	sd_prj NULL
+diff --git sd/source/filter/pptx/eppt.hxx sd/source/filter/pptx/eppt.hxx
+index bc17b1b..52a704f 100644
+--- sd/source/filter/pptx/eppt.hxx
++++ sd/source/filter/pptx/eppt.hxx
+@@ -36,13 +36,11 @@
+ #endif
+ #include <tools/solar.h>
+ #include <sot/storage.hxx>
+-#include <tools/gen.hxx>
+ #include <vcl/graph.hxx>
+ #include <unotools/fontcvt.hxx>
+-#include <tools/string.hxx>
+ #include "pptexanimations.hxx"
+ #include <pptexsoundcollection.hxx>
+-
++#include "text.hxx"
+ // ------------------------------------------------------------------------
+ 
+ #include <vcl/mapmod.hxx>
+@@ -66,11 +64,7 @@
+ #include <com/sun/star/drawing/Hatch.hpp>
+ #include <com/sun/star/drawing/LineDash.hpp>
+ #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+-#include <com/sun/star/presentation/XPresentationSupplier.hpp>
+ #include <com/sun/star/presentation/XCustomPresentationSupplier.hpp>
+-#include <com/sun/star/drawing/XMasterPageTarget.hpp>
+-#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+-#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
+ #include <com/sun/star/awt/XGraphics.hpp>
+ #include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+ #include <com/sun/star/presentation/AnimationEffect.hpp>
+@@ -81,12 +75,10 @@
+ #include <com/sun/star/text/XTextFieldsSupplier.hpp>
+ #include <com/sun/star/text/XTextField.hpp>
+ #include <com/sun/star/container/XNamed.hpp>
+-#include <com/sun/star/awt/FontDescriptor.hpp>
+ #include <com/sun/star/container/XIndexContainer.hpp>
+ #include <com/sun/star/awt/XControlModel.hpp>
+ #include <com/sun/star/style/TabStop.hpp>
+ #include <filter/msfilter/msocximex.hxx>
+-#include <com/sun/star/beans/XPropertySet.hpp>
+ #include <com/sun/star/beans/XPropertyState.hpp>
+ #include <com/sun/star/beans/XPropertySetInfo.hpp>
+ #include <com/sun/star/awt/FontFamily.hpp>
+@@ -95,7 +87,7 @@
+ #include <com/sun/star/text/WritingMode.hpp>
+ #include <com/sun/star/lang/Locale.hpp>
+ 
+-enum PageType { NORMAL = 0, MASTER = 1, NOTICE = 2, UNDEFINED = 3 };
++#include <epptbase.hxx>
+ 
+ #define EPP_MAINMASTER_PERSIST_KEY		0x80010000
+ #define EPP_MAINNOTESMASTER_PERSIST_KEY	0x80020000
+@@ -116,283 +108,11 @@ enum PageType { NORMAL = 0, MASTER = 1, NOTICE = 2, UNDEFINED = 3 };
+ #define EPP_TEXTSTYLE_BODY				0x00000100
+ #define EPP_TEXTSTYLE_TEXT				0x00001000
+ 
+-// PLACEMENT_ID
+-#define EPP_LAYOUT_TITLESLIDE             0 /* The slide is a title slide                                                             */
+-#define EPP_LAYOUT_TITLEANDBODYSLIDE      1 /* Title and body slide                                                                   */
+-#define EPP_LAYOUT_TITLEMASTERSLIDE       2 /* Title master slide                                                                     */
+-#define	EPP_LAYOUT_MASTERSLIDE            3 /* Master slide layout                                                                    */
+-#define EPP_LAYOUT_MASTERNOTES            4 /* Master notes layout                                                                    */
+-#define EPP_LAYOUT_NOTESTITLEBODY         5 /* Notes title/body layout                                                                */
+-#define EPP_LAYOUT_HANDOUTLAYOUT          6 /* Handout layout, therefore it doesn't have placeholders except header, footer, and date */
+-#define EPP_LAYOUT_ONLYTITLE              7 /* Only title placeholder                                                                 */
+-#define EPP_LAYOUT_2COLUMNSANDTITLE       8 /* Body of the slide has 2 columns and a title                                            */
+-#define EPP_LAYOUT_2ROWSANDTITLE          9 /* Slide's body has 2 rows and a title                                                    */
+-#define EPP_LAYOUT_RIGHTCOLUMN2ROWS      10 /* Body contains 2 columns, right column has 2 rows                                       */
+-#define EPP_LAYOUT_LEFTCOLUMN2ROWS       11 /* Body contains 2 columns, left column has 2 rows                                        */
+-#define EPP_LAYOUT_BOTTOMROW2COLUMNS     12 /* Body contains 2 rows, bottom row has 2 columns                                         */
+-#define EPP_LAYOUT_TOPROW2COLUMN         13 /* Body contains 2 rows, top row has 2 columns                                            */
+-#define EPP_LAYOUT_4OBJECTS              14 /* 4 objects                                                                              */
+-#define EPP_LAYOUT_BIGOBJECT             15 /* Big object                                                                             */
+-#define EPP_LAYOUT_BLANCSLIDE            16 /* Blank slide                                                                            */
+-#define EPP_LAYOUT_TITLERIGHTBODYLEFT    17 /* Vertical title on the right, body on the left                                          */
+-#define EPP_LAYOUT_TITLERIGHT2BODIESLEFT 18 /* Vertical title on the right, body on the left split into 2 rows                        */
+-
+ class Polygon;
+-class PptEscherEx;
+ class XStatusIndicatorRef;
+ 
+-struct PHLayout
+-{
+-    sal_Int32	nLayout;
+-    sal_uInt8	nPlaceHolder[ 8 ];
+-
+-    sal_uInt8	nUsedObjectPlaceHolder;
+-    sal_uInt8	nTypeOfTitle;
+-    sal_uInt8	nTypeOfOutliner;
+-
+-    BOOL	bTitlePossible;
+-    BOOL	bOutlinerPossible;
+-    BOOL	bSecOutlinerPossible;
+-};
+-
+-struct SOParagraph
+-{
+-    sal_Bool				bExtendedParameters;
+-    sal_uInt32				nParaFlags;
+-    sal_Int16				nBulletFlags;
+-    String					sPrefix;
+-    String					sSuffix;
+-    String					sGraphicUrl;			// String auf eine Graphic
+-    Size					aBuGraSize;
+-    sal_uInt32				nNumberingType;			// in wirlichkeit ist dies ein SvxEnum
+-    sal_uInt32				nHorzAdjust;
+-    sal_uInt32				nBulletColor;
+-    sal_Int32				nBulletOfs;
+-    sal_Int16				nStartWith;				// Start der nummerierung
+-    sal_Int16				nTextOfs;
+-    sal_Int16				nBulletRealSize;		// GroessenVerhaeltnis in Proz
+-    sal_Int16				nDepth;					// aktuelle tiefe
+-    sal_Unicode				cBulletId;				// wenn Numbering Type == CharSpecial
+-    ::com::sun::star::awt::FontDescriptor		aFontDesc;
+-
+-    sal_Bool				bExtendedBulletsUsed;
+-    sal_uInt16				nBulletId;
+-    sal_uInt32				nMappedNumType;
+-    sal_Bool				bNumberingIsNumber;
+-
+-    SOParagraph()
+-    {
+-        nDepth = 0;
+-        bExtendedParameters = FALSE;
+-        nParaFlags = 0;
+-        nBulletFlags = 0;
+-        nBulletOfs = 0;
+-        nTextOfs = 0;
+-        bExtendedBulletsUsed = FALSE;
+-        nBulletId = 0xffff;
+-        bNumberingIsNumber = sal_True;
+-    };
+-};
+-
+ // ------------------------------------------------------------------------
+ 
+-class EscherGraphicProvider;
+-class PPTExBulletProvider
+-{
+-    friend struct PPTExParaSheet;
+-
+-    protected :
+-
+-        SvMemoryStream			aBuExPictureStream;
+-        SvMemoryStream			aBuExOutlineStream;
+-        SvMemoryStream			aBuExMasterStream;
+-
+-        EscherGraphicProvider*	pGraphicProv;
+-
+-    public :
+-
+-        sal_uInt16				GetId( const ByteString& rUniqueId, Size& rGraphicSize );
+-
+-                                PPTExBulletProvider();
+-                                ~PPTExBulletProvider();
+-};
+-
+-struct FontCollectionEntry
+-{
+-        String					Name;
+-        double                  Scaling;
+-        sal_Int16				Family;
+-        sal_Int16				Pitch;
+-        sal_Int16				CharSet;
+-
+-        String                  Original;
+-        sal_Bool                bIsConverted;
+-
+-        FontCollectionEntry( const String& rName, sal_Int16 nFamily, sal_Int16 nPitch, sal_Int16 nCharSet ) :
+-                            Scaling ( 1.0 ),
+-                            Family	( nFamily ),
+-                            Pitch	( nPitch ),
+-                            CharSet	( nCharSet ),
+-                            Original( rName )
+-                            {
+-                                ImplInit( rName );
+-                            };
+-
+-        FontCollectionEntry( const String& rName ) :
+-                            Scaling ( 1.0 ),
+-                            Original( rName )
+-                            {
+-                                ImplInit( rName );
+-                            };
+-        ~FontCollectionEntry();
+-
+-    private :
+-
+-        FontCollectionEntry() {};
+-
+-        void ImplInit( const String& rName );
+-};
+-
+-class VirtualDevice;
+-class FontCollection : private List
+-{
+-        VirtualDevice* pVDev;
+-    public :
+-                    FontCollection();
+-                    ~FontCollection();
+-
+-        short		GetScriptDirection( const String& rText ) const;
+-        sal_uInt32	GetId( FontCollectionEntry& rFontDescriptor );
+-        sal_uInt32	GetCount() const { return List::Count(); };
+-        const FontCollectionEntry*						GetById( sal_uInt32 nId );
+-        FontCollectionEntry&	GetLast() { return *(FontCollectionEntry*)List::Last(); };
+-};
+-
+-// ------------------------------------------------------------------------
+-
+-#define PPTEX_STYLESHEETENTRYS	9
+-
+-enum PPTExTextAttr
+-{
+-    ParaAttr_BulletOn,
+-    ParaAttr_BuHardFont,
+-    ParaAttr_BuHardColor,
+-    ParaAttr_BuHardHeight,
+-    ParaAttr_BulletChar,
+-    ParaAttr_BulletFont,
+-    ParaAttr_BulletHeight,
+-    ParaAttr_BulletColor,
+-    ParaAttr_Adjust,
+-    ParaAttr_LineFeed,
+-    ParaAttr_UpperDist,
+-    ParaAttr_LowerDist,
+-    ParaAttr_TextOfs,
+-    ParaAttr_BulletOfs,
+-    ParaAttr_DefaultTab,
+-    ParaAttr_AsianLB_1,
+-    ParaAttr_AsianLB_2,
+-    ParaAttr_AsianLB_3,
+-    ParaAttr_BiDi,
+-    CharAttr_Bold,
+-    CharAttr_Italic,
+-    CharAttr_Underline,
+-    CharAttr_Shadow,
+-    CharAttr_Strikeout,
+-    CharAttr_Embossed,
+-    CharAttr_Font,
+-    CharAttr_AsianOrComplexFont,
+-    CharAttr_Symbol,
+-    CharAttr_FontHeight,
+-    CharAttr_FontColor,
+-    CharAttr_Escapement
+-};
+-
+-struct PPTExCharLevel
+-{
+-    sal_uInt16		mnFlags;
+-    sal_uInt16		mnFont;
+-    sal_uInt16		mnAsianOrComplexFont;
+-    sal_uInt16		mnFontHeight;
+-    sal_uInt16		mnEscapement;
+-    sal_uInt32		mnFontColor;
+-};
+-
+-struct PPTExCharSheet
+-{
+-                PPTExCharLevel	maCharLevel[ 5 ];
+-
+-                PPTExCharSheet( int nInstance );
+-
+-                void	SetStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
+-                                        FontCollection& rFontCollection, int nLevel );
+-                void	Write( SvStream& rSt, PptEscherEx* pEx, sal_uInt16 nLev, sal_Bool bFirst, sal_Bool bSimpleText,
+-                            const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rPagePropSet );
+-
+-};
+-
+-struct PPTExParaLevel
+-{
+-    sal_Bool	    mbIsBullet;
+-    sal_uInt16		mnBulletChar;
+-    sal_uInt16		mnBulletFont;
+-    sal_uInt16		mnBulletHeight;
+-    sal_uInt32		mnBulletColor;
+-
+-    sal_uInt16		mnAdjust;
+-    sal_uInt16		mnLineFeed;
+-    sal_uInt16		mnUpperDist;
+-    sal_uInt16		mnLowerDist;
+-    sal_uInt16		mnTextOfs;
+-    sal_uInt16		mnBulletOfs;
+-    sal_uInt16		mnDefaultTab;
+-
+-    sal_Bool		mbExtendedBulletsUsed;
+-    sal_uInt16		mnBulletId;
+-    sal_uInt16		mnBulletStart;
+-    sal_uInt32		mnMappedNumType;
+-    sal_uInt32		mnNumberingType;
+-    sal_uInt16      mnAsianSettings;
+-    sal_uInt16		mnBiDi;
+-};
+-
+-struct PPTExParaSheet
+-{
+-                PPTExBulletProvider& rBuProv;
+-
+-                sal_uInt32	mnInstance;
+-
+-                PPTExParaLevel	maParaLevel[ 5 ];
+-                PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBulletProvider& rProv );
+-
+-                void	SetStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
+-                                        FontCollection& rFontCollection, int nLevel, const PPTExCharLevel& rCharLevel );
+-                void	Write( SvStream& rSt, PptEscherEx* pEx, sal_uInt16 nLev, sal_Bool bFirst, sal_Bool bSimpleText,
+-                    const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rPagePropSet );
+-};
+-
+-class PPTExStyleSheet
+-{
+-
+-    public :
+-
+-                PPTExCharSheet*		mpCharSheet[ PPTEX_STYLESHEETENTRYS ];
+-                PPTExParaSheet*		mpParaSheet[ PPTEX_STYLESHEETENTRYS ];
+-
+-                PPTExStyleSheet( sal_uInt16 nDefaultTab, PPTExBulletProvider& rBuProv );
+-                ~PPTExStyleSheet();
+-
+-                PPTExParaSheet& GetParaSheet( int nInstance ) { return *mpParaSheet[ nInstance ]; };
+-                PPTExCharSheet& GetCharSheet( int nInstance ) { return *mpCharSheet[ nInstance ]; };
+-
+-                void			SetStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
+-                                                FontCollection& rFontCollection, int nInstance, int nLevel );
+-                sal_Bool		IsHardAttribute( sal_uInt32 nInstance, sal_uInt32 nLevel, PPTExTextAttr eAttr, sal_uInt32 nValue );
+-
+-                sal_uInt32		SizeOfTxCFStyleAtom() const;
+-                void			WriteTxCFStyleAtom( SvStream& rSt );
+-};
+-
+-
+ struct EPPTHyperlink
+ {
+     String		aURL;
+@@ -437,296 +157,34 @@ struct TextRuleEntry
+     ~TextRuleEntry() { delete pOut; };
+ };
+ 
+-// ------------------------------------------------------------------------
+-
+-struct GroupEntry
++class TextObjBinary : public TextObj
+ {
+-        sal_uInt32					mnCurrentPos;
+-        sal_uInt32					mnCount;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >			mXIndexAccess;
+-                                GroupEntry( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & rIndex )
+-                                {
+-                                    mXIndexAccess = rIndex;
+-                                    mnCount =mXIndexAccess->getCount();
+-                                    mnCurrentPos = 0;
+-                                };
+-                                GroupEntry( sal_uInt32 nCount )
+-                                {
+-                                    mnCount = nCount;
+-                                    mnCurrentPos = 0;
+-                                };
+-                                ~GroupEntry(){};
+-};
+-
+-// ------------------------------------------------------------------------
++public:
++    TextObjBinary( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSimpleText > &
++                   rXText, int nInstance, FontCollection& rFontCollection, PPTExBulletProvider& rBuProv ) : TextObj( rXText, nInstance, rFontCollection, rBuProv ) {}
+ 
+-class GroupTable
+-{
+-    protected:
+-
+-        sal_uInt32				mnIndex;
+-        sal_uInt32				mnCurrentGroupEntry;
+-        sal_uInt32				mnMaxGroupEntry;
+-        sal_uInt32				mnGroupsClosed;
+-        GroupEntry**			mpGroupEntry;
+-
+-        void					ImplResizeGroupTable( sal_uInt32 nEntrys );
+-
+-    public:
+-
+-        sal_uInt32				GetCurrentGroupIndex() const { return mnIndex; };
+-        sal_Int32				GetCurrentGroupLevel() const { return mnCurrentGroupEntry - 1; };
+-        ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > &
+-                                GetCurrentGroupAccess() const { return mpGroupEntry[  mnCurrentGroupEntry - 1 ]->mXIndexAccess; };
+-        sal_uInt32				GetGroupsClosed();
+-        void					SkipCurrentGroup();
+-        void					ResetGroupTable( sal_uInt32 nCount );
+-        void					ClearGroupTable();
+-        sal_Bool                EnterGroup( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & rIndex );
+-        sal_Bool				GetNextGroupEntry();
+-                                GroupTable();
+-                                ~GroupTable();
+-};
+-
+-class PropValue
+-{
+-    protected :
+-
+-        ::com::sun::star::uno::Any								mAny;
+-
+-        ::com::sun::star::uno::Reference
+-            < ::com::sun::star::beans::XPropertySet	>			mXPropSet;
+-
+-        sal_Bool	ImplGetPropertyValue( const String& rString );
+-        sal_Bool	ImplGetPropertyValue( const ::com::sun::star::uno::Reference
+-                        < ::com::sun::star::beans::XPropertySet > &, const String& );
+-
+-    public :
+-
+-        static sal_Bool GetPropertyValue(
+-                ::com::sun::star::uno::Any& rAny,
+-                    const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
+-                        const String& rPropertyName,
+-                            sal_Bool bTestPropertyAvailability = sal_False );
+-
+-        static ::com::sun::star::beans::PropertyState GetPropertyState(
+-                    const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > &,
+-                        const String& rPropertyName );
+-};
+-
+-class PropStateValue : public PropValue
+-{
+-    protected :
+-
+-        ::com::sun::star::beans::PropertyState					ePropState;
+-        ::com::sun::star::uno::Reference
+-            < ::com::sun::star::beans::XPropertyState >			mXPropState;
+-
+-        sal_Bool	ImplGetPropertyValue( const String& rString, sal_Bool bGetPropertyState = TRUE );
+-
+-};
+-
+-// ------------------------------------------------------------------------
+-
+-struct FieldEntry;
+-class PortionObj : public PropStateValue
+-{
+-
+-    friend class ParagraphObj;
+-
+-    protected :
+-
+-        void			ImplClear();
+-        void			ImplConstruct( PortionObj& rPortionObj );
+-        sal_uInt32		ImplGetTextField( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & rXTextRangeRef,
+-                            const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef, String& rURL );
+-        sal_uInt32		ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
+-        void			ImplGetPortionValues( FontCollection& rFontCollection, sal_Bool bGetPropStateValue = FALSE );
+-
+-    public :
+-
+-        ::com::sun::star::beans::PropertyState	meCharColor;
+-        ::com::sun::star::beans::PropertyState	meCharHeight;
+-        ::com::sun::star::beans::PropertyState	meFontName;
+-        ::com::sun::star::beans::PropertyState	meAsianOrComplexFont;
+-        ::com::sun::star::beans::PropertyState	meCharEscapement;
+-        ::com::sun::star::lang::Locale			meCharLocale;
+-        sal_uInt16		mnCharAttrHard;
+-
+-        sal_uInt32		mnCharColor;
+-        sal_uInt16		mnCharAttr;
+-        sal_uInt16		mnCharHeight;
+-        sal_uInt16		mnFont;
+-        sal_uInt16		mnAsianOrComplexFont;
+-        sal_Int16		mnCharEscapement;
+-
+-        sal_uInt32		mnTextSize;
+-        sal_Bool		mbLastPortion;
+-
+-        sal_uInt16*		mpText;
+-        FieldEntry*		mpFieldEntry;
+-
+-                        PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & rXTextRangeRef,
+-                                        sal_Bool bLast, FontCollection& rFontCollection );
+-                        PortionObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef,
+-                                        FontCollection& rFontCollection );
+-                        PortionObj( PortionObj& rPortionObj );
+-                        ~PortionObj();
+-
+-        void			Write( SvStream* pStrm, sal_Bool bLast );
+-        sal_uInt32		Count() const { return mnTextSize; };
+-
+-        PortionObj&		operator=( PortionObj& rPortionObj );
+-};
+-
+-struct ParaFlags
+-{
+-    sal_Bool	bFirstParagraph : 1;
+-    sal_Bool	bLastParagraph	: 1;
+-
+-                    ParaFlags() { bFirstParagraph = TRUE; bLastParagraph = FALSE; };
+-};
+-
+-class ParagraphObj : public List, public PropStateValue, public SOParagraph
+-{
+-    friend class TextObj;
+-    friend struct PPTExParaSheet;
+-
+-        MapMode			maMapModeSrc;
+-        MapMode			maMapModeDest;
+-
+-    protected :
+-
+-        void			ImplConstruct( ParagraphObj& rParagraphObj );
+-        void			ImplClear();
+-        sal_uInt32		ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
+-        ::com::sun::star::awt::Size			ImplMapSize( const ::com::sun::star::awt::Size& rSize );
+-        void			ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Bool bGetPropStateValue = FALSE );
+-        void			ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int16 nDepth, sal_Bool bIsBullet, sal_Bool bGetPropStateValue = FALSE );
+-
+-    public :
+-
+-        ::com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > maTabStop;
+-
+-        sal_uInt32			mnTextSize;
+-
+-        sal_Bool			mbIsBullet;
+-        sal_Bool			mbFirstParagraph;
+-        sal_Bool			mbLastParagraph;
+-
+-        ::com::sun::star::beans::PropertyState	meBullet;
+-        ::com::sun::star::beans::PropertyState	meTextAdjust;
+-        ::com::sun::star::beans::PropertyState	meLineSpacing;
+-        ::com::sun::star::beans::PropertyState	meLineSpacingTop;
+-        ::com::sun::star::beans::PropertyState	meLineSpacingBottom;
+-        ::com::sun::star::beans::PropertyState	meForbiddenRules;
+-        ::com::sun::star::beans::PropertyState	meParagraphPunctation;
+-        ::com::sun::star::beans::PropertyState	meBiDi;
+-
+-        sal_uInt16								mnTextAdjust;
+-        sal_Int16								mnLineSpacing;
+-        sal_Bool								mbFixedLineSpacing;
+-        sal_Int16								mnLineSpacingTop;
+-        sal_Int16								mnLineSpacingBottom;
+-        sal_Bool								mbForbiddenRules;
+-        sal_Bool								mbParagraphPunctation;
+-        sal_uInt16								mnBiDi;
+-
+-                        ParagraphObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContentRef,
+-                            ParaFlags, FontCollection& rFontCollection,
+-                                PPTExBulletProvider& rBuProv );
+-                        ParagraphObj( ParagraphObj& rParargraphObj );
+-                        ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef,
+-                                        PPTExBulletProvider& rBuProv );
+-
+-        void			CalculateGraphicBulletSize( sal_uInt16 nFontHeight );
+-                        ~ParagraphObj();
+-
+-        void			Write( SvStream* pStrm );
+-        sal_uInt32			Count() const { return mnTextSize; };
+-
+-        ParagraphObj&	operator=( ParagraphObj& rParagraphObj );
+-};
+-
+-struct ImplTextObj
+-{
+-    sal_uInt32		mnRefCount;
+-    sal_uInt32		mnTextSize;
+-    int				mnInstance;
+-    List*			mpList;
+-    sal_Bool		mbHasExtendedBullets;
+-    sal_Bool		mbFixedCellHeightUsed;
+-
+-                    ImplTextObj( int nInstance );
+-                    ~ImplTextObj();
+-};
+-
+-class TextObj
+-{
+-        ImplTextObj*	mpImplTextObj;
+-        void			ImplCalculateTextPositions();
+-
+-    public :
+-                        TextObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSimpleText > &
+-                                    rXText, int nInstance, FontCollection& rFontCollection, PPTExBulletProvider& rBuProv );
+-                        TextObj( TextObj& rTextObj );
+-                        ~TextObj();
+-
+-        void			Write( SvStream* pStrm );
+-
+-        ParagraphObj*	First(){ return (ParagraphObj*)mpImplTextObj->mpList->First(); };
+-        ParagraphObj*	Next(){ return(ParagraphObj*)mpImplTextObj->mpList->Next(); };
+-        sal_uInt32		Count() const { return mpImplTextObj->mnTextSize; };
+-        int				GetInstance() const { return mpImplTextObj->mnInstance; };
+-        sal_Bool		HasExtendedBullets(){ return mpImplTextObj->mbHasExtendedBullets; };
+-        void			WriteTextSpecInfo( SvStream* pStrm );
+-
+-        TextObj&		operator=( TextObj& rTextObj );
++    void			Write( SvStream* pStrm );
++    void			WriteTextSpecInfo( SvStream* pStrm );
+ };
+ 
+ // ------------------------------------------------------------------------
+ struct CellBorder;
+-class PPTWriter : public GroupTable, public PropValue, public PPTExBulletProvider
++class PPTWriter : public PPTWriterBase, public PPTExBulletProvider
+ {
++        sal_uInt32                      mnCnvrtFlags;
+         sal_Bool						mbStatus;
+         sal_Bool						mbUseNewAnimations;
+         sal_uInt32						mnStatMaxValue;
+         sal_uInt32						mnLatestStatValue;
+-        std::vector< PPTExStyleSheet* >	maStyleSheetList;
+-        PPTExStyleSheet*				mpStyleSheet;
+ 
+         EscherGraphicProvider*			mpGraphicProvider;
+-        Fraction						maFraction;
+-        MapMode							maMapModeSrc;
+-        MapMode							maMapModeDest;
+-        ::com::sun::star::awt::Size		maDestPageSize;
+-        ::com::sun::star::awt::Size		maNotesPageSize;
+-        PageType						meLatestPageType;
+         List							maSlideNameList;
+ 
+-        ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >					mXModel;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator >		mXStatusIndicator;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPagesSupplier >	mXDrawPagesSupplier;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XMasterPagesSupplier >	mXMasterPagesSupplier;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages	>			mXDrawPages;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >			mXDrawPage;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >			mXPagePropSet;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >			mXBackgroundPropSet;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >  			mXShapes;
+-        ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape	>				mXShape;
+         ::com::sun::star::uno::Reference< ::com::sun::star::text::XSimpleText >				mXText;				// TextRef des globalen Text
+         ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >				mXCursor;
+         ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >				mXCursorText;		// TextRef des Teilstuecks des Cursors
+         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet	>			mXCursorPropSet;	// die Properties des Teilstueckes
+         ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextField >				mXTextField;
+-        ::com::sun::star::awt::Size			maSize;
+-        ::com::sun::star::awt::Point		maPosition;
+-        Rectangle			maRect;
+-        ByteString			mType;
+-        sal_Bool			mbPresObj;
+-        sal_Bool			mbEmptyPresObj;
+-        sal_Bool			mbStatusIndicator;
+-        sal_Int32			mnAngle;
+         sal_uInt32			mnTextStyle;
+ 
+         sal_Bool			mbFontIndependentLineSpacing;
+@@ -744,8 +202,6 @@ class PPTWriter : public GroupTable, public PropValue, public PPTExBulletProvide
+         sal_uInt32			mnExEmbed;
+         SvMemoryStream*		mpExEmbed;
+ 
+-        sal_uInt32			mnPages;			// anzahl einzelner Slides ( ohne masterpages & notes & handout )
+-        sal_uInt32			mnMasterPages;		//
+         sal_uInt32			mnDrawings;			// anzahl Slides +  masterpages + notes +  handout
+         sal_uInt32			mnPagesWritten;
+         sal_uInt32			mnUniqueSlideIdentifier;
+@@ -757,13 +213,10 @@ class PPTWriter : public GroupTable, public PropValue, public PPTExBulletProvide
+         sal_uInt32			mnShapeMasterTitle;
+         sal_uInt32			mnShapeMasterBody;
+ 
+-        List				maTextRuleList;		// TextRuleEntry's
+         List				maHyperlink;
+ 
+-        FontCollection			maFontCollection;
+         ppt::ExSoundCollection	maSoundCollection;
+ 
+-        PHLayout&			ImplGetLayout( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet ) const;
+         void				ImplWriteExtParaHeader( SvMemoryStream& rSt, sal_uInt32 nRef, sal_uInt32 nInstance, sal_uInt32 nSlideId );
+ 
+ 
+@@ -778,29 +231,22 @@ class PPTWriter : public GroupTable, public PropValue, public PPTExBulletProvide
+ 
+     protected:
+ 
+-        sal_Bool			ImplCreateDocumentSummaryInformation( sal_uInt32 nCnvrtFlags );
++        sal_Bool			ImplCreateDocumentSummaryInformation();
+         sal_Bool			ImplCreateCurrentUserStream();
+         void				ImplCreateHeaderFooterStrings( SvStream& rOut,
+                                 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPagePropSet );
+         void				ImplCreateHeaderFooters( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPagePropSet );
+-        sal_Bool			ImplCreateDocument();
++        virtual sal_Bool	ImplCreateDocument();
+         sal_Bool			ImplCreateHyperBlob( SvMemoryStream& rStream );
+         sal_uInt32			ImplInsertBookmarkURL( const String& rBookmark, const sal_uInt32 nType,
+             const String& rStringVer0, const String& rStringVer1, const String& rStringVer2, const String& rStringVer3 );
+-        sal_Bool			ImplCreateMaster( sal_uInt32 nPageNum );
+-        sal_Bool			ImplCreateMainNotes();
+-        sal_Bool			ImplCreateSlide( sal_uInt32 nPageNum );
++        virtual sal_Bool	ImplCreateMainNotes();
+         sal_Bool			ImplCreateNotes( sal_uInt32 nPageNum );
+         void				ImplWriteBackground( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXBackgroundPropSet );
+-        void				ImplWriteVBA( SvMemoryStream* pVBA );
+-        void				ImplWriteOLE( sal_uInt32 nCnvrtFlags );
++        void				ImplWriteVBA();
++        void				ImplWriteOLE();
+         sal_Bool			ImplWriteAtomEnding();
+ 
+-        sal_Bool			ImplInitSOIface();
+-        sal_Bool			ImplSetCurrentStyleSheet( sal_uInt32 nPageNum );
+-        sal_Bool			ImplGetPageByIndex( sal_uInt32 nIndex, PageType );
+-        sal_Bool			ImplGetShapeByIndex( sal_uInt32 nIndex, sal_Bool bGroup = FALSE );
+-        sal_uInt32			ImplGetMasterIndex( PageType ePageType );
+         void				ImplFlipBoundingBox( EscherPropertyContainer& rPropOpt );
+         sal_Bool			ImplGetText();
+         sal_Bool			ImplCreatePresentationPlaceholder( const sal_Bool bMaster, const PageType PageType,
+@@ -814,7 +260,6 @@ class PPTWriter : public GroupTable, public PropValue, public PPTExBulletProvide
+                                 ::com::sun::star::presentation::AnimationEffect eTextEffect,
+                                 sal_uInt16 nOrder );
+         void				ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentation::ClickAction eAction, sal_Bool bMediaClickAction );
+-        sal_Bool			ImplGetStyleSheets();
+         void				ImplWriteParagraphs( SvStream& rOutStrm, TextObj& rTextObj );
+         void				ImplWritePortions( SvStream& rOutStrm, TextObj& rTextObj );
+         void				ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_uInt32 nAtomInstance,
+@@ -831,13 +276,15 @@ class PPTWriter : public GroupTable, public PropValue, public PPTExBulletProvide
+         void				ImplCreateCellBorder( const CellBorder* pCellBorder, sal_Int32 nX1, sal_Int32 nY1, sal_Int32 nX2, sal_Int32 nY2 );
+         void				ImplCreateTable( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rXShape, EscherSolverContainer& aSolverContainer,
+                                 EscherPropertyContainer& aPropOpt );
+-        ::com::sun::star::awt::Point		ImplMapPoint( const ::com::sun::star::awt::Point& );
+-        ::com::sun::star::awt::Size			ImplMapSize( const ::com::sun::star::awt::Size& );
+-        Rectangle							ImplMapRectangle( const ::com::sun::star::awt::Rectangle& );
+ 
+         sal_Bool							ImplCloseDocument();		// die font-, hyper-, Soundliste wird geschrieben ..
+         void								ImplWriteCString( SvStream&, const String&, sal_uInt32 nInstance = 0 );
+ 
++        virtual void        ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterID, sal_uInt16 nMode,
++                                            sal_Bool bHasBackground, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXBackgroundPropSet );
++        virtual void        ImplWriteNotes( sal_uInt32 nPageNum );
++        virtual void        ImplWriteSlideMaster( sal_uInt32 nPageNum, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXBackgroundPropSet );
++
+     public:
+                                 PPTWriter( SvStorageRef& rSvStorage,
+                                             ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel,
+@@ -847,6 +294,9 @@ class PPTWriter : public GroupTable, public PropValue, public PPTExBulletProvide
+                                 ~PPTWriter();
+ 
+         sal_Bool				IsValid() const { return mbStatus; };
++
++        virtual void exportPPTPre();
++        virtual void exportPPTPost();
+ };
+ 
+ 
+diff --git sd/source/filter/pptx/epptbase.hxx sd/source/filter/pptx/epptbase.hxx
+new file mode 100644
+index 0000000..b92362f
+--- /dev/null
++++ sd/source/filter/pptx/epptbase.hxx
+@@ -0,0 +1,411 @@
++#ifndef EPP_EPPTBASE_HXX
++#define EPP_EPPTBASE_HXX
++
++#include "grouptable.hxx"
++#include <vector>
++#include <vcl/mapmod.hxx>
++#include <tools/list.hxx>
++#include <tools/string.hxx>
++#include <tools/stream.hxx>
++#include <tools/gen.hxx>
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
++#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
++#include <com/sun/star/drawing/XMasterPageTarget.hpp>
++#include <com/sun/star/frame/XModel.hpp>
++#include <com/sun/star/presentation/XPresentationSupplier.hpp>
++#include <com/sun/star/presentation/FadeEffect.hpp>
++#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
++
++// PLACEMENT_ID
++#define EPP_LAYOUT_TITLESLIDE             0 /* The slide is a title slide                                                             */
++#define EPP_LAYOUT_TITLEANDBODYSLIDE      1 /* Title and body slide                                                                   */
++#define EPP_LAYOUT_TITLEMASTERSLIDE       2 /* Title master slide                                                                     */
++#define	EPP_LAYOUT_MASTERSLIDE            3 /* Master slide layout                                                                    */
++#define EPP_LAYOUT_MASTERNOTES            4 /* Master notes layout                                                                    */
++#define EPP_LAYOUT_NOTESTITLEBODY         5 /* Notes title/body layout                                                                */
++#define EPP_LAYOUT_HANDOUTLAYOUT          6 /* Handout layout, therefore it doesn't have placeholders except header, footer, and date */
++#define EPP_LAYOUT_ONLYTITLE              7 /* Only title placeholder                                                                 */
++#define EPP_LAYOUT_2COLUMNSANDTITLE       8 /* Body of the slide has 2 columns and a title                                            */
++#define EPP_LAYOUT_2ROWSANDTITLE          9 /* Slide's body has 2 rows and a title                                                    */
++#define EPP_LAYOUT_RIGHTCOLUMN2ROWS      10 /* Body contains 2 columns, right column has 2 rows                                       */
++#define EPP_LAYOUT_LEFTCOLUMN2ROWS       11 /* Body contains 2 columns, left column has 2 rows                                        */
++#define EPP_LAYOUT_BOTTOMROW2COLUMNS     12 /* Body contains 2 rows, bottom row has 2 columns                                         */
++#define EPP_LAYOUT_TOPROW2COLUMN         13 /* Body contains 2 rows, top row has 2 columns                                            */
++#define EPP_LAYOUT_4OBJECTS              14 /* 4 objects                                                                              */
++#define EPP_LAYOUT_BIGOBJECT             15 /* Big object                                                                             */
++#define EPP_LAYOUT_BLANCSLIDE            16 /* Blank slide                                                                            */
++#define EPP_LAYOUT_TITLERIGHTBODYLEFT    17 /* Vertical title on the right, body on the left                                          */
++#define EPP_LAYOUT_TITLERIGHT2BODIESLEFT 18 /* Vertical title on the right, body on the left split into 2 rows                        */
++
++#define EPP_LAYOUT_SIZE 25
++
++class PptEscherEx;
++
++struct PHLayout
++{
++    sal_Int32	nLayout;
++    sal_uInt8	nPlaceHolder[ 8 ];
++
++    sal_uInt8	nUsedObjectPlaceHolder;
++    sal_uInt8	nTypeOfTitle;
++    sal_uInt8	nTypeOfOutliner;
++
++    BOOL	bTitlePossible;
++    BOOL	bOutlinerPossible;
++    BOOL	bSecOutlinerPossible;
++};
++
++enum PageType { NORMAL = 0, MASTER = 1, NOTICE = 2, UNDEFINED = 3 };
++
++class PropValue
++{
++    protected :
++
++        ::com::sun::star::uno::Any								mAny;
++
++        ::com::sun::star::uno::Reference
++            < ::com::sun::star::beans::XPropertySet	>			mXPropSet;
++
++        sal_Bool	ImplGetPropertyValue( const String& rString );
++        sal_Bool	ImplGetPropertyValue( const ::com::sun::star::uno::Reference
++                        < ::com::sun::star::beans::XPropertySet > &, const String& );
++
++    public :
++
++        PropValue() {}
++
++        PropValue( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet )
++            : mXPropSet( rXPropSet )
++        {}
++
++        ::com::sun::star::uno::Any GetAny() { return mAny; }
++
++        static sal_Bool GetPropertyValue(
++                ::com::sun::star::uno::Any& rAny,
++                    const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
++                        const String& rPropertyName,
++                            sal_Bool bTestPropertyAvailability = sal_False );
++
++        static ::com::sun::star::beans::PropertyState GetPropertyState(
++                    const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > &,
++                        const String& rPropertyName );
++};
++
++class EscherGraphicProvider;
++class PPTExBulletProvider
++{
++    friend struct PPTExParaSheet;
++
++    protected :
++
++        SvMemoryStream			aBuExPictureStream;
++        SvMemoryStream			aBuExOutlineStream;
++        SvMemoryStream			aBuExMasterStream;
++
++        EscherGraphicProvider*	pGraphicProv;
++
++    public :
++
++        sal_uInt16				GetId( const ByteString& rUniqueId, Size& rGraphicSize );
++
++                                PPTExBulletProvider();
++                                ~PPTExBulletProvider();
++};
++
++struct FontCollectionEntry
++{
++        String					Name;
++        double                  Scaling;
++        sal_Int16				Family;
++        sal_Int16				Pitch;
++        sal_Int16				CharSet;
++
++        String                  Original;
++        sal_Bool                bIsConverted;
++
++        FontCollectionEntry( const String& rName, sal_Int16 nFamily, sal_Int16 nPitch, sal_Int16 nCharSet ) :
++                            Scaling ( 1.0 ),
++                            Family	( nFamily ),
++                            Pitch	( nPitch ),
++                            CharSet	( nCharSet ),
++                            Original( rName )
++                            {
++                                ImplInit( rName );
++                            };
++
++        FontCollectionEntry( const String& rName ) :
++                            Scaling ( 1.0 ),
++                            Original( rName )
++                            {
++                                ImplInit( rName );
++                            };
++        ~FontCollectionEntry();
++
++    private :
++
++        FontCollectionEntry() {};
++
++        void ImplInit( const String& rName );
++};
++
++class VirtualDevice;
++class FontCollection : private List
++{
++        VirtualDevice* pVDev;
++    public :
++                    FontCollection();
++                    ~FontCollection();
++
++        short		GetScriptDirection( const String& rText ) const;
++        sal_uInt32	GetId( FontCollectionEntry& rFontDescriptor );
++    sal_uInt32	GetCount() const { return List::Count(); };
++        const FontCollectionEntry*						GetById( sal_uInt32 nId );
++        FontCollectionEntry&	GetLast() { return *(FontCollectionEntry*)List::Last(); };
++};
++
++// ------------------------------------------------------------------------
++
++#define PPTEX_STYLESHEETENTRYS	9
++
++enum PPTExTextAttr
++{
++    ParaAttr_BulletOn,
++    ParaAttr_BuHardFont,
++    ParaAttr_BuHardColor,
++    ParaAttr_BuHardHeight,
++    ParaAttr_BulletChar,
++    ParaAttr_BulletFont,
++    ParaAttr_BulletHeight,
++    ParaAttr_BulletColor,
++    ParaAttr_Adjust,
++    ParaAttr_LineFeed,
++    ParaAttr_UpperDist,
++    ParaAttr_LowerDist,
++    ParaAttr_TextOfs,
++    ParaAttr_BulletOfs,
++    ParaAttr_DefaultTab,
++    ParaAttr_AsianLB_1,
++    ParaAttr_AsianLB_2,
++    ParaAttr_AsianLB_3,
++    ParaAttr_BiDi,
++    CharAttr_Bold,
++    CharAttr_Italic,
++    CharAttr_Underline,
++    CharAttr_Shadow,
++    CharAttr_Strikeout,
++    CharAttr_Embossed,
++    CharAttr_Font,
++    CharAttr_AsianOrComplexFont,
++    CharAttr_Symbol,
++    CharAttr_FontHeight,
++    CharAttr_FontColor,
++    CharAttr_Escapement
++};
++
++struct PPTExCharLevel
++{
++    sal_uInt16		mnFlags;
++    sal_uInt16		mnFont;
++    sal_uInt16		mnAsianOrComplexFont;
++    sal_uInt16		mnFontHeight;
++    sal_uInt16		mnEscapement;
++    sal_uInt32		mnFontColor;
++};
++
++struct PPTExCharSheet
++{
++                PPTExCharLevel	maCharLevel[ 5 ];
++
++                PPTExCharSheet( int nInstance );
++
++                void	SetStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
++                                        FontCollection& rFontCollection, int nLevel );
++                void	Write( SvStream& rSt, PptEscherEx* pEx, sal_uInt16 nLev, sal_Bool bFirst, sal_Bool bSimpleText,
++                            const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rPagePropSet );
++
++};
++
++struct PPTExParaLevel
++{
++    sal_Bool	    mbIsBullet;
++    sal_uInt16		mnBulletChar;
++    sal_uInt16		mnBulletFont;
++    sal_uInt16		mnBulletHeight;
++    sal_uInt32		mnBulletColor;
++
++    sal_uInt16		mnAdjust;
++    sal_Int16		mnOOAdjust;
++    sal_uInt16		mnLineFeed;
++    sal_uInt16		mnUpperDist;
++    sal_uInt16		mnLowerDist;
++    sal_uInt16		mnTextOfs;
++    sal_uInt16		mnBulletOfs;
++    sal_uInt16		mnDefaultTab;
++
++    sal_Bool		mbExtendedBulletsUsed;
++    sal_uInt16		mnBulletId;
++    sal_uInt16		mnBulletStart;
++    sal_uInt32		mnMappedNumType;
++    sal_uInt32		mnNumberingType;
++    sal_uInt16      mnAsianSettings;
++    sal_uInt16		mnBiDi;
++};
++
++struct PPTExParaSheet
++{
++                PPTExBulletProvider& rBuProv;
++
++                sal_uInt32	mnInstance;
++
++                PPTExParaLevel	maParaLevel[ 5 ];
++                PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBulletProvider& rProv );
++
++                void	SetStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
++                                        FontCollection& rFontCollection, int nLevel, const PPTExCharLevel& rCharLevel );
++                void	Write( SvStream& rSt, PptEscherEx* pEx, sal_uInt16 nLev, sal_Bool bFirst, sal_Bool bSimpleText,
++                    const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rPagePropSet );
++};
++
++class PPTExStyleSheet
++{
++
++    public :
++
++                PPTExCharSheet*		mpCharSheet[ PPTEX_STYLESHEETENTRYS ];
++                PPTExParaSheet*		mpParaSheet[ PPTEX_STYLESHEETENTRYS ];
++
++                PPTExStyleSheet( sal_uInt16 nDefaultTab, PPTExBulletProvider& rBuProv );
++                ~PPTExStyleSheet();
++
++                PPTExParaSheet& GetParaSheet( int nInstance ) { return *mpParaSheet[ nInstance ]; };
++                PPTExCharSheet& GetCharSheet( int nInstance ) { return *mpCharSheet[ nInstance ]; };
++
++                void			SetStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
++                                                FontCollection& rFontCollection, int nInstance, int nLevel );
++                sal_Bool		IsHardAttribute( sal_uInt32 nInstance, sal_uInt32 nLevel, PPTExTextAttr eAttr, sal_uInt32 nValue );
++
++                sal_uInt32		SizeOfTxCFStyleAtom() const;
++                void			WriteTxCFStyleAtom( SvStream& rSt );
++};
++
++// ------------------------------------------------------------------------
++
++class PPTWriterBase : public PropValue, public GroupTable
++{
++protected:
++    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >					mXModel;
++    ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator >		mXStatusIndicator;
++
++    sal_Bool			mbStatusIndicator;
++
++    ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPagesSupplier >	mXDrawPagesSupplier;
++    ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XMasterPagesSupplier >	mXMasterPagesSupplier;
++    ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages	>			mXDrawPages;
++    ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >			mXDrawPage;
++    ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >			mXPagePropSet;
++    ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >			mXBackgroundPropSet;
++    ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >  			mXShapes;
++    ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape	>				mXShape;
++    ::com::sun::star::awt::Size			maSize;
++    ::com::sun::star::awt::Point		maPosition;
++    Rectangle			maRect;
++    ByteString			mType;
++    sal_Bool			mbPresObj;
++    sal_Bool			mbEmptyPresObj;
++    sal_Int32			mnAngle;
++
++    sal_uInt32			mnPages;			// number of Slides ( w/o master pages & notes & handout )
++    sal_uInt32			mnMasterPages;
++
++    Fraction						maFraction;
++    MapMode							maMapModeSrc;
++    MapMode							maMapModeDest;
++    ::com::sun::star::awt::Size		maDestPageSize;
++    ::com::sun::star::awt::Size		maNotesPageSize;
++
++    PageType			            meLatestPageType;
++    std::vector< PPTExStyleSheet* >	maStyleSheetList;
++    PPTExStyleSheet*				mpStyleSheet;
++
++    FontCollection		maFontCollection;
++
++    List				maTextRuleList;		// TextRuleEntry's
++
++    virtual void ImplWriteSlide( sal_uInt32 /* nPageNum */, sal_uInt32 /* nMasterNum */, sal_uInt16 /* nMode */,
++                                 sal_Bool /* bHasBackground */, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > /* aXBackgroundPropSet */ ) {}
++    virtual void ImplWriteNotes( sal_uInt32 nPageNum ) = 0;
++    virtual void ImplWriteSlideMaster( sal_uInt32 /* nPageNum */, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > /* aXBackgroundPropSet */ ) {}
++    virtual void ImplWriteLayout( sal_Int32 /* nOffset */, sal_uInt32 /* nMasterNum */ ) {}
++
++    virtual void exportPPTPre() {}
++    virtual void exportPPTPost() {}
++
++    virtual sal_Bool ImplCreateDocument()=0;
++    virtual sal_Bool ImplCreateMainNotes()=0;
++
++    sal_Bool GetStyleSheets();
++    sal_Bool GetShapeByIndex( sal_uInt32 nIndex, sal_Bool bGroup = FALSE );
++
++    sal_Bool CreateMainNotes();
++
++    ::com::sun::star::awt::Size	  MapSize( const ::com::sun::star::awt::Size& );
++    ::com::sun::star::awt::Point  MapPoint( const ::com::sun::star::awt::Point& );
++    Rectangle                     MapRectangle( const ::com::sun::star::awt::Rectangle& );
++
++    sal_Bool ContainsOtherShapeThanPlaceholders( sal_Bool bForOOMLX );
++
++public:
++    PPTWriterBase();
++    PPTWriterBase( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel,
++                   const ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > & rStatInd );
++
++    ~PPTWriterBase();
++
++    void exportPPT();
++
++    sal_Bool InitSOIface();
++    sal_Bool GetPageByIndex( sal_uInt32 nIndex, PageType );
++    sal_uInt32 GetMasterIndex( PageType ePageType );
++    sal_Bool SetCurrentStyleSheet( sal_uInt32 nPageNum );
++
++    sal_Bool GetPresObj() { return mbPresObj; }
++
++    PHLayout& GetLayout( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet ) const;
++    PHLayout& GetLayout( sal_Int32 nOffset ) const;
++    sal_Int32 GetLayoutOffset( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet ) const;
++
++    sal_Bool CreateSlide( sal_uInt32 nPageNum );
++    sal_Bool CreateSlideMaster( sal_uInt32 nPageNum );
++    sal_Bool CreateNotes( sal_uInt32 nPageNum );
++
++    static sal_Int8 GetTransition( sal_Int16 nTransitionType, sal_Int16 nTransitionSubtype, ::com::sun::star::presentation::FadeEffect eEffect, sal_uInt8& nDirection );
++    static sal_Int8 GetTransition( ::com::sun::star::presentation::FadeEffect eEffect, sal_uInt8& nDirection );
++};
++
++#define PPT_TRANSITION_TYPE_NONE            0
++#define PPT_TRANSITION_TYPE_RANDOM          1
++#define PPT_TRANSITION_TYPE_BLINDS          2
++#define PPT_TRANSITION_TYPE_CHECKER         3
++#define PPT_TRANSITION_TYPE_COVER           4
++#define PPT_TRANSITION_TYPE_DISSOLVE        5
++#define PPT_TRANSITION_TYPE_FADE            6
++#define PPT_TRANSITION_TYPE_PULL            7
++#define PPT_TRANSITION_TYPE_RANDOM_BARS     8
++#define PPT_TRANSITION_TYPE_STRIPS          9
++#define PPT_TRANSITION_TYPE_WIPE           10
++#define PPT_TRANSITION_TYPE_ZOOM           11
++#define PPT_TRANSITION_TYPE_SPLIT          13
++
++// effects, new in xp
++#define PPT_TRANSITION_TYPE_DIAMOND		17
++#define PPT_TRANSITION_TYPE_PLUS		18
++#define PPT_TRANSITION_TYPE_WEDGE		19
++#define PPT_TRANSITION_TYPE_PUSH		20
++#define PPT_TRANSITION_TYPE_COMB		21
++#define PPT_TRANSITION_TYPE_NEWSFLASH		22
++#define PPT_TRANSITION_TYPE_SMOOTHFADE		23
++#define PPT_TRANSITION_TYPE_WHEEL		26
++#define PPT_TRANSITION_TYPE_CIRCLE		27
++
++#endif
+diff --git sd/source/filter/pptx/epptooxml.hxx sd/source/filter/pptx/epptooxml.hxx
+new file mode 100644
+index 0000000..2a49d1f
+--- /dev/null
++++ sd/source/filter/pptx/epptooxml.hxx
+@@ -0,0 +1,120 @@
++#ifndef EPPT_POWERPOINT_EXPORT_HXX
++#define EPPT_POWERPOINT_EXPORT_HXX
++
++#include <oox/core/xmlfilterbase.hxx>
++#include <oox/helper/zipstorage.hxx>
++
++#include "epptbase.hxx"
++
++namespace oox {
++    namespace drawingml {
++        class ShapeExport;
++    }
++namespace core {
++
++class PowerPointShapeExport;
++
++struct LayoutInfo
++{
++    std::vector< sal_Int32 > mnFileIdArray;
++};
++
++enum PlaceholderType
++{
++    None,
++    SlideImage,
++    Notes,
++    Header,
++    Footer,
++    SlideNumber,
++    DateAndTime,
++    Outliner,
++    Title,
++    Subtitle
++};
++
++class PowerPointExport : public XmlFilterBase, public PPTWriterBase
++{
++    friend class PowerPointShapeExport;
++public:
++
++    PowerPointExport( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr  );
++    ~PowerPointExport();
++
++    // from FilterBase
++    virtual bool importDocument() throw();
++    virtual bool exportDocument() throw();
++
++    // only needed for import, leave them empty, refactor later XmlFilterBase to export and import base?
++    virtual sal_Int32 getSchemeClr( sal_Int32 /* nColorSchemeToken */ ) const { return 0; }
++    virtual const oox::vml::DrawingPtr getDrawings() { return oox::vml::DrawingPtr(); }
++    virtual const oox::drawingml::Theme* getCurrentTheme() const { return NULL; }
++    virtual const oox::drawingml::table::TableStyleListPtr getTableStyles() { return oox::drawingml::table::TableStyleListPtr(); }
++    virtual oox::drawingml::chart::ChartConverter& getChartConverter();
++
++    static const char* GetSideDirection( sal_uInt8 nDirection );
++    static const char* GetCornerDirection( sal_uInt8 nDirection );
++    static const char* Get8Direction( sal_uInt8 nDirection );
++
++protected:
++
++    virtual void ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_uInt16 nMode,
++                                 sal_Bool bHasBackground, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXBackgroundPropSet );
++    virtual void ImplWriteNotes( sal_uInt32 nPageNum );
++    virtual void ImplWriteSlideMaster( sal_uInt32 nPageNum, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXBackgroundPropSet );
++    virtual void ImplWriteLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum );
++    void WriteTheme( sal_Int32 nThemeNum );
++
++    virtual sal_Bool ImplCreateDocument();
++    virtual sal_Bool ImplCreateMainNotes();
++
++    sal_Bool WriteNotesMaster();
++
++    void WriteTextStyles( ::sax_fastparser::FSHelperPtr pFS );
++    void WriteTextStyle( ::sax_fastparser::FSHelperPtr pFS, int nInstance, sal_Int32 xmlToken );
++    void WriteTextStyleLevel( ::sax_fastparser::FSHelperPtr pFS, int nInstance, int nLevel );
++    void ImplWriteBackground( ::sax_fastparser::FSHelperPtr pFS, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXBackgroundPropSet );
++
++    sal_Int32 GetLayoutFileId( sal_Int32 nOffset, sal_uInt32 nMasterNum );
++
++    // shapes
++    void WriteShapeTree( ::sax_fastparser::FSHelperPtr pFS, PageType ePageType, sal_Bool bMaster );
++
++    void WritePlaceholderShape( ::sax_fastparser::FSHelperPtr pFS, drawingml::ShapeExport& rDML, PlaceholderType ePlaceholder );
++    void WritePageShape( ::sax_fastparser::FSHelperPtr pFS, drawingml::ShapeExport& rDML, PageType ePageType );
++
++    // helper parts
++    sal_Bool WritePlaceholder( ::sax_fastparser::FSHelperPtr pFS, drawingml::ShapeExport& rDML, PlaceholderType ePlaceholder, sal_Bool bMaster );
++
++    sal_uInt32 GetNewSlideId() { return mnSlideIdMax ++; }
++    sal_uInt32 GetNewSlideMasterId() { return mnSlideMasterIdMax ++; }
++
++private:
++    void AddLayoutIdAndRelation( ::sax_fastparser::FSHelperPtr pFS, sal_Int32 nLayoutFileId );
++
++    virtual ::rtl::OUString implGetImplementationName() const;
++
++    ::boost::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
++
++    ::sax_fastparser::FSHelperPtr mPresentationFS;
++
++    LayoutInfo mLayoutInfo[EPP_LAYOUT_SIZE];
++    std::vector< ::sax_fastparser::FSHelperPtr > mpSlidesFSArray;
++    std::vector< ::sax_fastparser::FSHelperPtr > mpMasterFSArray;
++    sal_Int32 mnLayoutFileIdMax;
++
++    sal_uInt32 mnSlideIdMax;
++    sal_uInt32 mnSlideMasterIdMax;
++
++    sal_Int32 mnShapeIdMax;
++    sal_Int32 mnPictureIdMax;
++
++    sal_Bool mbCreateNotes;
++
++    static sal_Int32 nStyleLevelToken[5];
++};
++
++}
++}
++
++#endif
+diff --git sd/source/filter/pptx/grouptable.hxx sd/source/filter/pptx/grouptable.hxx
+new file mode 100644
+index 0000000..606158a
+--- /dev/null
++++ sd/source/filter/pptx/grouptable.hxx
+@@ -0,0 +1,58 @@
++#ifndef EPPT_GROUP_TABLE
++#define EPPT_GROUP_TABLE
++
++#include <com/sun/star/container/XIndexAccess.hpp>
++
++struct GroupEntry
++{
++    sal_uInt32					mnCurrentPos;
++    sal_uInt32					mnCount;
++    ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >			mXIndexAccess;
++
++    GroupEntry( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & rIndex )
++    {
++        mXIndexAccess = rIndex;
++        mnCount =mXIndexAccess->getCount();
++        mnCurrentPos = 0;
++    };
++
++    GroupEntry( sal_uInt32 nCount )
++    {
++        mnCount = nCount;
++        mnCurrentPos = 0;
++    };
++
++    ~GroupEntry(){};
++};
++
++
++class GroupTable
++{
++    protected:
++
++        sal_uInt32				mnIndex;
++        sal_uInt32				mnCurrentGroupEntry;
++        sal_uInt32				mnMaxGroupEntry;
++        sal_uInt32				mnGroupsClosed;
++        GroupEntry**			mpGroupEntry;
++
++        void					ImplResizeGroupTable( sal_uInt32 nEntrys );
++
++    public:
++
++        sal_uInt32				GetCurrentGroupIndex() const { return mnIndex; };
++        sal_Int32				GetCurrentGroupLevel() const { return mnCurrentGroupEntry - 1; };
++        ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > &
++                                GetCurrentGroupAccess() const { return mpGroupEntry[  mnCurrentGroupEntry - 1 ]->mXIndexAccess; };
++        sal_uInt32				GetGroupsClosed();
++        void					SkipCurrentGroup();
++        void					ResetGroupTable( sal_uInt32 nCount );
++        void					ClearGroupTable();
++        sal_Bool                EnterGroup( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & rIndex );
++        sal_Bool				GetNextGroupEntry();
++                                GroupTable();
++                                ~GroupTable();
++};
++
++
++#endif
+diff --git sd/source/filter/pptx/pptx-NOTES sd/source/filter/pptx/pptx-NOTES
+new file mode 100644
+index 0000000..1e2f168
+--- /dev/null
++++ sd/source/filter/pptx/pptx-NOTES
+@@ -0,0 +1,2 @@
++* ParaAdjust of empty text paragraph in shapes is by default set to left, but
++should be set to center. Same problem exist for ppt as well as pptx export
+diff --git sd/source/filter/pptx/pptx-eppt.cxx sd/source/filter/pptx/pptx-eppt.cxx
+index ac1b6ce..f47b032 100644
+--- sd/source/filter/pptx/pptx-eppt.cxx
++++ sd/source/filter/pptx/pptx-eppt.cxx
+@@ -59,62 +59,13 @@
+ #include <svx/msdffimp.hxx>
+ #include <svx/flditem.hxx>
+ #include <sfx2/docinf.hxx>
++#include <oox/export/utils.hxx>
+ 
+-#define PPT_TRANSITION_TYPE_NONE            0
+-#define PPT_TRANSITION_TYPE_RANDOM          1
+-#define PPT_TRANSITION_TYPE_BLINDS          2
+-#define PPT_TRANSITION_TYPE_CHECKER         3
+-#define PPT_TRANSITION_TYPE_COVER           4
+-#define PPT_TRANSITION_TYPE_DISSOLVE        5
+-#define PPT_TRANSITION_TYPE_FADE            6
+-#define PPT_TRANSITION_TYPE_PULL            7
+-#define PPT_TRANSITION_TYPE_RANDOM_BARS     8
+-#define PPT_TRANSITION_TYPE_STRIPS          9
+-#define PPT_TRANSITION_TYPE_WIPE           10
+-#define PPT_TRANSITION_TYPE_ZOOM           11
+-#define PPT_TRANSITION_TYPE_SPLIT          13
+-
+-// effects, new in xp
+-#define PPT_TRANSITION_TYPE_DIAMOND			17
+-#define PPT_TRANSITION_TYPE_PLUS			18
+-#define PPT_TRANSITION_TYPE_WEDGE			19
+-#define PPT_TRANSITION_TYPE_PUSH			20
+-#define PPT_TRANSITION_TYPE_COMB			21
+-#define PPT_TRANSITION_TYPE_NEWSFLASH		22
+-#define PPT_TRANSITION_TYPE_SMOOTHFADE		23
+-#define PPT_TRANSITION_TYPE_WHEEL			26
+-#define PPT_TRANSITION_TYPE_CIRCLE			27
+-
+-using namespace com::sun::star;
+-
+-static PHLayout pPHLayout[] =
+-{
+-    { EPP_LAYOUT_TITLESLIDE,			{ 0x0d, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x10, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_TITLEANDBODYSLIDE,		{ 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_TITLEANDBODYSLIDE,		{ 0x0d, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_2COLUMNSANDTITLE,		{ 0x0d, 0x0e, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, TRUE, TRUE, TRUE },
+-    { EPP_LAYOUT_2COLUMNSANDTITLE,		{ 0x0d, 0x0e, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_BLANCSLIDE,			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, FALSE, FALSE, FALSE },
+-    { EPP_LAYOUT_2COLUMNSANDTITLE,		{ 0x0d, 0x0e, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x16, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_2COLUMNSANDTITLE,		{ 0x0d, 0x14, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_TITLEANDBODYSLIDE,		{ 0x0d, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x15, 0x0d, 0x0e, TRUE, FALSE, FALSE },
+-    { EPP_LAYOUT_2COLUMNSANDTITLE,		{ 0x0d, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x16, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_2COLUMNSANDTITLE,		{ 0x0d, 0x0e, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_TITLEANDBODYSLIDE,		{ 0x0d, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, FALSE, FALSE },
+-    { EPP_LAYOUT_RIGHTCOLUMN2ROWS,		{ 0x0d, 0x0e, 0x13, 0x13, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_2COLUMNSANDTITLE,		{ 0x0d, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_2ROWSANDTITLE,			{ 0x0d, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_LEFTCOLUMN2ROWS,		{ 0x0d, 0x13, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_TOPROW2COLUMN,			{ 0x0d, 0x13, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_2ROWSANDTITLE,			{ 0x0d, 0x0e, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_4OBJECTS,				{ 0x0d, 0x13, 0x13, 0x13, 0x13, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, FALSE, FALSE },
+-    { EPP_LAYOUT_ONLYTITLE,				{ 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, TRUE, FALSE, FALSE },
+-    { EPP_LAYOUT_BLANCSLIDE,			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, FALSE, FALSE, FALSE },
+-    { EPP_LAYOUT_TITLERIGHT2BODIESLEFT, { 0x11, 0x12, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x11, 0x12, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_TITLERIGHTBODYLEFT,	{ 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x11, 0x12, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_TITLEANDBODYSLIDE,		{ 0x0d, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x12, TRUE, TRUE, FALSE },
+-    { EPP_LAYOUT_2COLUMNSANDTITLE,		{ 0x0d, 0x16, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x16, 0x0d, 0x12, TRUE, TRUE, FALSE }
+-};
++using namespace ::com::sun::star;
++using namespace ::com::sun::star::uno;
++using namespace ::com::sun::star::presentation;
++
++using ::com::sun::star::beans::XPropertySet;
+ 
+ //============================ PPTWriter ==================================
+ 
+@@ -122,16 +73,12 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage,
+             ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rXModel,
+             ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > & rXStatInd,
+             SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags ) :
++    PPTWriterBase           ( rXModel, rXStatInd ),
++    mnCnvrtFlags            ( nCnvrtFlags ),
+     mbStatus                ( sal_False ),
+     mbUseNewAnimations		( sal_True ),
+     mnLatestStatValue       ( 0 ),
+-    maFraction              ( 1, 576 ),
+-    maMapModeSrc            ( MAP_100TH_MM ),
+-    maMapModeDest           ( MAP_INCH, Point(), maFraction, maFraction ),
+-    meLatestPageType        ( NORMAL ),
+-    mXModel                 ( rXModel ),
+-    mXStatusIndicator       ( rXStatInd ),
+-    mbStatusIndicator       ( FALSE ),
++    mrStg                   ( rSvStorage ),
+     mpCurUserStrm           ( NULL ),
+     mpStrm                  ( NULL ),
+     mpPicStrm               ( NULL ),
+@@ -143,38 +90,10 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage,
+     mnPagesWritten          ( 0 ),
+     mnTxId                  ( 0x7a2f64 )
+ {
+-    sal_uInt32 i;
+-    if ( !ImplInitSOIface() )
+-        return;
+-
+-    FontCollectionEntry aDefaultFontDesc( String( RTL_CONSTASCII_USTRINGPARAM( "Times New Roman" ) ),
+-                                            ::com::sun::star::awt::FontFamily::ROMAN,
+-                                                ::com::sun::star::awt::FontPitch::VARIABLE,
+-                                                    RTL_TEXTENCODING_MS_1252 );
+-    maFontCollection.GetId( aDefaultFontDesc ); // default is always times new roman
+-
+-    if ( !ImplGetPageByIndex( 0, NOTICE ) )
+-        return;
+-    INT32 nWidth = 21000;
+-    if ( ImplGetPropertyValue( mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM(  "Width" ) ) ) )
+-        mAny >>= nWidth;
+-    INT32 nHeight = 29700;
+-    if ( ImplGetPropertyValue( mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ) )
+-        mAny >>= nHeight;
+-
+-    maNotesPageSize = ImplMapSize( ::com::sun::star::awt::Size( nWidth, nHeight ) );
++}
+ 
+-    if ( !ImplGetPageByIndex( 0, MASTER ) )
+-        return;
+-    nWidth = 28000;
+-    if ( ImplGetPropertyValue( mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ) )
+-        mAny >>= nWidth;
+-    nHeight = 21000;
+-    if ( ImplGetPropertyValue( mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ) )
+-        mAny >>= nHeight;
+-    maDestPageSize = ImplMapSize( ::com::sun::star::awt::Size( nWidth, nHeight ) );
+-
+-    mrStg = rSvStorage;
++void PPTWriter::exportPPTPre()
++{
+     if ( !mrStg.Is() )
+         return;
+ 
+@@ -203,32 +122,10 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage,
+         mpPicStrm = mrStg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Pictures" ) ) );
+ 
+     mpPptEscherEx = new PptEscherEx( *mpStrm, mnDrawings );
++};
+ 
+-    if ( !ImplGetStyleSheets() )
+-        return;
+-
+-    if ( !ImplCreateDocument() )
+-        return;
+-
+-    for ( i = 0; i < mnMasterPages; i++ )
+-    {
+-        if ( !ImplCreateMaster( i ) )
+-            return;
+-    }
+-    if ( !ImplCreateMainNotes() )
+-        return;
+-    maTextRuleList.First();                         // rewind list, so we can get the current or next entry without
+-                                                    // searching, all entrys are sorted#
+-    for ( i = 0; i < mnPages; i++ )
+-    {
+-        if ( !ImplCreateSlide( i ) )
+-            return;
+-    }
+-    for ( i = 0; i < mnPages; i++ )
+-    {
+-        if ( !ImplCreateNotes( i ) )
+-            return;
+-    }
++void PPTWriter::exportPPTPost()
++{
+     if ( !ImplCloseDocument() )
+         return;
+ 
+@@ -243,19 +140,328 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage,
+         }
+     }
+ 
+-    ImplWriteOLE( nCnvrtFlags );
++    ImplWriteOLE();
+ 
+-    ImplWriteVBA( pVBA );
++    ImplWriteVBA();
+ 
+     if ( !ImplWriteAtomEnding() )
+         return;
+ 
+-    if ( !ImplCreateDocumentSummaryInformation( nCnvrtFlags ) )
++    if ( !ImplCreateDocumentSummaryInformation() )
+         return;
+ 
+     mbStatus = TRUE;
+-};
++}
++
++// ---------------------------------------------------------------------------------------------
++
++void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_uInt16 nMode,
++                                sal_Bool bHasBackground, Reference< XPropertySet > aXBackgroundPropSet )
++{
++    Any aAny;
++
++    const PHLayout& rLayout = GetLayout( mXPagePropSet );
++    mpPptEscherEx->PtReplaceOrInsert( EPP_Persist_Slide | nPageNum, mpStrm->Tell() );
++    mpPptEscherEx->OpenContainer( EPP_Slide );
++    mpPptEscherEx->AddAtom( 24, EPP_SlideAtom, 2 );
++    *mpStrm << rLayout.nLayout;

... etc. - the rest is truncated


More information about the ooo-build-commit mailing list