summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source')
-rwxr-xr-xsd/source/ui/unoidl/DrawController.cxx12
-rwxr-xr-xsd/source/ui/view/Outliner.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drtxtob.cxx31
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drtxtob1.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews8.cxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewse.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsf.cxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/outlnvs2.cxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/outlnvsh.cxx20
9 files changed, 107 insertions, 8 deletions
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 230feabe956a..b0eac4990c50 100755
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -29,6 +29,7 @@
#include "precompiled_sd.hxx"
#include "DrawController.hxx"
+#include "DrawDocShell.hxx"
#include "DrawSubController.hxx"
#include "sdpage.hxx"
@@ -54,6 +55,7 @@
#include <svx/fmshell.hxx>
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
+#include <boost/shared_ptr.hpp>
using namespace ::std;
using ::rtl::OUString;
@@ -164,6 +166,16 @@ void SAL_CALL DrawController::dispose (void)
{
mbDisposing = true;
+ boost::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell();
+ if ( pViewShell )
+ {
+ pViewShell->DeactivateCurrentFunction();
+ DrawDocShell* pDocShell = pViewShell->GetDocSh();
+ if ( pDocShell != NULL )
+ pDocShell->SetDocShellFunction(0);
+ }
+ pViewShell.reset();
+
// When the controller has not been detached from its view
// shell, i.e. mpViewShell is not NULL, then tell PaneManager
// and ViewShellManager to clear the shell stack.
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index a7c9786dd160..fd07d966ad47 100755
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -568,7 +568,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())
@@ -603,10 +604,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;
}
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index bcff1c573b14..8b88be3682e3 100644..100755
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -32,6 +32,14 @@
#include <svx/svxids.hrc>
+#include <i18npool/mslangid.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/unolingu.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lspcitem.hxx>
#include <editeng/adjitem.hxx>
@@ -39,6 +47,7 @@
#include <sfx2/app.hxx>
#include <svl/whiter.hxx>
#include <svl/itempool.hxx>
+#include <svl/stritem.hxx>
#include <svl/style.hxx>
#include <svl/languageoptions.hxx>
#include <sfx2/tplpitem.hxx>
@@ -71,6 +80,8 @@
using namespace sd;
+using namespace ::com::sun::star;
+
#define TextObjectBar
#include "sdslots.hxx"
@@ -371,6 +382,26 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
break;
+ case SID_THES:
+ {
+ EditView & rEditView = mpView->GetTextEditOutlinerView()->GetEditView();;
+ String aStatusVal;
+ LanguageType nLang = LANGUAGE_NONE;
+ bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView );
+ rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+
+ // disable "Thesaurus" context menu entry if there is nothing to look up
+ lang::Locale aLocale( SvxCreateLocale( nLang ) );
+ uno::Reference< linguistic2::XThesaurus > xThes( LinguMgr::GetThesaurus() );
+ if (!bIsLookUpWord ||
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ rSet.DisableItem( SID_THES );
+
+ //! avoid puting the same item as SfxBoolItem at the end of this function
+ nSlotId = 0;
+ }
+ break;
+
default:
break;
}
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 4ca26501fedb..4a6d83e376e7 100644..100755
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -30,8 +30,12 @@
#include "TextObjectBar.hxx"
+
#include <svx/svxids.hrc>
+#include <editeng/editview.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/unolingu.hxx>
#include <editeng/outliner.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lspcitem.hxx>
@@ -331,6 +335,16 @@ void TextObjectBar::Execute( SfxRequest &rReq )
}
break;
+ case SID_THES:
+ {
+ String aReplaceText;
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False );
+ if (pItem2)
+ aReplaceText = pItem2->GetValue();
+ if (aReplaceText.Len() > 0)
+ ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText );
+ }
+ break;
default:
{
diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx
index 54cd0c792c94..54cd0c792c94 100644..100755
--- a/sd/source/ui/view/drviews8.cxx
+++ b/sd/source/ui/view/drviews8.cxx
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 1a667b28f6d4..6f6f49fdc93c 100644..100755
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -31,7 +31,8 @@
#include <com/sun/star/presentation/XPresentation2.hpp>
#include <com/sun/star/form/FormButtonType.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/i18n/TransliterationModules.hdl>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <comphelper/processfactory.hxx>
@@ -1401,6 +1402,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
}
break;
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ case SID_TRANSLITERATE_TITLE_CASE:
+ case SID_TRANSLITERATE_TOGGLE_CASE:
case SID_TRANSLITERATE_UPPER:
case SID_TRANSLITERATE_LOWER:
case SID_TRANSLITERATE_HALFWIDTH:
@@ -1416,6 +1420,15 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
switch( nSId )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nType = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nType = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nType = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nType = TransliterationModules_LOWERCASE_UPPERCASE;
break;
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 0a5f743bb738..ac6b46f3018b 100644..100755
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -250,6 +250,9 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_KATAGANA, sal_True );
}
+ rSet.DisableItem( SID_TRANSLITERATE_SENTENCE_CASE );
+ rSet.DisableItem( SID_TRANSLITERATE_TITLE_CASE );
+ rSet.DisableItem( SID_TRANSLITERATE_TOGGLE_CASE );
rSet.DisableItem( SID_TRANSLITERATE_UPPER );
rSet.DisableItem( SID_TRANSLITERATE_LOWER );
rSet.DisableItem( SID_TRANSLITERATE_HALFWIDTH );
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 2acf143ff0b3..2acf143ff0b3 100644..100755
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 1467e6c24bd0..bbdcf35a4e34 100644..100755
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -59,7 +59,8 @@
#include <svx/svdorect.hxx>
#include <sot/formats.hxx>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
-#include <com/sun/star/i18n/TransliterationModules.hdl>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <editeng/unolingu.hxx>
#include <comphelper/processfactory.hxx>
#include <editeng/outlobj.hxx>
@@ -528,6 +529,9 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
if( pOlView && (
+ (nSlot == SID_TRANSLITERATE_SENTENCE_CASE) ||
+ (nSlot == SID_TRANSLITERATE_TITLE_CASE) ||
+ (nSlot == SID_TRANSLITERATE_TOGGLE_CASE) ||
(nSlot == SID_TRANSLITERATE_UPPER) ||
(nSlot == SID_TRANSLITERATE_LOWER) ||
(nSlot == SID_TRANSLITERATE_HALFWIDTH) ||
@@ -661,6 +665,9 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
}
break;
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ case SID_TRANSLITERATE_TITLE_CASE:
+ case SID_TRANSLITERATE_TOGGLE_CASE:
case SID_TRANSLITERATE_UPPER:
case SID_TRANSLITERATE_LOWER:
case SID_TRANSLITERATE_HALFWIDTH:
@@ -676,6 +683,15 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
switch( nSlot )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nType = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nType = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nType = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nType = TransliterationModules_LOWERCASE_UPPERCASE;
break;
@@ -988,7 +1004,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
GetDoc()->SetChanged(TRUE);
}
- // Da berladen, muss hier der Status gesetzt werden
+ // Da �berladen, muss hier der Status gesetzt werden
if( !GetDocSh()->IsModified() )
{
rSet.DisableItem( SID_SAVEDOC );