summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-10-26 17:41:29 +0100
committerMathias Bauer <mba@openoffice.org>2009-10-26 17:41:29 +0100
commit2598fbf8a9fe2c3d9825842c9369d836dd7f77e7 (patch)
treeecc1f43724012af168c6eaf2d388a4942e62d631 /sd/source
parent6301be9e1ad4b359edd3c900acd36f3552761579 (diff)
parent43936a879d1fef65802627939efae9da6ee2dab2 (diff)
merge commit for m62
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/sdpage.cxx5
-rw-r--r--sd/source/filter/ppt/pptin.cxx21
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx34
-rw-r--r--sd/source/ui/annotations/annotationmanagerimpl.hxx3
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx1
5 files changed, 45 insertions, 19 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 99fbc31a2bb0..2d4362184a89 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2882,6 +2882,11 @@ bool SdPage::checkVisibility(
}
}
}
+ } // check for placeholders on master
+ else if( pCheckPage->IsMasterPage() && ( pVisualizedPage != pCheckPage ) )
+ {
+ // presentation objects on master slide are always invisible if slide is shown.
+ return false;
}
}
}
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index a1bbc3288962..ae347eeaba12 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2346,16 +2346,21 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
if ( aPresentationText.Len() )
pPage->SetObjText( (SdrTextObj*)pText, pOutl, ePresKind, aPresentationText );
- SfxStyleSheet* pSheet2( pPage->GetStyleSheetForPresObj( ePresKind ) );
- if ( pSheet2 )
+ if ( pPage->GetPageKind() != PK_NOTES )
{
- SfxItemSet& rItemSet = pSheet2->GetItemSet();
- rItemSet.Put( (SdrTextLeftDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LEFTDIST ) );
- rItemSet.Put( (SdrTextRightDistItem&)pText->GetMergedItem( SDRATTR_TEXT_RIGHTDIST ) );
- rItemSet.Put( (SdrTextUpperDistItem&)pText->GetMergedItem( SDRATTR_TEXT_UPPERDIST ) );
- rItemSet.Put( (SdrTextLowerDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST ) );
+ SfxStyleSheet* pSheet2( pPage->GetStyleSheetForPresObj( ePresKind ) );
+ if ( pSheet2 )
+ {
+ SfxItemSet& rItemSet = pSheet2->GetItemSet();
+ rItemSet.Put( (SdrTextLeftDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LEFTDIST ) );
+ rItemSet.Put( (SdrTextRightDistItem&)pText->GetMergedItem( SDRATTR_TEXT_RIGHTDIST ) );
+ rItemSet.Put( (SdrTextUpperDistItem&)pText->GetMergedItem( SDRATTR_TEXT_UPPERDIST ) );
+ rItemSet.Put( (SdrTextLowerDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST ) );
+ rItemSet.Put( (SdrTextVertAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_VERTADJUST ) );
+ rItemSet.Put( (SdrTextHorzAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_HORZADJUST ) );
+ }
+ pText->NbcSetStyleSheet( pSheet2, FALSE );
}
- pText->NbcSetStyleSheet( pSheet2, TRUE );
SfxItemSet aTempAttr( mpDoc->GetPool() );
SdrTextMinFrameHeightItem aMinHeight( pText->GetLogicRect().GetSize().Height() );
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 49ad473db0f0..e3076ec22bbe 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -274,6 +274,21 @@ void SAL_CALL AnnotationManagerImpl::disposing( const ::com::sun::star::lang::Ev
{
}
+void AnnotationManagerImpl::ShowAnnotations( bool bShow )
+{
+ // enforce show annotations if a new annotation is inserted
+ if( mbShowAnnotations != bShow )
+ {
+ mbShowAnnotations = bShow;
+
+ SdOptions* pOptions = SD_MOD()->GetSdOptions(mpDoc->GetDocumentType());
+ if( pOptions )
+ pOptions->SetShowComments( mbShowAnnotations ? sal_True : sal_False );
+
+ UpdateTags();
+ }
+}
+
// --------------------------------------------------------------------
void AnnotationManagerImpl::ExecuteAnnotation(SfxRequest& rReq )
@@ -296,16 +311,8 @@ void AnnotationManagerImpl::ExecuteAnnotation(SfxRequest& rReq )
ExecuteReplyToAnnotation( rReq );
break;
case SID_SHOW_POSTIT:
- {
- mbShowAnnotations = !mbShowAnnotations;
-
- SdOptions* pOptions = SD_MOD()->GetSdOptions(mpDoc->GetDocumentType());
- if( pOptions )
- pOptions->SetShowComments( mbShowAnnotations ? sal_True : sal_False );
-
- UpdateTags();
- break;
- }
+ ShowAnnotations( !mbShowAnnotations );
+ break;
}
}
@@ -313,6 +320,7 @@ void AnnotationManagerImpl::ExecuteAnnotation(SfxRequest& rReq )
void AnnotationManagerImpl::ExecuteInsertAnnotation(SfxRequest& /*rReq*/)
{
+ ShowAnnotations(true);
InsertAnnotation();
}
@@ -320,6 +328,8 @@ void AnnotationManagerImpl::ExecuteInsertAnnotation(SfxRequest& /*rReq*/)
void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq)
{
+ ShowAnnotations( true );
+
const SfxItemSet* pArgs = rReq.GetArgs();
switch( rReq.GetSlot() )
@@ -640,6 +650,8 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet)
void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward)
{
+ ShowAnnotations( true );
+
Reference< XAnnotation > xCurrent;
GetSelectedAnnotation( xCurrent );
SdPage* pPage = GetCurrentPage();
@@ -1213,7 +1225,7 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
nPageNum--;
}
- return static_cast< SdPage* >( mpDoc->GetMasterPage(nPageNum) );
+ return mpDoc->GetMasterSdPage(nPageNum,PK_STANDARD);
}
}
diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx
index a64421c26262..9f2c48e875d3 100644
--- a/sd/source/ui/annotations/annotationmanagerimpl.hxx
+++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx
@@ -124,6 +124,9 @@ public:
SdPage* GetCurrentPage();
SdDrawDocument* GetDoc() { return mpDoc; }
+
+ void ShowAnnotations(bool bShow);
+
private:
ViewShellBase& mrBase;
SdDrawDocument* mpDoc;
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index af219c3aadc3..d2b9b7b56b7d 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -717,6 +717,7 @@ void AnnotationTag::ClosePopup()
if( mpAnnotationWindow.get() )
{
mpAnnotationWindow->RemoveEventListener( LINK(this, AnnotationTag, WindowEventHandler));
+ mpAnnotationWindow->Deactivate();
mpAnnotationWindow.reset();
}
}