diff options
53 files changed, 206 insertions, 149 deletions
diff --git a/sd/inc/EffectMigration.hxx b/sd/inc/EffectMigration.hxx index eb173f495de2..3dd0e0dfe8ad 100644..100755 --- a/sd/inc/EffectMigration.hxx +++ b/sd/inc/EffectMigration.hxx @@ -36,6 +36,7 @@ class SdPage; class SvxShape; class SdAnimationInfo; class SdrObject; +class SdrPathObj; namespace sd { @@ -76,6 +77,8 @@ public: static void UpdateSoundEffect( SvxShape* pShape, SdAnimationInfo* pInfo ); static ::rtl::OUString GetSoundFile( SvxShape* pShape ); static sal_Bool GetSoundOn( SvxShape* pShape ); + + static void SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj ); }; } // end of namespace sd diff --git a/sd/qa/unoapi/sd.sce b/sd/qa/unoapi/sd.sce index c964c1ba0090..c964c1ba0090 100644..100755 --- a/sd/qa/unoapi/sd.sce +++ b/sd/qa/unoapi/sd.sce diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 33b9c233909b..9ce0084ddbd3 100755 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -72,6 +72,8 @@ #include <cppuhelper/implbase1.hxx> +#include <drawinglayer/geometry/viewinformation2d.hxx> +#include <svx/sdr/contact/viewcontact.hxx> #include <svx/svdopath.hxx> #include <svx/svdpage.hxx> #include <svx/unoapi.hxx> @@ -1738,7 +1740,19 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() ); if( pObj ) { - const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); + Rectangle aBoundRect(0,0,0,0); + + const drawinglayer::primitive2d::Primitive2DSequence xPrimitives(pObj->GetViewContact().getViewIndependentPrimitive2DSequence()); + const drawinglayer::geometry::ViewInformation2D aViewInformation2D; + const basegfx::B2DRange aRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xPrimitives, aViewInformation2D)); + + if(!aRange.isEmpty()) + { + aBoundRect = Rectangle( + (sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()), + (sal_Int32)ceil(aRange.getMaxX()), (sal_Int32)ceil(aRange.getMaxY())); + } + const Point aCenter( aBoundRect.Center() ); xPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aCenter.X(), -aCenter.Y())); diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 4d29833e637a..c512ab084da9 100755 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -645,7 +645,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n sal_Int32 nCategory = (rand() * pCategoryList->size() / RAND_MAX); PresetCategoryPtr pCategory = (*pCategoryList)[nCategory]; - if( pCategory.get() && pCategory->maEffects.size() ) + if( pCategory.get() && !pCategory->maEffects.empty() ) { sal_Int32 nDescriptor = (rand() * pCategory->maEffects.size() / RAND_MAX); CustomAnimationPresetPtr pPreset = pCategory->maEffects[nDescriptor]; @@ -654,7 +654,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n UStringList aSubTypes = pPreset->getSubTypes(); OUString aSubType; - if( aSubTypes.size() ) + if( !aSubTypes.empty() ) { sal_Int32 nSubType = (rand() * aSubTypes.size() / RAND_MAX); aSubType = aSubTypes[nSubType]; diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx index cbb9a1019baf..26d032d8bb6f 100644..100755 --- a/sd/source/core/EffectMigration.cxx +++ b/sd/source/core/EffectMigration.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/presentation/ParagraphTarget.hpp> #include <svx/unoshape.hxx> #include <svx/svdotext.hxx> +#include <svx/svdopath.hxx> #include "drawdoc.hxx" #include "sdpage.hxx" #include <CustomAnimationPreset.hxx> @@ -1342,3 +1343,28 @@ sal_Bool EffectMigration::GetSoundOn( SvxShape* pShape ) return GetSoundFile( pShape ).getLength() != 0; } +// -------------------------------------------------------------------- + +void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj ) +{ + if( pShape && pPathObj ) + { + SdrObject* pObj = pShape->GetSdrObject(); + + if( pObj ) + { + //sd::MainSequencePtr pMainSequence = static_cast<SdPage*>(pObj->GetPage())->getMainSequence(); + + const Reference< XShape > xShape( pShape ); + SdPage* pPage = dynamic_cast< SdPage* >( pPathObj ? pPathObj->GetPage() : 0 ); + if( pPage ) + { + boost::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() ); + if( pMainSequence.get() ) + CustomAnimationEffectPtr pCreated( pMainSequence->append( *pPathObj, makeAny( xShape ), -1.0 ) ); + } + } + } +} + + diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 52b9723bc178..5ab07b5f82e4 100755 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -1060,6 +1060,9 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, { SvxNumberFormat aFrmt( pDefaultRule->GetLevel(i) ); aFrmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); + // #i93908# clear suffix for bullet lists + aFrmt.SetPrefix(::rtl::OUString()); + aFrmt.SetSuffix(::rtl::OUString()); aFrmt.SetStart(1); aFrmt.SetBulletRelSize(45); aFrmt.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34 @@ -1096,32 +1099,33 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, switch(i) { case 0: - case 1: { nFontSize = 32; nFirstLineOffset = -900; } break; - case 2: + case 1: { - nFontSize = 28; - nFirstLineOffset = -800; aNumberFormat.SetBulletChar( 0x2013 ); // StarBats: 0xF000 + 150 aNumberFormat.SetBulletRelSize(75); + nFontSize = 32; + nFirstLineOffset = -900; } break; - case 3: + case 2: { - nFontSize = 24; + nFontSize = 28; + nFirstLineOffset = -800; } break; - case 4: + case 3: { - aNumberFormat.SetBulletChar( 0x2013 ); // StarBats: 0xF000 + 150 + aNumberFormat.SetBulletChar( 0x2013 ); // StarBats: 0xF000 + 150 aNumberFormat.SetBulletRelSize(75); + nFontSize = 24; } break; } diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index 6c766ed19fe3..5abc7eed6c43 100755 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -59,8 +59,6 @@ #define PUB_HIGHRES_WIDTH 1024 #define PUB_HIGHRES_HEIGHT 768 -#define HtmlButtonThemaStr = "private://gallery/hidden/HtmlExportButtons"; - class List; class SfxProgress; class SdrOutliner; diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 0ebc716e863b..53c95050ec8a 100755 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -513,6 +513,9 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError ) { MAP_LEN( "BuildId" ), 0, &::getCppuType( (OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, + { MAP_LEN( "OrganizerMode" ), 0, + &::getBooleanCppuType(), + ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, { NULL, 0, 0, NULL, 0, 0 } }; @@ -630,6 +633,13 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError ) } } + if (SDXMLMODE_Organizer == meFilterMode) + { + ::rtl::OUString const sOrganizerMode( + RTL_CONSTASCII_USTRINGPARAM("OrganizerMode")); + xInfoSet->setPropertyValue(sOrganizerMode, uno::makeAny(sal_True)); + } + // ------------------------------------- if( 0 == nRet ) @@ -655,13 +665,14 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError ) sal_uInt32 nWarn = 0; sal_uInt32 nWarn2 = 0; // read storage streams + // #i103539#: always read meta.xml for generator + nWarn = ReadThroughComponent( + xStorage, xModelComp, "meta.xml", "Meta.xml", xServiceFactory, + pServices->mpMeta, + aEmptyArgs, aName, sal_False ); + if( meFilterMode != SDXMLMODE_Organizer ) { - nWarn = ReadThroughComponent( - xStorage, xModelComp, "meta.xml", "Meta.xml", xServiceFactory, - pServices->mpMeta, - aEmptyArgs, aName, sal_False ); - nWarn2 = ReadThroughComponent( xStorage, xModelComp, "settings.xml", NULL, xServiceFactory, pServices->mpSettings, diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 73d595a8eb1e..b83285647256 100755 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -2044,7 +2044,7 @@ void CustomAnimationPane::createPath( PathKind eKind, std::vector< Any >& rTarge void CustomAnimationPane::onRemove() { - if( maListSelection.size() ) + if( !maListSelection.empty() ) { addUndo(); diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index cea71438ee4f..dc10b355de27 100755 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -48,6 +48,8 @@ #include <unotools/syslocale.hxx> #include <unotools/saveopt.hxx> +#include <tools/datetime.hxx> + #include <sfx2/imagemgr.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/bindings.hxx> @@ -152,11 +154,8 @@ static SfxDispatcher* getDispatcher( ViewShellBase& rBase ) com::sun::star::util::DateTime getCurrentDateTime() { - TimeValue osltime; - osl_getSystemTime( &osltime ); - oslDateTime osldt; - osl_getDateTimeFromTimeValue( &osltime, &osldt ); - return com::sun::star::util::DateTime( 0, osldt.Seconds, osldt.Minutes, osldt.Hours, osldt.Day, osldt.Month, osldt.Year ); + DateTime aCurrentDate; + return com::sun::star::util::DateTime( 0, aCurrentDate.GetSec(), aCurrentDate.GetMin(), aCurrentDate.GetHour(), aCurrentDate.GetDay(), aCurrentDate.GetMonth(), aCurrentDate.GetYear() ); } OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotation ) diff --git a/sd/source/ui/annotations/annotations.src b/sd/source/ui/annotations/annotations.src index 536d10f9a417..536d10f9a417 100755..100644 --- a/sd/source/ui/annotations/annotations.src +++ b/sd/source/ui/annotations/annotations.src diff --git a/sd/source/ui/app/menuids3_tmpl.src b/sd/source/ui/app/menuids3_tmpl.src index aae782b5fe1e..aae782b5fe1e 100755..100644 --- a/sd/source/ui/app/menuids3_tmpl.src +++ b/sd/source/ui/app/menuids3_tmpl.src diff --git a/sd/source/ui/app/menuids4_tmpl.src b/sd/source/ui/app/menuids4_tmpl.src index 61a43aa6d8ba..61a43aa6d8ba 100755..100644 --- a/sd/source/ui/app/menuids4_tmpl.src +++ b/sd/source/ui/app/menuids4_tmpl.src diff --git a/sd/source/ui/app/menuids_tmpl.src b/sd/source/ui/app/menuids_tmpl.src index 1e313bbee2fc..1e313bbee2fc 100755..100644 --- a/sd/source/ui/app/menuids_tmpl.src +++ b/sd/source/ui/app/menuids_tmpl.src diff --git a/sd/source/ui/app/popup.src b/sd/source/ui/app/popup.src index 27f91bab3c6d..27f91bab3c6d 100755..100644 --- a/sd/source/ui/app/popup.src +++ b/sd/source/ui/app/popup.src diff --git a/sd/source/ui/app/popup2_tmpl.src b/sd/source/ui/app/popup2_tmpl.src index c76c09df62e6..c76c09df62e6 100755..100644 --- a/sd/source/ui/app/popup2_tmpl.src +++ b/sd/source/ui/app/popup2_tmpl.src diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src index 0901e53df0ed..52a988f08aa6 100755 --- a/sd/source/ui/app/res_bmp.src +++ b/sd/source/ui/app/res_bmp.src @@ -403,6 +403,19 @@ Image IMG_REMOVEALLBMP_H #define SfxStyleFamiliesRes2\ Text [ en-US ] = "Presentation Styles" ;\ +String STR_STYLE_FILTER_USED +{ + Text [ en-US ] = "Applied Styles" ; +}; +String STR_STYLE_FILTER_USERDEF +{ + Text [ en-US ] = "Custom Styles" ; +}; +String STR_STYLE_FILTER_ALL +{ + Text [ en-US ] = "All Styles" ; +}; + SfxStyleFamilies DLG_STYLE_DESIGNER { StyleFamilyList = @@ -492,4 +505,4 @@ Bitmap BMP_COMMENTS_INDICATOR Bitmap BMP_COMMENTS_INDICATOR_H { File = "comments_indicator_hc.bmp"; -};
\ No newline at end of file +}; diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 084f2e9c2629..475f3d489bfd 100755 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -346,7 +346,9 @@ void SdTransferable::CreateData() if( 1 == mpSdDrawDocumentIntern->GetPageCount() ) { - Point aOrigin( ( maVisArea = mpSdViewIntern->GetAllMarkedRect() ).TopLeft() ); + // #112978# need to use GetAllMarkedBoundRect instead of GetAllMarkedRect to get + // fat lines correctly + Point aOrigin( ( maVisArea = mpSdViewIntern->GetAllMarkedBoundRect() ).TopLeft() ); Size aVector( -aOrigin.X(), -aOrigin.Y() ); for( sal_uLong nObj = 0, nObjCount = pPage->GetObjCount(); nObj < nObjCount; nObj++ ) diff --git a/sd/source/ui/app/toolbox.src b/sd/source/ui/app/toolbox.src index 0f3b3c69aeef..0f3b3c69aeef 100755..100644 --- a/sd/source/ui/app/toolbox.src +++ b/sd/source/ui/app/toolbox.src diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx index aa93635c4032..2121ffbe2a50 100755 --- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx +++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx @@ -108,7 +108,7 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void) // Close the spell check dialog when there are no more sentences to // check. - if (aResult.size() == 0) + if (aResult.empty()) { SfxBoolItem aItem (SID_SPELL_DIALOG, sal_False); GetBindings().GetDispatcher()->Execute( diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 074ab49d97bb..3e56f747766f 100755 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -907,7 +907,7 @@ void AssistentDlgImpl::TemplateScanDone ( // HACK! presnt directory is always initially selected. // We have to look at the first entry to get a URL. - if (pDir->maEntries.size() > 0) + if (!pDir->maEntries.empty() ) { TemplateEntry* pEntry = pDir->maEntries.front(); if (pEntry != NULL) @@ -932,7 +932,7 @@ void AssistentDlgImpl::TemplateScanDone ( // HACK! layout directory is always initially selected. // We have to look at the first entry to get a URL. - if (pDir->maEntries.size() > 0) + if (!pDir->maEntries.empty() ) { TemplateEntry* pEntry = pDir->maEntries.front(); if (pEntry != NULL) diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index f1e77526d7e3..47e8f62c6468 100755 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -298,6 +298,7 @@ sal_Bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::s if (bRet) { + mpDoc->SetDrawingLayerPoolDefaults(); if( !mbSdDataObj ) mpDoc->NewOrLoadCompleted(NEW_DOC); // otherwise calling // NewOrLoadCompleted(NEW_LOADED) in diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx index ff167f07520a..6056d434068c 100755 --- a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx @@ -184,14 +184,14 @@ void ConfigurationControllerBroadcaster::DisposeAndClear (void) { lang::EventObject aEvent; aEvent.Source = mxConfigurationController; - while (maListenerMap.size() > 0) + while (!maListenerMap.empty()) { ListenerMap::iterator iMap (maListenerMap.begin()); if (iMap == maListenerMap.end()) break; // When the first vector is empty then remove it from the map. - if (iMap->second.size() == 0) + if (iMap->second.empty()) { maListenerMap.erase(iMap); continue; diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx index 4ab361a9490d..78d1e394c94a 100755 --- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx @@ -256,7 +256,7 @@ void ConfigurationUpdater::CleanRequestedConfiguration (void) // Request the deactivation of pure anchors that have no child. vector<Reference<XResourceId> > aResourcesToDeactivate; CheckPureAnchors(mxRequestedConfiguration, aResourcesToDeactivate); - if (aResourcesToDeactivate.size() > 0) + if (!aResourcesToDeactivate.empty() ) { Reference<XConfigurationController> xCC ( mxControllerManager->getConfigurationController()); @@ -327,7 +327,7 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie // Deactivate pure anchors that have no child. vector<Reference<XResourceId> > aResourcesToDeactivate; CheckPureAnchors(mxCurrentConfiguration, aResourcesToDeactivate); - if (aResourcesToDeactivate.size() > 0) + if (!aResourcesToDeactivate.empty() ) mpResourceManager->DeactivateResources(aResourcesToDeactivate, mxCurrentConfiguration); } catch(RuntimeException) diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx index 15d7c3a6f4ec..25be1d1dfaf2 100755 --- a/sd/source/ui/framework/configuration/ResourceId.cxx +++ b/sd/source/ui/framework/configuration/ResourceId.cxx @@ -183,7 +183,7 @@ OUString SAL_CALL ResourceId::getResourceURL (void) throw(com::sun::star::uno::RuntimeException) { - if (maResourceURLs.size() > 0) + if (!maResourceURLs.empty()) return maResourceURLs[0]; else return OUString(); @@ -200,7 +200,7 @@ util::URL SAL_CALL return *mpURL; Reference<util::XURLTransformer> xURLTransformer (mxURLTransformerWeak); - if (xURLTransformer.is() && maResourceURLs.size() > 0) + if (xURLTransformer.is() && !maResourceURLs.empty() ) { mpURL.reset(new util::URL); mpURL->Complete = maResourceURLs[0]; @@ -209,7 +209,7 @@ util::URL SAL_CALL } util::URL aURL; - if (maResourceURLs.size() > 0) + if (!maResourceURLs.empty()) aURL.Complete = maResourceURLs[0]; return aURL; } @@ -268,7 +268,7 @@ OUString SAL_CALL ResourceId::getResourceTypePrefix (void) throw (RuntimeException) { - if (maResourceURLs.size() > 0) + if (!maResourceURLs.empty() ) { // Return the "private:resource/<type>/" prefix. @@ -298,7 +298,7 @@ sal_Int16 SAL_CALL if ( ! rxResourceId.is()) { // The empty reference is interpreted as empty resource id object. - if (maResourceURLs.size() > 0) + if (!maResourceURLs.empty()) nResult = +1; else nResult = 0; @@ -610,7 +610,7 @@ void ResourceId::ParseResourceURL (void) Reference<XInterface>(xURLTransformer,UNO_QUERY)); } - if (xURLTransformer.is() && maResourceURLs.size() > 0) + if (xURLTransformer.is() && !maResourceURLs.empty() ) { mpURL.reset(new util::URL); mpURL->Complete = maResourceURLs[0]; diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index 902c6f48a9a7..de8bf54ab514 100755..100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -141,8 +141,9 @@ BasicViewFactory::BasicViewFactory ( mpViewShellContainer(new ViewShellContainer()), mpBase(NULL), mpFrameView(NULL), + mpWindow(new WorkWindow(NULL,WB_STDWORK)), mpViewCache(new ViewCache()), - mxLocalPane(new Pane(Reference<XResourceId>(), new WorkWindow(NULL,WB_STDWORK))) + mxLocalPane(new Pane(Reference<XResourceId>(), mpWindow.get())) { (void)rxContext; } @@ -523,7 +524,7 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& r if (xResource.is()) { static ::std::vector<Reference<XResourceId> > maCacheableResources; - if (maCacheableResources.size() == 0) + if (maCacheableResources.empty() ) { ::boost::shared_ptr<FrameworkHelper> pHelper (FrameworkHelper::Instance(*mpBase)); diff --git a/sd/source/ui/framework/factories/BasicViewFactory.hxx b/sd/source/ui/framework/factories/BasicViewFactory.hxx index 0cdb45ffc7c1..50edcc919899 100755 --- a/sd/source/ui/framework/factories/BasicViewFactory.hxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.hxx @@ -119,6 +119,7 @@ private: FrameView* mpFrameView; class ViewCache; + ::boost::shared_ptr<Window> mpWindow; ::boost::shared_ptr<ViewCache> mpViewCache; css::uno::Reference<css::drawing::framework::XPane> mxLocalPane; diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx index e910a8df7496..27d18fec51c1 100755 --- a/sd/source/ui/framework/module/ModuleController.cxx +++ b/sd/source/ui/framework/module/ModuleController.cxx @@ -143,6 +143,10 @@ ModuleController::~ModuleController (void) throw() void SAL_CALL ModuleController::disposing (void) { + // Break the cyclic reference back to DrawController object + mpLoadedFactories.reset(); + mpResourceToFactoryMap.reset(); + mxController.clear(); } diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index abe45670c100..c4efbbba1612 100755 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -203,11 +203,11 @@ void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const Fo { // set new font attribute SvxFontItem aFontItem( (SvxFontItem&) rSet.Get( EE_CHAR_FONTINFO_CJK ) ); - aFontItem.GetFamilyName() = pTargetFont->GetName(); - aFontItem.GetFamily() = pTargetFont->GetFamily(); - aFontItem.GetStyleName() = pTargetFont->GetStyleName(); - aFontItem.GetPitch() = pTargetFont->GetPitch(); - aFontItem.GetCharSet() = pTargetFont->GetCharSet(); + aFontItem.SetFamilyName( pTargetFont->GetName()); + aFontItem.SetFamily( pTargetFont->GetFamily()); + aFontItem.SetStyleName( pTargetFont->GetStyleName()); + aFontItem.SetPitch( pTargetFont->GetPitch()); + aFontItem.SetCharSet( pTargetFont->GetCharSet()); rSet.Put( aFontItem ); } diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 4d068e1fde90..d8736d9b8ccb 100755 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -38,20 +38,14 @@ #include <svx/svxids.hrc> #include <svx/dialogs.hrc> #include <svl/itempool.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <sfx2/request.hxx> #include <svl/stritem.hxx> #include <vcl/prntypes.hxx> #include <svl/style.hxx> #include <stlsheet.hxx> -#ifndef _SVX_SVDORECT_HXX #include <svx/svdorect.hxx> -#endif -#ifndef _SVX_SVDUNDO_HXX #include <svx/svdundo.hxx> -#endif #include <editeng/eeitem.hxx> #include <editeng/frmdiritem.hxx> #include <svx/xbtmpit.hxx> @@ -59,6 +53,7 @@ #include <svl/itempool.hxx> #include <editeng/ulspitem.hxx> #include <editeng/lrspitem.hxx> +#include <svx/sdr/properties/properties.hxx> #include "glob.hrc" #include <editeng/shaditem.hxx> @@ -393,7 +388,11 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) if(!mpPage->IsMasterPage()) { // on normal pages, switch off fill attribute usage - mpPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); + SdrPageProperties& rPageProperties = mpPage->getSdrPageProperties(); + rPageProperties.ClearItem( XATTR_FILLBITMAP ); + rPageProperties.ClearItem( XATTR_FILLGRADIENT ); + rPageProperties.ClearItem( XATTR_FILLHATCH ); + rPageProperties.PutItem(XFillStyleItem(XFILL_NONE)); } } } @@ -409,6 +408,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) StyleSheetUndoAction* pAction = new StyleSheetUndoAction(mpDoc, (SfxStyleSheet*)pStyleSheet, &(*pTempSet.get())); mpDocSh->GetUndoManager()->AddUndoAction(pAction); pStyleSheet->GetItemSet().Put( *(pTempSet.get()) ); + sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() ); pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); } else if( bSetToAllPages ) @@ -430,6 +430,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) new StyleSheetUndoAction(mpDoc, (SfxStyleSheet*)pStyle, &(*pTempSet.get())); pUndoGroup->AddAction(pAction); pStyle->GetItemSet().Put( *(pTempSet.get()) ); + sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() ); pStyle->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); } @@ -444,7 +445,13 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) { SdBackgroundObjUndoAction *pBackgroundObjUndoAction = new SdBackgroundObjUndoAction(*mpDoc, *pPage, rFillAttributes); pUndoGroup->AddAction(pBackgroundObjUndoAction); - pPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); + + SdrPageProperties& rPageProperties = pPage->getSdrPageProperties(); + rPageProperties.ClearItem( XATTR_FILLBITMAP ); + rPageProperties.ClearItem( XATTR_FILLGRADIENT ); + rPageProperties.ClearItem( XATTR_FILLHATCH ); + rPageProperties.PutItem(XFillStyleItem(XFILL_NONE)); + pPage->ActionChanged(); } } @@ -606,8 +613,10 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) delete mpBackgroundObjUndoAction; mpBackgroundObjUndoAction = new SdBackgroundObjUndoAction( *mpDoc, *mpPage, mpPage->getSdrPageProperties().GetItemSet()); + SfxItemSet aSet( *pArgs ); + sdr::properties::CleanupFillProperties(aSet); mpPage->getSdrPageProperties().ClearItem(); - mpPage->getSdrPageProperties().PutItemSet(*pArgs); + mpPage->getSdrPageProperties().PutItemSet(aSet); } } diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index d7a251cee531..363eba2f6dab 100755 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -49,6 +49,7 @@ #include <editeng/lrspitem.hxx> #include <svx/svdopage.hxx> #include <svx/svditer.hxx> +#include <svx/sdr/properties/properties.hxx> #include <sfx2/viewfrm.hxx> #include <svx/xlndsit.hxx> @@ -454,6 +455,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) sStyleName.Append( sal_Unicode( ' ' )); pStyleSheet->GetItemSet().Put(aTempSet); + SdStyleSheet* pRealSheet =((SdStyleSheet*)pStyleSheet)->GetRealStyleSheet(); pRealSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); @@ -477,45 +479,8 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) SfxItemSet& rAttr = pStyleSheet->GetItemSet(); -/* #i35937# - if ( rAttr.GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_ON ) - { - // SvxLRSpaceItem hart gesetzt: NumBulletItem anpassen - if ( aOriSet.GetItemState( EE_PARA_LRSPACE ) != SFX_ITEM_ON || - (const SvxLRSpaceItem&) aOriSet.Get( EE_PARA_LRSPACE ) != - (const SvxLRSpaceItem&) rAttr.Get( EE_PARA_LRSPACE ) ) - { - SvxNumBulletItem aNumBullet( (const SvxNumBulletItem&) rAttr.Get(EE_PARA_NUMBULLET) ); - - sal_uInt16 nLevel = 0; - if( (ePO >= PO_OUTLINE_2) && (ePO <= PO_OUTLINE_9) ) - nLevel = (sal_uInt16)(ePO - PO_OUTLINE_1 + 1); - - EditEngine::ImportBulletItem( aNumBullet, nLevel, NULL, - &(const SvxLRSpaceItem&) rAttr.Get( EE_PARA_LRSPACE ) ); + sdr::properties::CleanupFillProperties( rAttr ); - // the numbering bullet item is not valid in styles Outline 2 to Outline 9 - if( nLevel != 0 ) - { - // so put it into Outline 1 then.. - String sStyleName((SdResId(STR_PSEUDOSHEET_OUTLINE))); - sStyleName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " 1" ) ); - SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( sStyleName, SD_STYLE_FAMILY_PSEUDO); - - if(pFirstStyleSheet) - { - pFirstStyleSheet->GetItemSet().Put( aNumBullet); - SdStyleSheet* pRealSheet = ((SdStyleSheet*)pFirstStyleSheet)->GetRealStyleSheet(); - pRealSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); - } - } - else - { - ( (SfxItemSet&) rAttr).Put( aNumBullet ); - } - } - } -*/ // check for unique names of named items for xml if( rAttr.GetItemState( XATTR_FILLBITMAP ) == SFX_ITEM_SET ) { diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 991beade0f2f..7134358e80bc 100755 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -498,7 +498,7 @@ void PresenterTextView::Implementation::SetFontDescriptor ( mpEditEngineItemPool->SetPoolDefaultItem( aFontHeight); SvxFontItem aSvxFontItem (EE_CHAR_FONTINFO); - aSvxFontItem.GetFamilyName() = rFontDescriptor.Name; + aSvxFontItem.SetFamilyName( rFontDescriptor.Name ); mpEditEngineItemPool->SetPoolDefaultItem(aSvxFontItem); mnTotalHeight = -1; diff --git a/sd/source/ui/slideshow/slideshow.src b/sd/source/ui/slideshow/slideshow.src index 78cd2aae0d9f..0b6217028d91 100755 --- a/sd/source/ui/slideshow/slideshow.src +++ b/sd/source/ui/slideshow/slideshow.src @@ -74,7 +74,7 @@ Menu RID_SLIDESHOW_CONTEXTMENU MenuItem { Identifier = CM_PEN_MODE; - Text [ en-US ] = "Mouse pointer as ~pen"; + Text [ en-US ] = "Mouse pointer as ~Pen"; }; MenuItem { @@ -115,12 +115,12 @@ Menu RID_SLIDESHOW_CONTEXTMENU MenuItem { Identifier = CM_COLOR_PEN ; - Text [ en-US ] = "~Change Pen Color..." ; + Text [ en-US ] = "~Change pen Color..." ; }; MenuItem { Identifier = CM_ERASE_ALLINK ; - Text [ en-US ] = "~Erase All Ink On Slide" ; + Text [ en-US ] = "~Erase all ink on Slide" ; }; MenuItem { diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 08a864920b9c..153ec43a1ad6 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -372,7 +372,12 @@ bool SlideSorterController::Command ( { bool bEventHasBeenHandled = false; + if (pWindow == NULL) + return false; + ViewShell* pViewShell = mrSlideSorter.GetViewShell(); + if (pViewShell == NULL) + return false; switch (rEvent.GetCommand()) { diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx index 28756b3766d9..dfc672e33802 100755 --- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx +++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx @@ -303,7 +303,7 @@ IMPL_LINK(Animator, TimeoutHandler, Timer*, EMPTYARG) // Unlock the draw lock. This should lead to a repaint. mpDrawLock.reset(); - if (maAnimations.size() > 0) + if (!maAnimations.empty()) RequestNextFrame(); return 0; diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 957c9da398c6..7e017fbdbe1e 100755 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -185,6 +185,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) } } + GetParentWindow()->GrabFocus(); if( pPickObj ) mpView->ReplaceObjectAtView(pPickObj, *pPV, pObj, sal_True ); else @@ -192,6 +193,10 @@ void DrawViewShell::FuTable(SfxRequest& rReq) Invalidate(SID_DRAWTBX_INSERT); rReq.Ignore(); +SfxViewShell* pViewShell = GetViewShell(); + OSL_ASSERT (pViewShell!=NULL); + SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); + rBindings.Invalidate( SID_INSERT_TABLE, sal_True, sal_False ); break; } case SID_TABLEDESIGN: diff --git a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx index 48882d0f2f9e..d1c5d2c0ff53 100644..100755 --- a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx +++ b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx @@ -31,9 +31,9 @@ #include "TaskPaneFocusManager.hxx" #include <vcl/window.hxx> -#include <vos/mutex.hxx> #include <vcl/svapp.hxx> #include <vcl/event.hxx> +#include <rtl/instance.hxx> #include <hash_map> namespace { @@ -70,16 +70,23 @@ class FocusManager::LinkMap -FocusManager* FocusManager::spInstance = NULL; - - FocusManager& FocusManager::Instance (void) { + static FocusManager* spInstance = NULL; + if (spInstance == NULL) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + ::osl::MutexGuard aGuard (::osl::Mutex::getGlobalMutex()); if (spInstance == NULL) - spInstance = new FocusManager (); + { + static FocusManager aInstance; + OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); + spInstance = &aInstance; + } + } + else + { + OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); } return *spInstance; } diff --git a/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx b/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx index b9b28154dc5b..0b5199a9a7cc 100644..100755 --- a/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx +++ b/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx @@ -103,7 +103,6 @@ public: bool TransferFocus (::Window* pSource, const KeyCode& rCode); private: - static FocusManager* spInstance; class LinkMap; ::std::auto_ptr<LinkMap> mpLinks; diff --git a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx index 29018cb3a3ca..9b6e45c35194 100755 --- a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx @@ -227,7 +227,7 @@ void CurrentMasterPagesSelector::Execute (SfxRequest& rRequest) // i.e. is not used. SdPage* pMasterPage = GetSelectedMasterPage(); if (pMasterPage != NULL - && mrDocument.GetMasterPageUserCount(pMasterPage) > 0) + && mrDocument.GetMasterPageUserCount(pMasterPage) == 0) { // Removing the precious flag so that the following call to // RemoveUnnessesaryMasterPages() will remove this master page. diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx index 8ed46a90dbba..3bff5f5e7a4b 100755 --- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx +++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx @@ -338,7 +338,7 @@ void DocumentHelper::AssignMasterPageToPageList ( aCleanedList.push_back(*iPage); } } - if (aCleanedList.size() == 0) + if (aCleanedList.empty() ) break; ::svl::IUndoManager* pUndoMgr = rTargetDocument.GetDocSh()->GetUndoManager(); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index c10c64a02145..f04c3df51b7f 100755 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2111,7 +2111,12 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r { sal_Int32 nPage = ImplPDFGetBookmarkPage( aIBeg->aBookmark, *mpDoc ); if ( nPage != -1 ) - pPDFExtOutDevData->SetLinkDest( aIBeg->nLinkId, pPDFExtOutDevData->CreateDest( aPageRect, nPage, vcl::PDFWriter::FitRectangle ) ); + { + if ( aIBeg->nLinkId != -1 ) + pPDFExtOutDevData->SetLinkDest( aIBeg->nLinkId, pPDFExtOutDevData->CreateDest( aPageRect, nPage, vcl::PDFWriter::FitRectangle ) ); + else + pPDFExtOutDevData->DescribeRegisteredDest( aIBeg->nDestId, aPageRect, nPage, vcl::PDFWriter::FitRectangle ); + } else pPDFExtOutDevData->SetLinkURL( aIBeg->nLinkId, aIBeg->aBookmark ); aIBeg++; diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 681aad8f44ed..ae148ec547cf 100755 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -658,36 +658,17 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, case WID_MASTERDEPEND: SetMasterDepend( ::cppu::any2bool(aValue) ); break; -/* todo case WID_ANIMPATH: { - uno::Reference< drawing::XShape > xShape; - aValue >>= xShape; + uno::Reference< drawing::XShape > xShape( aValue, uno::UNO_QUERY ); + SdrPathObj* pObj2 = xShape.is() ? dynamic_cast< SdrPathObj* >( GetSdrObjectFromXShape( xShape ) ) : NULL; - SdrObject* pObj = NULL; - if(xShape.is()) - pObj = GetSdrObjectFromXShape( xShape ); - - if( pObj == NULL || !pObj->ISA( SdrPathObj ) ) + if( pObj2 == NULL ) throw lang::IllegalArgumentException(); - pInfo->mpPathObj = (SdrPathObj*)pObj; - - SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; - if( pDoc ) - { - pInfo = pDoc->GetAnimationInfo(pObj); - if( pInfo == NULL ) - { - pInfo = new SdAnimationInfo(pDoc); - pObj->InsertUserData( pInfo ); - } - pInfo->mbInvisibleInPresentation = sal_True; - } - + EffectMigration::SetAnimationPath( mpShape, pObj2 ); break; } -*/ case WID_IMAGEMAP: { SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 7f67a549fc10..d6fbc27d9b3f 100755 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1949,7 +1949,6 @@ private: // Distribute pages to handout pages. ::std::vector<sal_uInt16> aPageIndices; - std::vector<SdPage*> aPagesVector; for (sal_uInt16 nIndex=0, nCount= nPageCount, @@ -1966,8 +1965,7 @@ private: // Create a printer page when we have found one page for each // placeholder or when this is the last (and special) loop. - if (aPageIndices.size() == nShapeCount - || nIndex==nCount) + if (!aPageIndices.empty() && (aPageIndices.size() == nShapeCount || nIndex==nCount)) { maPrinterPages.push_back( ::boost::shared_ptr<PrinterPage>( diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index 0c0cd2b9836e..fa0c699778c1 100755 --- a/sd/source/ui/view/ViewTabBar.cxx +++ b/sd/source/ui/view/ViewTabBar.cxx @@ -486,7 +486,7 @@ int ViewTabBar::GetHeight (void) { int nHeight (0); - if (maTabBarButtons.size() > 0) + if (!maTabBarButtons.empty()) { TabPage* pActivePage (mpTabControl->GetTabPage( mpTabControl->GetCurPageId())); diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 800ee2756c97..b888f563f02c 100755 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -449,8 +449,12 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet ) pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); // valid graphic object? - if( pObj && pObj->ISA( SdrGrafObj ) && !( (SdrGrafObj*) pObj )->IsEPS() && !mpDrawView->IsTextEdit() ) + if( pObj && pObj->ISA( SdrGrafObj ) && + !( ((SdrGrafObj*) pObj)->IsEPS() || ((SdrGrafObj*) pObj)->IsRenderGraphic() ) && + !mpDrawView->IsTextEdit() ) + { bEnable = sal_True; + } // put value rSet.Put( SfxBoolItem( SID_BMPMASK_EXEC, bEnable ) ); diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 73f48323312f..0236af7d5fcf 100755 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -136,7 +136,9 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent pTransferable->SetWorkDocument( (SdDrawDocument*) GetAllMarkedModel() ); mpDoc->CreatingDataObj( NULL ); - const Rectangle aMarkRect( GetAllMarkedRect() ); + // #112978# need to use GetAllMarkedBoundRect instead of GetAllMarkedRect to get + // fat lines correctly + const Rectangle aMarkRect( GetAllMarkedBoundRect() ); TransferableObjectDescriptor aObjDesc; String aDisplayName; SdrOle2Obj* pSdrOleObj = NULL; diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index c7f460758499..476ae1271562 100755 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -223,6 +223,7 @@ if( aPreviewSizePixel.Width() && aPreviewSizePixel.Height() ) case META_GRADIENTEX_ACTION: case META_BMPSCALEPART_ACTION: case META_BMPEXSCALEPART_ACTION: + case META_RENDERGRAPHIC_ACTION: bVector = true; break; case META_BMP_ACTION: diff --git a/slideshow/source/engine/animationnodes/basenode.hxx b/slideshow/source/engine/animationnodes/basenode.hxx index 2bbd9d9b51e8..0ca893b5287a 100644 --- a/slideshow/source/engine/animationnodes/basenode.hxx +++ b/slideshow/source/engine/animationnodes/basenode.hxx @@ -89,7 +89,7 @@ class BaseContainerNode; file-private accessor methods. */ class BaseNode : public AnimationNode, - protected ::osl::DebugBase<BaseNode>, + public ::osl::DebugBase<BaseNode>, private ::boost::noncopyable { public: diff --git a/slideshow/source/engine/debug.cxx b/slideshow/source/engine/debug.cxx index 4c8ba5415f04..f3fd185a58b0 100644 --- a/slideshow/source/engine/debug.cxx +++ b/slideshow/source/engine/debug.cxx @@ -307,7 +307,7 @@ DebugTraceScope::DebugTraceScope (const sal_Char* sFormat, ...) va_start(args, sFormat); msMessage[mnBufferSize-1] = 0; - _vsnprintf(msMessage, mnBufferSize-1, sFormat, args); + vsnprintf(msMessage, mnBufferSize-1, sFormat, args); TRACE_BEGIN("[ %s", msMessage); va_end(args); } diff --git a/slideshow/source/engine/shapes/drawshape.hxx b/slideshow/source/engine/shapes/drawshape.hxx index b3c985d3fddc..db9a052d8d6a 100644 --- a/slideshow/source/engine/shapes/drawshape.hxx +++ b/slideshow/source/engine/shapes/drawshape.hxx @@ -65,7 +65,7 @@ namespace slideshow class DrawShape : public AttributableShape, public DocTreeNodeSupplier, public HyperlinkArea, - protected ::osl::DebugBase<DrawShape> + public ::osl::DebugBase<DrawShape> { public: /** Create a shape for the given XShape diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 35daf49863d8..8d2af73817d2 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -491,9 +491,10 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, nWaitTime100thSeconds = 100 * 60 * 60 * 24; } - // There are animated GIFs with no WaitTime set. Take 1 sec, then. + // There are animated GIFs with no WaitTime set. Take 0.1 sec, the + // same duration that is used by the edit view. if( nWaitTime100thSeconds == 0 ) - nWaitTime100thSeconds = 100; + nWaitTime100thSeconds = 10; o_rFrames.push_back( MtfAnimationFrame( pMtf, nWaitTime100thSeconds / 100.0 ) ); diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 2534b495ca90..61f04d6044d7 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -94,7 +94,7 @@ namespace class SlideImpl : public Slide, public CursorManager, public ViewEventHandler, - protected ::osl::DebugBase<SlideImpl> + public ::osl::DebugBase<SlideImpl> { public: SlideImpl( const uno::Reference<drawing::XDrawPage>& xDrawPage, diff --git a/slideshow/source/engine/transitions/randomwipe.cxx b/slideshow/source/engine/transitions/randomwipe.cxx index 22c51e38852e..d8ac4a3da687 100644 --- a/slideshow/source/engine/transitions/randomwipe.cxx +++ b/slideshow/source/engine/transitions/randomwipe.cxx @@ -68,13 +68,11 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars ) m_rect.transform( aTransform ); // mix up: - for ( sal_Int32 i = (nElements / 2); i--; ) + for (sal_Int32 nIndex=0; nIndex<nElements; ++nIndex) { - const sal_Int32 pos1 = getRandomOrdinal(nElements); - const sal_Int32 pos2 = getRandomOrdinal(nElements); - const ::basegfx::B2DPoint point( m_positions[ pos1 ] ); - m_positions[ pos1 ] = m_positions[ pos2 ]; - m_positions[ pos2 ] = point; + const sal_Int32 nOtherIndex (getRandomOrdinal(nElements)); + OSL_ASSERT(nOtherIndex>=0 && nOtherIndex<nElements); + ::std::swap(m_positions[nIndex], m_positions[nOtherIndex]); } } |