diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-05-31 10:45:47 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-05-31 10:45:47 +0200 |
commit | 44863c2f2fd78c291092037aaf0d7abfa21f773d (patch) | |
tree | e37ec8eadc355883b61f7aef84cfbe9b5f5fa642 | |
parent | 98c355692e3479f86fccb05e99170c5ccc56aeba (diff) | |
parent | e95ca98b9aaf2399200566373a25a572a43307f4 (diff) |
Merge commit 'libreoffice-3.4.0.2'
Conflicts:
sd/prj/d.lst
sd/source/ui/dlg/sdabstdlg.cxx
sd/util/makefile.mk
-rw-r--r-- | sd/prj/d.lst | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-text.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/ppt/propread.cxx | 9 | ||||
-rw-r--r-- | sd/source/filter/sdfilter.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/dlg/paragr.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/inc/paragr.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowviewimpl.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 149 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/toolbar/toolbar.xml | 4 | ||||
-rw-r--r-- | sd/uiconfig/simpress/toolbar/toolbar.xml | 4 |
11 files changed, 127 insertions, 82 deletions
diff --git a/sd/prj/d.lst b/sd/prj/d.lst index e69de29bb2d1..263c55010fb9 100644 --- a/sd/prj/d.lst +++ b/sd/prj/d.lst @@ -0,0 +1,2 @@ + +..\%__SRC%\misc\sdfilt.component %_DEST%\xml%_EXT%\sdfilt.component
\ No newline at end of file diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 5bb4e988f0b0..bd558aedddae 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -772,7 +772,7 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj ) } else { - if ( pPortion && pPortion->mnCharHeight > (sal_uInt16)( ((double)-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point + if ( !pPara->mbFixedLineSpacing && pPortion && pPortion->mnCharHeight > (sal_uInt16)( ((double)-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point nLineSpacing = nNormalSpacing; else nLineSpacing = (sal_Int16)( (double)nLineSpacing / 4.40972 ); diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index bfdf5d10ba61..8b0b7612ebc6 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -1118,11 +1118,15 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Boo = *( (::com::sun::star::style::LineSpacing*)mAny.getValue() ); switch ( aLineSpacing.Mode ) { + case ::com::sun::star::style::LineSpacingMode::FIX : + mnLineSpacing = (sal_Int16)(-( aLineSpacing.Height ) ); + mbFixedLineSpacing = sal_True; + break; case ::com::sun::star::style::LineSpacingMode::MINIMUM : case ::com::sun::star::style::LineSpacingMode::LEADING : - case ::com::sun::star::style::LineSpacingMode::FIX : mnLineSpacing = (sal_Int16)(-( aLineSpacing.Height ) ); - break; + mbFixedLineSpacing = sal_False; + break; case ::com::sun::star::style::LineSpacingMode::PROP : default: diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx index 6b6998158be7..291cf2c1e300 100644 --- a/sd/source/filter/ppt/propread.cxx +++ b/sd/source/filter/ppt/propread.cxx @@ -411,8 +411,12 @@ void Section::Read( SvStorageStream *pStrm ) break; case VT_LPWSTR : + { *pStrm >> nTemp; - nPropSize += ( nTemp << 1 ) + 4; + // looks like these are aligned to 4 bytes + sal_uInt32 nLength = nPropOfs + nSecOfs + nPropSize + ( nTemp << 1 ) + 4; + nPropSize += ( nTemp << 1 ) + 4 + (nLength % 4); + } break; case VT_BLOB_OBJECT : @@ -448,6 +452,9 @@ void Section::Read( SvStorageStream *pStrm ) break; } pStrm->Seek( nPropOfs + nSecOfs ); + // make sure we don't overflow the section size + if( nPropSize > nSecSize - nSecOfs ) + nPropSize = nSecSize - nSecOfs; sal_uInt8* pBuf = new sal_uInt8[ nPropSize ]; pStrm->Read( pBuf, nPropSize ); AddProperty( nPropId, pBuf, nPropSize ); diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx index c92ccfb06351..56b13fe9247c 100644 --- a/sd/source/filter/sdfilter.cxx +++ b/sd/source/filter/sdfilter.cxx @@ -93,7 +93,8 @@ extern "C" { static void SAL_CALL thisModule() {} } ::osl::Module* SdFilter::OpenLibrary( const ::rtl::OUString& rLibraryName ) const { std::auto_ptr< osl::Module > mod(new osl::Module); - return mod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName)) + return mod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName), + SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY) ? mod.release() : 0; } diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index 75b21600b07b..36751843fb0f 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -192,4 +192,18 @@ SdParagraphDlg::SdParagraphDlg( Window* pParent, const SfxItemSet* pAttr ) AddTabPage( RID_SVXPAGE_TABULATOR ); } +void SdParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) +{ + SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); + switch( nId ) + { + case RID_SVXPAGE_STD_PARAGRAPH: + aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, MM50/2)); + rPage.PageCreated(aSet); + break; + default: + break; + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/paragr.hxx b/sd/source/ui/inc/paragr.hxx index af801492672d..89d77c7b9d54 100644 --- a/sd/source/ui/inc/paragr.hxx +++ b/sd/source/ui/inc/paragr.hxx @@ -44,6 +44,8 @@ class SdParagraphDlg : public SfxTabDialog private: const SfxItemSet& rOutAttrs; + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); + public: SdParagraphDlg( Window* pParent, const SfxItemSet* pAttr ); ~SdParagraphDlg() {}; diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index edd9264d977b..bafa18ff7964 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -353,11 +353,7 @@ geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) throw (Ru return geometry::AffineMatrix2D (1,0,0,0,1,0); } - // Reduce available width by one, as the slides might actually - // render one pixel wider and higher as aPageSize below specifies - // (when shapes of page size have visible border lines) - const Size aWindowSize( rTmpSize.Width()-1, - rTmpSize.Height()-1 ); + const Size aWindowSize( mrOutputWindow.GetSizePixel() ); Size aOutputSize( aWindowSize ); if( meAnimationMode != ANIMATIONMODE_SHOW ) @@ -384,6 +380,12 @@ geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) throw (Ru Point aOutputOffset( ( aWindowSize.Width() - aOutputSize.Width() ) >> 1, ( aWindowSize.Height() - aOutputSize.Height() ) >> 1 ); + // Reduce available width by one, as the slides might actually + // render one pixel wider and higher as aPageSize below specifies + // (when shapes of page size have visible border lines) + aOutputSize.Width() --; + aOutputSize.Height() --; + maPresentationArea = Rectangle( aOutputOffset, aOutputSize ); mrOutputWindow.SetPresentationArea( maPresentationArea ); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index f75f2811406e..660e6173b8df 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1936,7 +1936,9 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r // if necessary, the master page interactions will be exported first sal_Bool bIsBackgroundObjectsVisible = sal_False; // #i39428# IsBackgroundObjectsVisible not available for Draw const rtl::OUString sIsBackgroundObjectsVisible( RTL_CONSTASCII_USTRINGPARAM( "IsBackgroundObjectsVisible" ) ); - if ( mbImpressDoc && ( xPagePropSet->getPropertyValue( sIsBackgroundObjectsVisible ) >>= bIsBackgroundObjectsVisible ) && bIsBackgroundObjectsVisible ) + if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sIsBackgroundObjectsVisible ) ) + xPagePropSet->getPropertyValue( sIsBackgroundObjectsVisible ) >>= bIsBackgroundObjectsVisible; + if ( mbImpressDoc && bIsBackgroundObjectsVisible ) { uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( xPage, uno::UNO_QUERY ); if ( xMasterPageTarget.is() ) @@ -1975,82 +1977,93 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r const rtl::OUString sSpeed ( RTL_CONSTASCII_USTRINGPARAM( "Speed" ) ); sal_Int32 nTime = 800; presentation::AnimationSpeed aAs; - aAny = xPagePropSet->getPropertyValue( sSpeed ); - if ( aAny >>= aAs ) + if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sSpeed ) ) { - switch( aAs ) + aAny = xPagePropSet->getPropertyValue( sSpeed ); + if ( aAny >>= aAs ) { - case presentation::AnimationSpeed_SLOW : nTime = 1500; break; - case presentation::AnimationSpeed_FAST : nTime = 300; break; - default: - case presentation::AnimationSpeed_MEDIUM : nTime = 800; + switch( aAs ) + { + case presentation::AnimationSpeed_SLOW : nTime = 1500; break; + case presentation::AnimationSpeed_FAST : nTime = 300; break; + default: + case presentation::AnimationSpeed_MEDIUM : nTime = 800; + } } } presentation::FadeEffect eFe; - aAny = xPagePropSet->getPropertyValue( sEffect ); vcl::PDFWriter::PageTransition eType = vcl::PDFWriter::Regular; - if ( aAny >>= eFe ) + if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sEffect ) ) { - switch( eFe ) + aAny = xPagePropSet->getPropertyValue( sEffect ); + if ( aAny >>= eFe ) { - case presentation::FadeEffect_HORIZONTAL_LINES : - case presentation::FadeEffect_HORIZONTAL_CHECKERBOARD : - case presentation::FadeEffect_HORIZONTAL_STRIPES : eType = vcl::PDFWriter::BlindsHorizontal; break; - - case presentation::FadeEffect_VERTICAL_LINES : - case presentation::FadeEffect_VERTICAL_CHECKERBOARD : - case presentation::FadeEffect_VERTICAL_STRIPES : eType = vcl::PDFWriter::BlindsVertical; break; - - case presentation::FadeEffect_UNCOVER_TO_RIGHT : - case presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT : - case presentation::FadeEffect_ROLL_FROM_LEFT : - case presentation::FadeEffect_FADE_FROM_UPPERLEFT : - case presentation::FadeEffect_MOVE_FROM_UPPERLEFT : - case presentation::FadeEffect_FADE_FROM_LEFT : - case presentation::FadeEffect_MOVE_FROM_LEFT : eType = vcl::PDFWriter::WipeLeftToRight; break; - - case presentation::FadeEffect_UNCOVER_TO_BOTTOM : - case presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT : - case presentation::FadeEffect_ROLL_FROM_TOP : - case presentation::FadeEffect_FADE_FROM_UPPERRIGHT : - case presentation::FadeEffect_MOVE_FROM_UPPERRIGHT : - case presentation::FadeEffect_FADE_FROM_TOP : - case presentation::FadeEffect_MOVE_FROM_TOP : eType = vcl::PDFWriter::WipeTopToBottom; break; - - case presentation::FadeEffect_UNCOVER_TO_LEFT : - case presentation::FadeEffect_UNCOVER_TO_LOWERLEFT : - case presentation::FadeEffect_ROLL_FROM_RIGHT : - - case presentation::FadeEffect_FADE_FROM_LOWERRIGHT : - case presentation::FadeEffect_MOVE_FROM_LOWERRIGHT : - case presentation::FadeEffect_FADE_FROM_RIGHT : - case presentation::FadeEffect_MOVE_FROM_RIGHT : eType = vcl::PDFWriter::WipeRightToLeft; break; - - case presentation::FadeEffect_UNCOVER_TO_TOP : - case presentation::FadeEffect_UNCOVER_TO_UPPERLEFT : - case presentation::FadeEffect_ROLL_FROM_BOTTOM : - case presentation::FadeEffect_FADE_FROM_LOWERLEFT : - case presentation::FadeEffect_MOVE_FROM_LOWERLEFT : - case presentation::FadeEffect_FADE_FROM_BOTTOM : - case presentation::FadeEffect_MOVE_FROM_BOTTOM : eType = vcl::PDFWriter::WipeBottomToTop; break; - - case presentation::FadeEffect_OPEN_VERTICAL : eType = vcl::PDFWriter::SplitHorizontalInward; break; - case presentation::FadeEffect_CLOSE_HORIZONTAL : eType = vcl::PDFWriter::SplitHorizontalOutward; break; - - case presentation::FadeEffect_OPEN_HORIZONTAL : eType = vcl::PDFWriter::SplitVerticalInward; break; - case presentation::FadeEffect_CLOSE_VERTICAL : eType = vcl::PDFWriter::SplitVerticalOutward; break; - - case presentation::FadeEffect_FADE_TO_CENTER : eType = vcl::PDFWriter::BoxInward; break; - case presentation::FadeEffect_FADE_FROM_CENTER : eType = vcl::PDFWriter::BoxOutward; break; - - case presentation::FadeEffect_NONE : eType = vcl::PDFWriter::Regular; break; - - case presentation::FadeEffect_RANDOM : - case presentation::FadeEffect_DISSOLVE : - default: eType = vcl::PDFWriter::Dissolve; break; + switch( eFe ) + { + case presentation::FadeEffect_HORIZONTAL_LINES : + case presentation::FadeEffect_HORIZONTAL_CHECKERBOARD : + case presentation::FadeEffect_HORIZONTAL_STRIPES : eType = vcl::PDFWriter::BlindsHorizontal; break; + + case presentation::FadeEffect_VERTICAL_LINES : + case presentation::FadeEffect_VERTICAL_CHECKERBOARD : + case presentation::FadeEffect_VERTICAL_STRIPES : eType = vcl::PDFWriter::BlindsVertical; break; + + case presentation::FadeEffect_UNCOVER_TO_RIGHT : + case presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT : + case presentation::FadeEffect_ROLL_FROM_LEFT : + case presentation::FadeEffect_FADE_FROM_UPPERLEFT : + case presentation::FadeEffect_MOVE_FROM_UPPERLEFT : + case presentation::FadeEffect_FADE_FROM_LEFT : + case presentation::FadeEffect_MOVE_FROM_LEFT : eType = vcl::PDFWriter::WipeLeftToRight; break; + + case presentation::FadeEffect_UNCOVER_TO_BOTTOM : + case presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT : + case presentation::FadeEffect_ROLL_FROM_TOP : + case presentation::FadeEffect_FADE_FROM_UPPERRIGHT : + case presentation::FadeEffect_MOVE_FROM_UPPERRIGHT : + case presentation::FadeEffect_FADE_FROM_TOP : + case presentation::FadeEffect_MOVE_FROM_TOP : eType = vcl::PDFWriter::WipeTopToBottom; break; + + case presentation::FadeEffect_UNCOVER_TO_LEFT : + case presentation::FadeEffect_UNCOVER_TO_LOWERLEFT : + case presentation::FadeEffect_ROLL_FROM_RIGHT : + + case presentation::FadeEffect_FADE_FROM_LOWERRIGHT : + case presentation::FadeEffect_MOVE_FROM_LOWERRIGHT : + case presentation::FadeEffect_FADE_FROM_RIGHT : + case presentation::FadeEffect_MOVE_FROM_RIGHT : eType = vcl::PDFWriter::WipeRightToLeft; break; + + case presentation::FadeEffect_UNCOVER_TO_TOP : + case presentation::FadeEffect_UNCOVER_TO_UPPERLEFT : + case presentation::FadeEffect_ROLL_FROM_BOTTOM : + case presentation::FadeEffect_FADE_FROM_LOWERLEFT : + case presentation::FadeEffect_MOVE_FROM_LOWERLEFT : + case presentation::FadeEffect_FADE_FROM_BOTTOM : + case presentation::FadeEffect_MOVE_FROM_BOTTOM : eType = vcl::PDFWriter::WipeBottomToTop; break; + + case presentation::FadeEffect_OPEN_VERTICAL : eType = vcl::PDFWriter::SplitHorizontalInward; break; + case presentation::FadeEffect_CLOSE_HORIZONTAL : eType = vcl::PDFWriter::SplitHorizontalOutward; break; + + case presentation::FadeEffect_OPEN_HORIZONTAL : eType = vcl::PDFWriter::SplitVerticalInward; break; + case presentation::FadeEffect_CLOSE_VERTICAL : eType = vcl::PDFWriter::SplitVerticalOutward; break; + + case presentation::FadeEffect_FADE_TO_CENTER : eType = vcl::PDFWriter::BoxInward; break; + case presentation::FadeEffect_FADE_FROM_CENTER : eType = vcl::PDFWriter::BoxOutward; break; + + case presentation::FadeEffect_NONE : eType = vcl::PDFWriter::Regular; break; + + case presentation::FadeEffect_RANDOM : + case presentation::FadeEffect_DISSOLVE : + default: eType = vcl::PDFWriter::Dissolve; break; + } } } - pPDFExtOutDevData->SetPageTransition( eType, nTime, -1 ); + + if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sEffect ) || + xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sSpeed ) ) + { + pPDFExtOutDevData->SetPageTransition( eType, nTime, -1 ); + } } } } @@ -2102,7 +2115,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r } //<--- #i56629, #i40318 } - catch( uno::Exception& ) + catch( uno::Exception& e ) { } diff --git a/sd/uiconfig/sdraw/toolbar/toolbar.xml b/sd/uiconfig/sdraw/toolbar/toolbar.xml index 34ebb18ad4e2..9bd802585f6f 100644 --- a/sd/uiconfig/sdraw/toolbar/toolbar.xml +++ b/sd/uiconfig/sdraw/toolbar/toolbar.xml @@ -5,8 +5,8 @@ <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:Line" toolbar:helpid="helpid:10102" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:LineArrowEnd" toolbar:helpid="helpid:27173" toolbar:style="radio" /> - <toolbar:toolbaritem xlink:href=".uno:Rect" toolbar:helpid="helpid:10104" toolbar:style="radio" /> - <toolbar:toolbaritem xlink:href=".uno:Ellipse" toolbar:helpid="helpid:10110" toolbar:style="radio" /> + <toolbar:toolbaritem xlink:href=".uno:BasicShapes.rectangle" toolbar:helpid="helpid:10104" toolbar:style="radio" /> + <toolbar:toolbaritem xlink:href=".uno:BasicShapes.ellipse" toolbar:helpid="helpid:10110" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:Text" toolbar:helpid="helpid:10398" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:VerticalText" toolbar:helpid="helpid:10398" toolbar:style="radio" /> <toolbar:toolbarseparator/> diff --git a/sd/uiconfig/simpress/toolbar/toolbar.xml b/sd/uiconfig/simpress/toolbar/toolbar.xml index 62d33c1fc729..25bffb7e72bb 100644 --- a/sd/uiconfig/simpress/toolbar/toolbar.xml +++ b/sd/uiconfig/simpress/toolbar/toolbar.xml @@ -5,8 +5,8 @@ <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:Line" toolbar:helpid="helpid:10102" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:LineArrowEnd" toolbar:helpid="helpid:27173" toolbar:style="radio" /> - <toolbar:toolbaritem xlink:href=".uno:Rect" toolbar:helpid="helpid:10104" toolbar:style="radio" /> - <toolbar:toolbaritem xlink:href=".uno:Ellipse" toolbar:helpid="helpid:10110" toolbar:style="radio" /> + <toolbar:toolbaritem xlink:href=".uno:BasicShapes.rectangle" toolbar:helpid="helpid:10104" toolbar:style="radio" /> + <toolbar:toolbaritem xlink:href=".uno:BasicShapes.ellipse" toolbar:helpid="helpid:10110" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:Text" toolbar:helpid="helpid:10398" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:VerticalText" toolbar:helpid="helpid:10398" toolbar:style="radio" /> <toolbar:toolbarseparator/> |