oox/source/drawingml/shape.cxx                 |    3 ++-
 oox/source/ppt/pptshapecontext.cxx             |    9 +++++++--
 oox/source/ppt/presentationfragmenthandler.cxx |    8 ++++++++
 3 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit b6f34391f8ab893dd6cf9ac7082a8c7519ce5ecf
Author: Steve Yin <stev...@apache.org>
Date:   Tue Jan 14 09:32:00 2014 +0000

    Bug 119604 - [From Symphony]the notes view and the postion and size of the 
note textbox are wrong when opening the pptx file

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 204782c..cf385ab 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -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() ) );
diff --git a/oox/source/ppt/pptshapecontext.cxx 
b/oox/source/ppt/pptshapecontext.cxx
index c93788c..241af13 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -164,8 +164,13 @@ Reference< XFastContextHandler > 
PPTShapeContext::createFastChildContext( sal_In
                               {
                                   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() )
                               {
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx 
b/oox/source/ppt/presentationfragmenthandler.cxx
index 93ba220..609b960 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -268,6 +268,14 @@ void PresentationFragmentHandler::endDocument() throw 
(SAXException, RuntimeExce
                             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 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to