summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/Outliner.cxx
diff options
context:
space:
mode:
authorMatthias Huetsch [mhu] <matthias.huetsch@oracle.com>2010-11-25 18:25:48 +0100
committerMatthias Huetsch [mhu] <matthias.huetsch@oracle.com>2010-11-25 18:25:48 +0100
commit563aab4eddce3503905a2b404f653531b3ba9439 (patch)
tree0c4f8c527f994528a3a0e5535ab0efdcc8f0a669 /sd/source/ui/view/Outliner.cxx
parente483e893b8b1dd980df9a23c813263e70f88abc7 (diff)
parent3dd16dcf3fe9b2da2dbfb49bbfccb95fc8b1a56f (diff)
Update from sibling repository.
Diffstat (limited to 'sd/source/ui/view/Outliner.cxx')
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/Outliner.cxx88
1 files changed, 18 insertions, 70 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 5314f6dbe768..356c03b82387 100644..100755
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -57,6 +57,8 @@
#include <vcl/metric.hxx>
#include <sfx2/viewfrm.hxx>
#include <svtools/langtab.hxx>
+#include <tools/diagnose_ex.h>
+
#include "strings.hrc"
#include "sdstring.hrc"
#include "eetext.hxx"
@@ -425,23 +427,6 @@ BOOL Outliner::SpellNextDocument (void)
}
-void Outliner::HandleOutsideChange (ChangeHint eHint)
-{
- switch (eHint)
- {
- case CH_VIEW_SHELL_INVALID:
- EndSpelling();
- mbPrepareSpellingPending = true;
- mbViewShellValid = false;
- break;
-
- case CH_VIEW_SHELL_VALID:
- mbViewShellValid = true;
- break;
- }
-}
-
-
/*************************************************************************
|*
@@ -566,7 +551,8 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
void Outliner::Initialize (bool bDirectionIsForward)
{
- bool bOldDirectionIsForward = mbDirectionIsForward;
+ const bool bIsAtEnd (maObjectIterator == ::sd::outliner::OutlinerContainer(this).end());
+ const bool bOldDirectionIsForward = mbDirectionIsForward;
mbDirectionIsForward = bDirectionIsForward;
if (maObjectIterator == ::sd::outliner::Iterator())
@@ -601,10 +587,19 @@ void Outliner::Initialize (bool bDirectionIsForward)
{
// Requested iteration direction has changed. Turn arround the iterator.
maObjectIterator.Reverse();
- // The iterator has pointed to the object one ahead/before the current
- // one. Now move it to the one before/ahead the current one.
- ++maObjectIterator;
- ++maObjectIterator;
+ if (bIsAtEnd)
+ {
+ // The iterator has pointed to end(), which after the search
+ // direction is reversed, becomes begin().
+ maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin();
+ }
+ else
+ {
+ // The iterator has pointed to the object one ahead/before the current
+ // one. Now move it to the one before/ahead the current one.
+ ++maObjectIterator;
+ ++maObjectIterator;
+ }
mbMatchMayExist = true;
}
@@ -974,7 +969,7 @@ void Outliner::ProvideNextTextObject (void)
}
catch (::com::sun::star::uno::Exception e)
{
- OSL_TRACE ("Outliner %p: caught exception while ending text edit mode", this);
+ DBG_UNHANDLED_EXCEPTION();
}
SetUpdateMode(FALSE);
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
@@ -1076,23 +1071,6 @@ void Outliner::EndOfSearch (void)
}
}
-
-
-
-void Outliner::InitPage (USHORT nPageIndex)
-{
- (void)nPageIndex;
-
- ::sd::outliner::IteratorPosition aPosition (*maObjectIterator);
- if (aPosition.meEditMode == EM_PAGE)
- mnPageCount = mpDrawDocument->GetSdPageCount(aPosition.mePageKind);
- else
- mnPageCount = mpDrawDocument->GetMasterSdPageCount(aPosition.mePageKind);
-}
-
-
-
-
void Outliner::ShowEndOfSearchDialog (void)
{
String aString;
@@ -1475,36 +1453,6 @@ bool Outliner::HandleFailedSearch (void)
}
-#if ENABLE_LAYOUT
-#define SvxSearchDialog Window
-#endif
-
-/** See task #95227# for discussion about correct parent for dialogs/info boxes.
-*/
-::Window* Outliner::GetParentForDialog (void)
-{
- ::Window* pParent = NULL;
-
- if (meMode == SEARCH)
- pParent = static_cast<SvxSearchDialog*>(
- SfxViewFrame::Current()->GetChildWindow(
- SvxSearchDialogWrapper::GetChildWindowId())->GetWindow());
-
- if (pParent == NULL)
- pParent = mpViewShell->GetActiveWindow();
-
- if (pParent == NULL)
- pParent = Application::GetDefDialogParent();
- //1.30->1.31 of sdoutl.cxx pParent = Application::GetDefModalDialogParent();
-
- return pParent;
-}
-
-#if ENABLE_LAYOUT
-#undef SvxSearchDialog
-#endif
-
-
SdrObject* Outliner::SetObject (
const ::sd::outliner::IteratorPosition& rPosition)
{