From 42df38ac6e845c85d4c980a795cd59c7f3ac19cd Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Mon, 13 Dec 2010 13:34:56 +0100 Subject: impressdefaults1: #i115996# change default bullet symbol order from 'Oo-' in 'O-O-O' inside text objects --- sd/source/core/stlpool.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index ef3d5d0ebe25..4fb752d11053 100755 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -1096,32 +1096,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; } -- cgit v1.2.3 From de6b8fae9f4775b841c46e57e5b36670de90c61c Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Mon, 7 Feb 2011 17:53:47 +0100 Subject: impress210: #i116846# adding uncommited changes from cws impressdefautls1 --- sd/source/ui/slideshow/slideshow.src | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sd/source/ui/slideshow/slideshow.src b/sd/source/ui/slideshow/slideshow.src index 78cd2aae0d9f..c3efa2ac2f32 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 { -- cgit v1.2.3 From f4687bedc89c9882b9fc735b2ed4b1a420892928 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Mon, 7 Feb 2011 18:05:30 +0100 Subject: impress210: #i116846# added missing commits from cws impressdefaults1 --- sd/source/ui/slideshow/slideshow.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/source/ui/slideshow/slideshow.src b/sd/source/ui/slideshow/slideshow.src index c3efa2ac2f32..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 { -- cgit v1.2.3 From 9ab3d588a12450ac9bc33db6b94b03b95592ae20 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Tue, 8 Feb 2011 12:29:15 +0100 Subject: impress210: #i105310# set tooltip for items and some refactoring --- sd/source/core/CustomAnimationPreset.cxx | 4 ++-- sd/source/filter/html/htmlex.hxx | 2 -- sd/source/ui/animations/CustomAnimationPane.cxx | 2 +- sd/source/ui/dlg/SpellDialogChildWindow.cxx | 2 +- sd/source/ui/dlg/dlgass.cxx | 4 ++-- .../configuration/ConfigurationControllerBroadcaster.cxx | 4 ++-- .../ui/framework/configuration/ConfigurationUpdater.cxx | 4 ++-- sd/source/ui/framework/configuration/ResourceId.cxx | 12 ++++++------ sd/source/ui/framework/factories/BasicViewFactory.cxx | 2 +- sd/source/ui/slidesorter/controller/SlsAnimator.cxx | 2 +- sd/source/ui/toolpanel/controls/DocumentHelper.cxx | 2 +- sd/source/ui/view/ViewTabBar.cxx | 2 +- 12 files changed, 20 insertions(+), 22 deletions(-) mode change 100644 => 100755 sd/source/core/CustomAnimationPreset.cxx diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx old mode 100644 new mode 100755 index fb02f01480e7..ab846e56aebb --- 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/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index 43bc12419f84..de6771bcf0c3 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/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 2d70316c1432..64403f24a08a 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/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx index 7aee12f23bbd..1a4700429ca3 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, FALSE); GetBindings().GetDispatcher()->Execute( diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 4645b3540f04..3841a92f5a17 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/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 > aResourcesToDeactivate; CheckPureAnchors(mxRequestedConfiguration, aResourcesToDeactivate); - if (aResourcesToDeactivate.size() > 0) + if (!aResourcesToDeactivate.empty() ) { Reference xCC ( mxControllerManager->getConfigurationController()); @@ -327,7 +327,7 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie // Deactivate pure anchors that have no child. vector > 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 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//" 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(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 2dd7689f2b39..be9086a7b19c 100755 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -523,7 +523,7 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr& r if (xResource.is()) { static ::std::vector > maCacheableResources; - if (maCacheableResources.size() == 0) + if (maCacheableResources.empty() ) { ::boost::shared_ptr pHelper (FrameworkHelper::Instance(*mpBase)); 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/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx index f7d470e56333..844257b1b9e2 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/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index a12412bf7f7d..8f14042d23b4 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())); -- cgit v1.2.3 From 993a6287690df39c10539c3c474608c2ce73d507 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Wed, 9 Feb 2011 15:05:02 +0100 Subject: impress210: #i110321# check if pages exists for last page --- sd/source/ui/view/DocumentRenderer.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index b0248647b3dc..ea0b511bffbb 100755 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1949,7 +1949,7 @@ private: // Distribute pages to handout pages. ::std::vector aPageIndices; - std::vector aPagesVector; + for (USHORT nIndex=0, nCount= nPageCount, @@ -1966,8 +1966,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( -- cgit v1.2.3 From d68d1c274757c9ef7b84e00478576aa9ec44d5b7 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Tue, 15 Feb 2011 10:10:51 +0100 Subject: impress210: #i106378# use datetime to get current date --- sd/source/ui/annotations/annotationmanager.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 1e64617edab8..c7a026c1950d 100755 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -48,6 +48,8 @@ #include #include +#include + #include #include #include @@ -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 ) -- cgit v1.2.3 From f269295e80eba9515f48f09561d04594b2652469 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Fri, 4 Mar 2011 21:31:20 +0100 Subject: impress210: #i50899# clean up fill attributes if fill style changes --- sd/source/ui/func/fupage.cxx | 27 ++++++++++++++++++--------- sd/source/ui/func/futempl.cxx | 41 +++-------------------------------------- 2 files changed, 21 insertions(+), 47 deletions(-) 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 #include #include -#ifndef _MSGBOX_HXX //autogen #include -#endif #include #include #include #include #include -#ifndef _SVX_SVDORECT_HXX #include -#endif -#ifndef _SVX_SVDUNDO_HXX #include -#endif #include #include #include @@ -59,6 +53,7 @@ #include #include #include +#include #include "glob.hrc" #include @@ -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 #include #include +#include #include #include @@ -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 ) { -- cgit v1.2.3 From d6e7503d7e3e7dd6599e0b85fc85b35d884d3f36 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Wed, 9 Mar 2011 08:38:29 +0100 Subject: impress210: chekc readonly --- sd/source/ui/func/futext.cxx | 15 +++++++++++++++ sd/source/ui/table/tablefunction.cxx | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 2835821796a1..a1b28031d9c7 100755 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -661,9 +661,24 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt) mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray ); Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); +sal_Bool bOldReadOnly = sal_False; + if ( mpView && mpDocSh->IsReadOnly() ) + { + if ( mpView && mpView->GetTextEditOutlinerView() ) +{ + bOldReadOnly = mpView->GetTextEditOutlinerView()->IsReadOnly(); + mpView->GetTextEditOutlinerView()->SetReadOnly(sal_True); +} + } if( (mpView && mpView->MouseButtonUp(rMEvt, mpWindow)) || rMEvt.GetClicks() == 2 ) + { + if ( mpView && mpView->GetTextEditOutlinerView() ) + mpView->GetTextEditOutlinerView()->SetReadOnly(bOldReadOnly); return (TRUE); // Event von der SdrView ausgewertet + } + if ( mpView && mpView->GetTextEditOutlinerView() ) + mpView->GetTextEditOutlinerView()->SetReadOnly(bOldReadOnly); BOOL bEmptyTextObj = FALSE; diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index b30e259e049a..41c8e1c429f9 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, 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, TRUE, FALSE ); break; } case SID_TABLEDESIGN: -- cgit v1.2.3 From d30085b1ee435059d01a3d8d947803ebd91041c2 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Wed, 9 Mar 2011 18:32:29 +0100 Subject: impress210: #i41995# fixed import of path animation from sxi files --- sd/inc/EffectMigration.hxx | 3 +++ sd/source/core/CustomAnimationEffect.cxx | 1 + sd/source/core/EffectMigration.cxx | 26 ++++++++++++++++++++++++++ sd/source/ui/unoidl/unoobj.cxx | 27 ++++----------------------- 4 files changed, 34 insertions(+), 23 deletions(-) mode change 100644 => 100755 sd/inc/EffectMigration.hxx mode change 100644 => 100755 sd/source/core/EffectMigration.cxx diff --git a/sd/inc/EffectMigration.hxx b/sd/inc/EffectMigration.hxx old mode 100644 new mode 100755 index eb173f495de2..3dd0e0dfe8ad --- 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/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 33b9c233909b..52d53426f133 100755 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -1738,6 +1738,7 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() ); if( pObj ) { + pObj->RecalcBoundRect(true); const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const Point aCenter( aBoundRect.Center() ); diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx old mode 100644 new mode 100755 index cbb9a1019baf..751ce0911cfc --- a/sd/source/core/EffectMigration.cxx +++ b/sd/source/core/EffectMigration.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include "drawdoc.hxx" #include "sdpage.hxx" #include @@ -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(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/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 681aad8f44ed..ddb115a21525 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* pObj = xShape.is() ? dynamic_cast< SdrPathObj* >( GetSdrObjectFromXShape( xShape ) ) : NULL; - SdrObject* pObj = NULL; - if(xShape.is()) - pObj = GetSdrObjectFromXShape( xShape ); - - if( pObj == NULL || !pObj->ISA( SdrPathObj ) ) + if( pObj == 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, pObj ); break; } -*/ case WID_IMAGEMAP: { SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; -- cgit v1.2.3 From 3a5fb547e14c0dcb5f7a71cb8c3650182cb31c91 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Thu, 10 Mar 2011 14:21:52 +0100 Subject: impress210: #i117133# put new drawing layer fill and stroke styles in pool only for newly created documents --- sd/source/ui/docshell/docshel4.cxx | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3 From b9c65fefee0ec5f4022b9a6a193671d7ec2f0136 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Fri, 11 Mar 2011 07:19:45 +0100 Subject: impress210: replace TRUE by sal_True --- sd/source/ui/table/tablefunction.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 48bb016ba0b1..7e017fbdbe1e 100755 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -196,7 +196,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) SfxViewShell* pViewShell = GetViewShell(); OSL_ASSERT (pViewShell!=NULL); SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); - rBindings.Invalidate( SID_INSERT_TABLE, TRUE, FALSE ); + rBindings.Invalidate( SID_INSERT_TABLE, sal_True, sal_False ); break; } case SID_TABLEDESIGN: -- cgit v1.2.3 From 66307ce86df99f6bd31f2f78665582b377161cad Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Mon, 28 Mar 2011 11:29:50 +0200 Subject: impress210: comment out not needed line --- sd/source/core/EffectMigration.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx index 751ce0911cfc..26d032d8bb6f 100755 --- a/sd/source/core/EffectMigration.cxx +++ b/sd/source/core/EffectMigration.cxx @@ -1353,7 +1353,7 @@ void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj ) if( pObj ) { - sd::MainSequencePtr pMainSequence = static_cast(pObj->GetPage())->getMainSequence(); + //sd::MainSequencePtr pMainSequence = static_cast(pObj->GetPage())->getMainSequence(); const Reference< XShape > xShape( pShape ); SdPage* pPage = dynamic_cast< SdPage* >( pPathObj ? pPathObj->GetPage() : 0 ); -- cgit v1.2.3 From 9ad72383ccd8e5c2dfede71439b487d052cbd98c Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Mon, 28 Mar 2011 12:32:21 +0200 Subject: impress210: resolve name clash --- sd/source/ui/unoidl/unoobj.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index ddb115a21525..ae148ec547cf 100755 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -661,12 +661,12 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, case WID_ANIMPATH: { uno::Reference< drawing::XShape > xShape( aValue, uno::UNO_QUERY ); - SdrPathObj* pObj = xShape.is() ? dynamic_cast< SdrPathObj* >( GetSdrObjectFromXShape( xShape ) ) : NULL; + SdrPathObj* pObj2 = xShape.is() ? dynamic_cast< SdrPathObj* >( GetSdrObjectFromXShape( xShape ) ) : NULL; - if( pObj == NULL ) + if( pObj2 == NULL ) throw lang::IllegalArgumentException(); - EffectMigration::SetAnimationPath( mpShape, pObj ); + EffectMigration::SetAnimationPath( mpShape, pObj2 ); break; } case WID_IMAGEMAP: -- cgit v1.2.3 From 64fd6776945540e0ed3bd7e7467d4a00b6bcb7a0 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Wed, 30 Mar 2011 10:57:41 +0200 Subject: impress210: #i41995# using view contact to get bound rect for old path animation import --- sd/source/core/CustomAnimationEffect.cxx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 52d53426f133..9ce0084ddbd3 100755 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -72,6 +72,8 @@ #include +#include +#include #include #include #include @@ -1738,8 +1740,19 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() ); if( pObj ) { - pObj->RecalcBoundRect(true); - 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())); -- cgit v1.2.3