summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-12-16 14:13:32 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-12-16 14:13:32 +0000
commit457052817ad4b0e04dda1d0931f7b8c900c0818f (patch)
tree31a0cda76cd832acb7169e701859824aa61f2171 /sd/source/ui/docshell
parentf351e9aa30010fec27deb0ad705fd35744675c5b (diff)
parentc4b49b68e000cd0892af5d5c1335f4ff9365a6ad (diff)
tl74: merge with DEV300 m60
Diffstat (limited to 'sd/source/ui/docshell')
-rw-r--r--sd/source/ui/docshell/docshel4.cxx57
-rw-r--r--sd/source/ui/docshell/docshell.cxx4
2 files changed, 46 insertions, 15 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 7746eed80b9a..4a4e62f2a106 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -759,24 +759,59 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark)
DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(mpViewShell);
ViewShellBase& rBase (mpViewShell->GetViewShellBase());
- String aBookmark( rBookmark );
-
- // Ist das Bookmark eine Seite?
- BOOL bIsMasterPage;
- USHORT nPageNumber = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
+ BOOL bIsMasterPage = sal_False;
+ USHORT nPageNumber = SDRPAGE_NOTFOUND;
SdrObject* pObj = NULL;
- if (nPageNumber == SDRPAGE_NOTFOUND)
+ rtl::OUString sBookmark( rBookmark );
+ const rtl::OUString sInteraction( RTL_CONSTASCII_USTRINGPARAM( "action?" ) );
+ if ( sBookmark.match( sInteraction ) )
{
- // Ist das Bookmark ein Objekt?
- pObj = mpDoc->GetObj(aBookmark);
-
- if (pObj)
+ const rtl::OUString sJump( RTL_CONSTASCII_USTRINGPARAM( "jump=" ) );
+ if ( sBookmark.match( sJump, sInteraction.getLength() ) )
{
- nPageNumber = pObj->GetPage()->GetPageNum();
+ rtl::OUString aDestination( sBookmark.copy( sInteraction.getLength() + sJump.getLength() ) );
+ if ( aDestination.match( String( RTL_CONSTASCII_USTRINGPARAM( "firstslide" ) ) ) )
+ {
+ nPageNumber = 1;
+ }
+ else if ( aDestination.match( String( RTL_CONSTASCII_USTRINGPARAM( "lastslide" ) ) ) )
+ {
+ nPageNumber = mpDoc->GetPageCount() - 2;
+ }
+ else if ( aDestination.match( String( RTL_CONSTASCII_USTRINGPARAM( "previousslide" ) ) ) )
+ {
+ SdPage* pPage = pDrawViewShell->GetActualPage();
+ nPageNumber = pPage->GetPageNum();
+ nPageNumber = nPageNumber > 2 ? nPageNumber - 2 : SDRPAGE_NOTFOUND;
+ }
+ else if ( aDestination.match( String( RTL_CONSTASCII_USTRINGPARAM( "nextslide" ) ) ) )
+ {
+ SdPage* pPage = pDrawViewShell->GetActualPage();
+ nPageNumber = pPage->GetPageNum() + 2;
+ if ( nPageNumber >= mpDoc->GetPageCount() )
+ nPageNumber = SDRPAGE_NOTFOUND;
+ }
}
}
+ else
+ {
+ String aBookmark( rBookmark );
+
+ // Ist das Bookmark eine Seite?
+ nPageNumber = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
+
+ if (nPageNumber == SDRPAGE_NOTFOUND)
+ {
+ // Ist das Bookmark ein Objekt?
+ pObj = mpDoc->GetObj(aBookmark);
+ if (pObj)
+ {
+ nPageNumber = pObj->GetPage()->GetPageNum();
+ }
+ }
+ }
if (nPageNumber != SDRPAGE_NOTFOUND)
{
// Jump to the bookmarked page. This is done in three steps.
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index f66c1d130564..f9381d08a219 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -118,9 +118,6 @@ namespace sd {
GraphicFilter* GetGrfFilter();
-SfxProgress* DrawDocShell::mpSpecialProgress = NULL;
-Link* DrawDocShell::mpSpecialProgressHdl = NULL;
-
/*************************************************************************
|*
|* SFX-Slotmaps und -Definitionen
@@ -526,7 +523,6 @@ void DrawDocShell::ApplySlotFilter() const
}
}
-
void DrawDocShell::SetModified( BOOL bSet /* = TRUE */ )
{
SfxObjectShell::SetModified( bSet );