Author: steve_y
Date: Tue Jan 14 09:32:00 2014
New Revision: 1557992

URL: http://svn.apache.org/r1557992
Log:
Bug 119604 - [From Symphony]the notes view and the postion and size of the note 
textbox are wrong when opening the pptx file

Modified:
    openoffice/trunk/main/oox/source/drawingml/shape.cxx
    openoffice/trunk/main/oox/source/ppt/pptshapecontext.cxx
    openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx

Modified: openoffice/trunk/main/oox/source/drawingml/shape.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/oox/source/drawingml/shape.cxx?rev=1557992&r1=1557991&r2=1557992&view=diff
==============================================================================
--- openoffice/trunk/main/oox/source/drawingml/shape.cxx (original)
+++ openoffice/trunk/main/oox/source/drawingml/shape.cxx Tue Jan 14 09:32:00 
2014
@@ -185,7 +185,8 @@ void Shape::addShape(
 
 void Shape::applyShapeReference( const Shape& rReferencedShape )
 {
-    mpTextBody = TextBodyPtr( new TextBody( *rReferencedShape.mpTextBody.get() 
) );
+       if ( rReferencedShape.mpTextBody.get() )
+               mpTextBody = TextBodyPtr( new TextBody( 
*rReferencedShape.mpTextBody.get() ) );
     maShapeProperties = rReferencedShape.maShapeProperties;
     mpLinePropertiesPtr = LinePropertiesPtr( new LineProperties( 
*rReferencedShape.mpLinePropertiesPtr.get() ) );
     mpFillPropertiesPtr = FillPropertiesPtr( new FillProperties( 
*rReferencedShape.mpFillPropertiesPtr.get() ) );

Modified: openoffice/trunk/main/oox/source/ppt/pptshapecontext.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/oox/source/ppt/pptshapecontext.cxx?rev=1557992&r1=1557991&r2=1557992&view=diff
==============================================================================
--- openoffice/trunk/main/oox/source/ppt/pptshapecontext.cxx (original)
+++ openoffice/trunk/main/oox/source/ppt/pptshapecontext.cxx Tue Jan 14 
09:32:00 2014
@@ -164,8 +164,13 @@ Reference< XFastContextHandler > PPTShap
                                                        {
                                                                SlidePersistPtr 
pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
                                                                if ( 
pMasterPersist.get() )
-                                                                       
pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
-                                                               
pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
+                                                               {
+                                                                       if ( 
mpSlidePersistPtr->isNotesPage() )
+                                                                               
pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, -1, 
pMasterPersist->getShapes()->getChildren() );
+                                                                       else
+                                                                               
pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
+                                                                               
pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
+                                                               }
                                                        }
                                                        if ( pPlaceholder.get() 
)
                                                        {

Modified: openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx?rev=1557992&r1=1557991&r2=1557992&view=diff
==============================================================================
--- openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx 
(original)
+++ openoffice/trunk/main/oox/source/ppt/presentationfragmenthandler.cxx Tue 
Jan 14 09:32:00 2014
@@ -268,6 +268,14 @@ void PresentationFragmentHandler::endDoc
                             SlidePersistPtr pNotesPersistPtr( new 
SlidePersist( rFilter, sal_False, sal_True, xNotesPage,
                                                                ShapePtr( new 
PPTShape( Slide, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) );
                             FragmentHandlerRef xNotesFragmentHandler( new 
SlideFragmentHandler( getFilter(), aNotesFragmentPath, pNotesPersistPtr, Slide 
) );
+                                                       // import notesMaster 
slide for notes slide shapes format
+                                                       OUString 
aNotesMasterFragmentPath = xNotesFragmentHandler->getFragmentPathFromFirstType( 
CREATE_OFFICEDOC_RELATION_TYPE( "notesMaster" ) );
+                                                       SlidePersistPtr 
pNotesMasterPersistPtr( new SlidePersist( rFilter, sal_True/*sal_False*/, 
sal_True, xNotesPage,
+                                                               ShapePtr( new 
PPTShape( Slide, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) );
+                                                       FragmentHandlerRef 
xNotesMasterFragmentHandler( new SlideFragmentHandler( getFilter(), 
aNotesMasterFragmentPath, pNotesMasterPersistPtr, Slide ) );
+                                                       importSlide( 
xNotesMasterFragmentHandler, pNotesMasterPersistPtr );
+                                                       
pNotesMasterPersistPtr->createXShapes( rFilter );
+                                                       
pNotesPersistPtr->setMasterPersist(pNotesMasterPersistPtr);
                             rFilter.getNotesPages().push_back( 
pNotesPersistPtr );
                             rFilter.setActualSlidePersist( pNotesPersistPtr );
                             importSlide( xNotesFragmentHandler, 
pNotesPersistPtr );


Reply via email to