[ooo-build-commit] Branch 'ooo/OOO320' - sd/sdi sd/source sd/uiconfig
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri Oct 9 08:39:56 PDT 2009
sd/sdi/drviewsh.sdi | 16 ++++-----
sd/source/ui/annotations/annotationmanager.cxx | 34 ++++++++++++++-------
sd/source/ui/annotations/annotationmanagerimpl.hxx | 3 +
sd/source/ui/annotations/annotationtag.cxx | 1
sd/uiconfig/sdraw/menubar/menubar.xml | 2 -
sd/uiconfig/simpress/menubar/menubar.xml | 2 -
6 files changed, 37 insertions(+), 21 deletions(-)
New commits:
commit 3aaa22b7fdcb3feac99ee69efd4db3af2629c8d3
Author: Kurt Zenker <kz at openoffice.org>
Date: Thu Oct 1 12:25:02 2009 +0000
CWS-TOOLING: integrate CWS impressnotes03_OOO320
2009-09-28 16:30:17 +0200 cl r276496 : #i105382# use correct method to get master page
2009-09-28 12:23:04 +0200 cl r276486 : #i105266# also save text on close to avoid focus trouble under linux
2009-09-25 13:59:50 +0200 cl r276456 : #i105266# resolved a merge conflict
2009-09-25 13:57:24 +0200 cl r276454 : #i105266# resolved a merge conflict
2009-09-25 13:51:12 +0200 cl r276450 : #i105266# resolved a merge conflict
2009-09-25 13:40:08 +0200 cl r276447 : #i105266# resolved a merge conflict
diff --git a/sd/sdi/drviewsh.sdi b/sd/sdi/drviewsh.sdi
index 8b63abb..5aa32b1 100644
--- a/sd/sdi/drviewsh.sdi
+++ b/sd/sdi/drviewsh.sdi
@@ -180,17 +180,12 @@ interface ImpressEditView : DrawView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
-}
-
-shell DrawViewShell
-{
- import ImpressEditView[Automation];
- SID_INSERT_POSTIT
+ SID_SHOW_POSTIT
[
ExecMethod = ExecuteAnnotation;
StateMethod = GetAnnotationState;
]
- SID_SHOW_POSTIT
+ SID_INSERT_POSTIT
[
ExecMethod = ExecuteAnnotation;
StateMethod = GetAnnotationState;
@@ -224,7 +219,12 @@ shell DrawViewShell
[
ExecMethod = ExecuteAnnotation;
StateMethod = GetAnnotationState;
- ]
+ ]
+}
+
+shell DrawViewShell
+{
+ import ImpressEditView[Automation];
}
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index e9880f9..0190819 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 8b9e106..ce5b01d 100755
--- 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 6c2ec6a..5206e4a 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();
}
}
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index fcc7246..9e5d927 100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -105,7 +105,7 @@
<menu:menuitem menu:id=".uno:HelplinesFront"/>
</menu:menupopup>
</menu:menu>
- <menu:menuitem menu:id=".uno:ShowAnnotation"/>
+ <menu:menuitem menu:id=".uno:ShowAnnotations"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:Navigator"/>
<menu:menuseparator/>
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index d762a07..c1dacd3 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -119,7 +119,7 @@
<menu:menuitem menu:id=".uno:HelplinesFront"/>
</menu:menupopup>
</menu:menu>
- <menu:menuitem menu:id=".uno:ShowAnnotation"/>
+ <menu:menuitem menu:id=".uno:ShowAnnotations"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:Navigator"/>
<menu:menuseparator/>
More information about the ooo-build-commit
mailing list