summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rwxr-xr-x[-rw-r--r--]sd/sdi/_drvwsh.sdi15
-rwxr-xr-x[-rw-r--r--]sd/sdi/drtxtob.sdi6
-rwxr-xr-x[-rw-r--r--]sd/sdi/outlnvsh.sdi15
-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
-rwxr-xr-xsd/uiconfig/sdraw/menubar/menubar.xml15
-rw-r--r--sd/uiconfig/sdraw/toolbar/findbar.xml8
-rwxr-xr-xsd/uiconfig/simpress/menubar/menubar.xml7
-rw-r--r--sd/uiconfig/simpress/toolbar/findbar.xml8
16 files changed, 173 insertions, 16 deletions
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 53813365a686..6d0d3ef33ce9 100644..100755
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2173,6 +2173,21 @@ interface DrawView
ExecMethod = FuSupport ;
StateMethod = GetCtrlState ;
]
+ SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
SID_TRANSLITERATE_LOWER // ole : no, status : ?
[
ExecMethod = FuSupport ;
diff --git a/sd/sdi/drtxtob.sdi b/sd/sdi/drtxtob.sdi
index 4e2ca49c0b82..f4133f0f4643 100644..100755
--- a/sd/sdi/drtxtob.sdi
+++ b/sd/sdi/drtxtob.sdi
@@ -202,5 +202,11 @@ shell TextObjectBar
ExecMethod = Execute;
StateMethod = GetAttrState;
]
+ SID_THES
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetAttrState ;
+ ]
+
}
diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi
index 1632b2fa4163..9639f1adc9dc 100644..100755
--- a/sd/sdi/outlnvsh.sdi
+++ b/sd/sdi/outlnvsh.sdi
@@ -433,6 +433,21 @@ interface OutlineView
ExecMethod = FuSupport ;
StateMethod = GetMenuState ;
]
+ SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
SID_TRANSLITERATE_UPPER // ole : no, status : ?
[
ExecMethod = FuSupport ;
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 );
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index 1373bfd60e10..91a69adeae6a 100755
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -186,12 +186,15 @@
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
diff --git a/sd/uiconfig/sdraw/toolbar/findbar.xml b/sd/uiconfig/sdraw/toolbar/findbar.xml
new file mode 100644
index 000000000000..9ef9d8a1a78f
--- /dev/null
+++ b/sd/uiconfig/sdraw/toolbar/findbar.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+</toolbar:toolbar>
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index 59bf75aa1025..90d5ac490aa4 100755
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -203,8 +203,11 @@
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
<menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
<menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
<menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
<menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
@@ -239,7 +242,7 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
<menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:Thesaurus"/>
+ <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
<menu:menuitem menu:id=".uno:Hyphenation"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:MoreDictionaries"/>
diff --git a/sd/uiconfig/simpress/toolbar/findbar.xml b/sd/uiconfig/simpress/toolbar/findbar.xml
new file mode 100644
index 000000000000..9ef9d8a1a78f
--- /dev/null
+++ b/sd/uiconfig/simpress/toolbar/findbar.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+</toolbar:toolbar>