[Libreoffice-commits] core.git: sw/sdi sw/source

2023-02-07 Thread Heiko Tietze (via logerrit)
 sw/sdi/viewsh.sdi |4 
 sw/source/uibase/uiview/pview.cxx |6 +
 sw/source/uibase/utlui/viewlayoutctrl.cxx |  169 --
 3 files changed, 102 insertions(+), 77 deletions(-)

New commits:
commit 0b9aef0aaa7c17cc7da722002e27996a01ffc7fa
Author: Heiko Tietze 
AuthorDate: Mon Jan 23 13:50:55 2023 +0100
Commit: Heiko Tietze 
CommitDate: Tue Feb 7 13:53:45 2023 +

Resolves tdf#148441 - Hide viewlayout in statusbar in preview mode

Change-Id: I255ad3b952d7b424e9ff0475798bbe0cfc57ef9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146004
Tested-by: Jenkins
Reviewed-by: Rafael Lima 

diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi
index e4f3c0a362e0..86dd74a62c91 100644
--- a/sw/sdi/viewsh.sdi
+++ b/sw/sdi/viewsh.sdi
@@ -390,6 +390,10 @@ interface TextPrintPreview
 ExecMethod = Execute ;
 StateMethod = GetState ;
 ]
+SID_ATTR_VIEWLAYOUT
+[
+StateMethod = GetState ;
+]
 FN_CLOSE_PAGEPREVIEW
 [
 ExecMethod = Execute ;
diff --git a/sw/source/uibase/uiview/pview.cxx 
b/sw/source/uibase/uiview/pview.cxx
index f6db5bb9d928..84c1cf06680c 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1015,6 +1016,11 @@ void  SwPagePreview::GetState( SfxItemSet& rSet )
 }
 }
 break;
+case SID_ATTR_VIEWLAYOUT:
+{
+rSet.DisableItem( SID_ATTR_VIEWLAYOUT );
+}
+break;
 case FN_SHOW_MULTIPLE_PAGES:
 // should never be disabled
 break;
diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx 
b/sw/source/uibase/utlui/viewlayoutctrl.cxx
index 8e2ef79c5a0e..b0631559ac68 100644
--- a/sw/source/uibase/utlui/viewlayoutctrl.cxx
+++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx
@@ -34,7 +34,7 @@ SFX_IMPL_STATUSBAR_CONTROL( SwViewLayoutControl, 
SvxViewLayoutItem );
 
 struct SwViewLayoutControl::SwViewLayoutControl_Impl
 {
-sal_uInt16  mnState; // 0 = auto, 1= single, 2 = book, 3 = none
+sal_uInt16  mnState; // 0 = auto, 1= single, 2 = book, 3 = none, 4 = 
off
 Image   maImageSingleColumn;
 Image   maImageSingleColumn_Active;
 Image   maImageAutomatic;
@@ -64,7 +64,10 @@ SwViewLayoutControl::~SwViewLayoutControl()
 void SwViewLayoutControl::StateChangedAtStatusBarControl( sal_uInt16 /*nSID*/, 
SfxItemState eState, const SfxPoolItem* pState )
 {
 if ( SfxItemState::DEFAULT != eState || pState->IsVoidItem() )
+{
 GetStatusBar().SetItemText( GetId(), OUString() );
+mpImpl->mnState = 4; //tdf#148441 switch off is disabled
+}
 else
 {
 assert( dynamic_cast< const SvxViewLayoutItem *>( pState )  && 
"invalid item type" );
@@ -94,102 +97,114 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& 
rUsrEvt )
 
 const tools::Rectangle aControlRect = getControlRect();
 
-const bool bSingleColumn= 0 == mpImpl->mnState;
-const bool bAutomatic   = 1 == mpImpl->mnState;
-const bool bBookMode= 2 == mpImpl->mnState;
-
-const tools::Long nImageWidthSum = 
mpImpl->maImageSingleColumn.GetSizePixel().Width() +
-
mpImpl->maImageAutomatic.GetSizePixel().Width() +
-mpImpl->maImageBookMode.GetSizePixel().Width();
-
-const tools::Long nXOffset = (aRect.GetWidth() - nImageWidthSum) / 2;
-const tools::Long nYOffset = (aControlRect.GetHeight() - 
mpImpl->maImageSingleColumn.GetSizePixel().Height()) / 2;
+if (mpImpl->mnState < 4)
+{
+const bool bSingleColumn= 0 == mpImpl->mnState;
+const bool bAutomatic   = 1 == mpImpl->mnState;
+const bool bBookMode= 2 == mpImpl->mnState;
 
-aRect.AdjustLeft( nXOffset );
-aRect.AdjustTop( nYOffset );
+const tools::Long nImageWidthSum = 
mpImpl->maImageSingleColumn.GetSizePixel().Width() +
+
mpImpl->maImageAutomatic.GetSizePixel().Width() +
+
mpImpl->maImageBookMode.GetSizePixel().Width();
 
-// draw single column image:
-pDev->DrawImage( aRect.TopLeft(), bSingleColumn ? 
mpImpl->maImageSingleColumn_Active : mpImpl->maImageSingleColumn );
+const tools::Long nXOffset = (aRect.GetWidth() - nImageWidthSum) / 2;
+const tools::Long nYOffset = (aControlRect.GetHeight() - 
mpImpl->maImageSingleColumn.GetSizePixel().Height()) / 2;
 
-// draw automatic image:
-aRect.AdjustLeft(mpImpl->maImageSingleColumn.GetSizePixel().Width() );
-pDev->DrawImage( aRect.TopLeft(), bAutomatic ? 
mpImpl->maImageAutomatic_Active   : mpImpl->maImageAutomatic );
+aRect.AdjustLeft( nXOffset );
+aRect.AdjustTop( nYOffset );
 
-// draw bookmode image:
-

[Libreoffice-commits] core.git: sw/sdi sw/source

2022-02-26 Thread Jim Raykowski (via logerrit)
 sw/sdi/swriter.sdi  |1 
 sw/source/uibase/uiview/viewmdi.cxx |   57 +---
 2 files changed, 34 insertions(+), 24 deletions(-)

New commits:
commit 5df0289f6af5aa7142017b56a8e17c134d54fe41
Author: Jim Raykowski 
AuthorDate: Fri Feb 25 00:31:29 2022 -0900
Commit: Jim Raykowski 
CommitDate: Sun Feb 27 05:08:38 2022 +0100

tdf#147565 Make navigate by comments skip hidden comments

Change-Id: I80f55146529505e5b6146db8cc324971fbc475e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130518
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 0e994261c28c..265a4000c5a0 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -2494,7 +2494,6 @@ SfxVoidItem InsertAnnotation FN_POSTIT
 Container = FALSE,
 RecordAbsolute = FALSE,
 RecordPerSet;
-Asynchron;
 
 AccelConfig = TRUE,
 MenuConfig = TRUE,
diff --git a/sw/source/uibase/uiview/viewmdi.cxx 
b/sw/source/uibase/uiview/viewmdi.cxx
index b85c05eb1af8..9acb7f8f7bd0 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -530,38 +530,48 @@ IMPL_LINK( SwView, MoveNavigationHdl, void*, p, void )
 {
 if (m_pPostItMgr->HasNotes())
 {
-rSh.EnterStdMode();
-sw::annotation::SwAnnotationWin* pPostIt = 
m_pPostItMgr->GetActiveSidebarWin();
-if (pPostIt)
-m_pPostItMgr->SetActiveSidebarWin(nullptr);
+m_pPostItMgr->AssureStdModeAtShell();
+m_pPostItMgr->SetActiveSidebarWin(nullptr);
+GetEditWin().GrabFocus();
+SwShellCursor* pCursor = rSh.GetCursor_();
+SwCursorSaveState aSaveState(*pCursor);
 SwFieldType* pFieldType = rSh.GetFieldType(0, 
SwFieldIds::Postit);
+bool bWrapped = false;
+bool bFound = false;
 rSh.StartAction();
-if (!rSh.MoveFieldType(pFieldType, bNext))
+while (!bFound)
 {
-// no postits found in the move direction
-// wrap and try again
-SwShellCursor* pCursor = rSh.GetCursor_();
-SwCursorSaveState aSaveState(*pCursor);
-rSh.SttEndDoc(bNext);
-if (rSh.MoveFieldType(pFieldType, bNext))
+if (!rSh.MoveFieldType(pFieldType, bNext))
 {
-GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
-SvxSearchDialogWrapper::SetSearchLabel(bNext ? 
SearchLabel::EndWrapped :
-   
SearchLabel::StartWrapped);
+if (bWrapped)
+break;
+bWrapped = true;
+rSh.SttEndDoc(bNext);
+continue;
 }
-else
+do
 {
-// no visible postits
-pCursor->RestoreSavePos();
-
SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NavElementNotFound);
-}
+auto pAnnotationWin = m_pPostItMgr->GetAnnotationWin(
+rSh.GetPostItFieldAtCursor());
+if (pAnnotationWin && pAnnotationWin->IsVisible())
+bFound = true;
+} while (!bFound && rSh.MoveFieldType(pFieldType, bNext));
 }
-else
+if (!bFound)
 {
-GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
-SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty 
);
+pCursor->RestoreSavePos();
+
SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NavElementNotFound);
 }
 rSh.EndAction();
+if (bFound)
+{
+GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
+if (bWrapped)
+SvxSearchDialogWrapper::SetSearchLabel(bNext ? 
SearchLabel::EndWrapped :
+   
SearchLabel::StartWrapped);
+else
+
SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty);
+}
 }
 else
 
SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NavElementNotFound);
@@ -597,7 +607,8 @@ IMPL_LINK( SwView, MoveNavigationHdl, void*, p, void )
 bNext ? rSh.GetNavigationMgr().goForward() : 
rSh.GetNavigationMgr().goBack();
 break;
 }
-m_pEditWin->GrabFocus();
+if 

[Libreoffice-commits] core.git: sw/sdi sw/source

2022-01-27 Thread Justin Luth (via logerrit)
 sw/sdi/drwtxtsh.sdi  |5 +
 sw/source/uibase/shells/drwtxtex.cxx |9 +
 2 files changed, 14 insertions(+)

New commits:
commit bb183ef3734cc3ccad81bd1ca1309f726c279870
Author: Justin Luth 
AuthorDate: Thu Jan 27 15:08:21 2022 +0200
Commit: Justin Luth 
CommitDate: Fri Jan 28 07:16:50 2022 +0100

related tdf#111733 TextCharacterSpacingControl sw draw: goto position tab

The kerning button on the sidebar very unhelpfully
did nothing at all in draw text (like textboxes).
It should have brought the user directly to the "position" tab
where the kerning property can be found.

Change-Id: I89d4a180ac19e1e096b9157f3f32a254ff138940
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129045
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi
index c9e76ab9fbfb..3acf703d75e8 100644
--- a/sw/sdi/drwtxtsh.sdi
+++ b/sw/sdi/drwtxtsh.sdi
@@ -393,6 +393,11 @@ interface TextDrawText
 StateMethod = GetState ;
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
+SID_CHAR_DLG_POSITION
+[
+ExecMethod = Execute ;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
 SID_CHAR_DLG_FOR_PARAGRAPH
 [
 ExecMethod = Execute ;
diff --git a/sw/source/uibase/shells/drwtxtex.cxx 
b/sw/source/uibase/shells/drwtxtex.cxx
index 068a9be9feca..502fd7a6fa09 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -353,6 +353,7 @@ void SwDrawTextShell::Execute( SfxRequest  )
 break;
 
 case SID_CHAR_DLG_EFFECT:
+case SID_CHAR_DLG_POSITION:
 case SID_CHAR_DLG:
 case SID_CHAR_DLG_FOR_PARAGRAPH:
 {
@@ -386,6 +387,10 @@ void SwDrawTextShell::Execute( SfxRequest  )
 {
 pDlg->SetCurPageId("fonteffects");
 }
+else if (nSlot == SID_CHAR_DLG_POSITION)
+{
+pDlg->SetCurPageId("position");
+}
 else if (nSlot == SID_CHAR_DLG_FOR_PARAGRAPH)
 {
 pDlg->SetCurPageId("font");
@@ -640,6 +645,10 @@ void SwDrawTextShell::Execute( SfxRequest  )
 {
 
GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT);
 }
+else if (nEEWhich == EE_CHAR_KERNING)
+{
+
GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
+}
 
 
 SetAttrToMarked(aNewAttr);


[Libreoffice-commits] core.git: sw/sdi sw/source

2022-01-27 Thread Justin Luth (via logerrit)
 sw/sdi/_annotsh.sdi |7 +++
 sw/source/uibase/shells/annotsh.cxx |   10 ++
 2 files changed, 17 insertions(+)

New commits:
commit e1f82fec6262db708f7911d20b62b74a4b4feab2
Author: Justin Luth 
AuthorDate: Thu Jan 27 15:21:37 2022 +0200
Commit: Justin Luth 
CommitDate: Fri Jan 28 05:58:09 2022 +0100

related tdf#11173 TextCharacterSpacingControl sw annot: goto position tab

The kerning button on the sidebar very unhelpfully
did nothing at all in draw text (like textboxes).
It should have brought the user directly to the "position" tab
where the kerning property can be found.

Change-Id: I83687c732cc45bb28a835e878d0c91f10fb713ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129046
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi
index b335fb9e0676..ff720d238226 100644
--- a/sw/sdi/_annotsh.sdi
+++ b/sw/sdi/_annotsh.sdi
@@ -326,6 +326,13 @@ interface _Annotation
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
 
+SID_CHAR_DLG_POSITION
+[
+ExecMethod = Exec ;
+StateMethod = GetState ;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
+
 SID_ATTR_CHAR_WEIGHT // api:
 [
 ExecMethod = Exec ;
diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index 61b665058381..95880f303579 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -449,6 +449,7 @@ void SwAnnotationShell::Exec( SfxRequest  )
 break;
 }
 case SID_CHAR_DLG_EFFECT:
+case SID_CHAR_DLG_POSITION:
 case SID_CHAR_DLG:
 {
 const SfxItemSet* pArgs = rReq.GetArgs();
@@ -474,6 +475,10 @@ void SwAnnotationShell::Exec( SfxRequest  )
 {
 pDlg->SetCurPageId("fonteffects");
 }
+if (nSlot == SID_CHAR_DLG_POSITION)
+{
+pDlg->SetCurPageId("position");
+}
 else if (pItem)
 {
 pDlg->SetCurPageId(OUStringToOString(pItem->GetValue(), 
RTL_TEXTENCODING_UTF8));
@@ -582,6 +587,11 @@ void SwAnnotationShell::Exec( SfxRequest  )
 {
 m_rView.GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT);
 }
+else if (nEEWhich == EE_CHAR_KERNING)
+{
+
m_rView.GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
+}
+
 
 tools::Rectangle aOutRect = pOLV->GetOutputArea();
 if (tools::Rectangle() != aOutRect && aNewAttr.Count())


[Libreoffice-commits] core.git: sw/sdi sw/source

2021-10-19 Thread Jim Raykowski (via logerrit)
 sw/sdi/_navsh.sdi |2 --
 sw/source/core/crsr/crstrvl.cxx   |6 ++
 sw/source/core/crsr/trvlfnfl.cxx  |   10 ++
 sw/source/uibase/wrtsh/navmgr.cxx |4 
 sw/source/uibase/wrtsh/wrtsh2.cxx |4 
 5 files changed, 20 insertions(+), 6 deletions(-)

New commits:
commit cf8de077f885b7632967c8bdfde98279d98f4cce
Author: Jim Raykowski 
AuthorDate: Mon Oct 18 21:49:45 2021 -0800
Commit: Jim Raykowski 
CommitDate: Wed Oct 20 02:42:57 2021 +0200

tdf#74604 tdf#54412 Make recency work for hyperlink, field and footnote

cursor position changes

Change-Id: I451cb5a538fd4baf00282238741011c6d4fc17b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123793
Tested-by: Jenkins
Reviewed-by: V, Stuart Foote 
Reviewed-by: Jim Raykowski 

diff --git a/sw/sdi/_navsh.sdi b/sw/sdi/_navsh.sdi
index 03ecd8498544..413355e4312f 100644
--- a/sw/sdi/_navsh.sdi
+++ b/sw/sdi/_navsh.sdi
@@ -13,14 +13,12 @@ interface _Navigation
 [
 ExecMethod = Execute ;
 StateMethod = GetState;
-DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
 
 SfxVoidItem NavigateForward FN_NAVIGATION_FORWARD
 [
 ExecMethod = Execute ;
 StateMethod = GetState;
-DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
 
 }
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index d241ba739bf8..e2e5822a3103 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -833,6 +833,9 @@ bool SwCursorShell::MoveFieldType(
 
 bool SwCursorShell::GotoFootnoteAnchor(const SwTextFootnote& rTextFootnote)
 {
+if (SwWrtShell* pWrtSh = dynamic_cast(this))
+pWrtSh->addCurrentPosition();
+
 bool bRet = false;
 SwCursor* pCursor = getShellCursor(true);
 
@@ -1482,6 +1485,9 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
 bRet = true;
 if( bSetCursor )
 {
+if (SwWrtShell* pWrtSh = 
dynamic_cast(this))
+pWrtSh->addCurrentPosition();
+
 SwCallLink aLk( *this ); // watch Cursor-Moves
 SwCursorSaveState aSaveState( *m_pCurrentCursor );
 m_pCurrentCursor->GetPoint()->nNode = 
*static_cast(pTextAttr)->GetStartNode();
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 45dcb5415afa..62c30c55f0dc 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -30,9 +30,13 @@
 #include 
 #include "callnk.hxx"
 #include 
+#include 
 
 bool SwCursorShell::CallCursorShellFN( FNCursorShell fnCursor )
 {
+if (SwWrtShell* pWrtSh = dynamic_cast(this))
+pWrtSh->addCurrentPosition();
+
 SwCallLink aLk( *this ); // watch Cursor-Moves
 bool bRet = (this->*fnCursor)();
 if( bRet )
@@ -43,6 +47,9 @@ bool SwCursorShell::CallCursorShellFN( FNCursorShell fnCursor 
)
 
 bool SwCursorShell::CallCursorFN( FNCursor fnCursor )
 {
+if (SwWrtShell* pWrtSh = dynamic_cast(this))
+pWrtSh->addCurrentPosition();
+
 SwCallLink aLk( *this ); // watch Cursor-Moves
 SwCursor* pCursor = getShellCursor( true );
 bool bRet = (pCursor->*fnCursor)();
@@ -161,6 +168,9 @@ bool SwCursor::GotoFootnoteAnchor()
 
 bool SwCursorShell::GotoFootnoteAnchor()
 {
+if (SwWrtShell* pWrtSh = dynamic_cast(this))
+pWrtSh->addCurrentPosition();
+
 // jump from footnote to anchor
 SwCallLink aLk( *this ); // watch Cursor-Moves
 bool bRet = m_pCurrentCursor->GotoFootnoteAnchor();
diff --git a/sw/source/uibase/wrtsh/navmgr.cxx 
b/sw/source/uibase/wrtsh/navmgr.cxx
index 1960f831e4ee..db97e2919146 100644
--- a/sw/source/uibase/wrtsh/navmgr.cxx
+++ b/sw/source/uibase/wrtsh/navmgr.cxx
@@ -170,10 +170,6 @@ void SwNavigationMgr::goForward() {
 
 bool SwNavigationMgr::addEntry(const SwPosition& rPos) {
 
-// For additions other than to the end, check here if the cursor position 
has changed
-if (m_nCurrent < m_entries.size() && (rPos == 
*m_entries[m_nCurrent]->GetPoint()))
-return false;
-
 // Flags that will be used for refreshing the buttons
 bool bBackWasDisabled = !backEnabled();
 bool bForwardWasEnabled = forwardEnabled();
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx 
b/sw/source/uibase/wrtsh/wrtsh2.cxx
index a4f050492328..77a6d4c19d28 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -338,6 +338,8 @@ void SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const 
SfxItemSet* pSet)
 
 void SwWrtShell::ClickToField(const SwField& rField, bool bExecHyperlinks)
 {
+addCurrentPosition();
+
 // cross reference field must not be selected because it moves the cursor
 if (SwFieldIds::GetRef != rField.GetTyp()->Which())
 {
@@ -450,6 +452,8 @@ void SwWrtShell::ClickToField(const SwField& rField, 

[Libreoffice-commits] core.git: sw/sdi sw/source

2021-03-01 Thread mert (via logerrit)
 sw/sdi/_viewsh.sdi |5 +
 sw/sdi/drawsh.sdi  |5 +
 sw/source/uibase/shells/drawsh.cxx |   16 +++-
 sw/source/uibase/uiview/view2.cxx  |   18 ++
 4 files changed, 43 insertions(+), 1 deletion(-)

New commits:
commit 9e7e616a9c3363cf06801a1974711c4dcef97476
Author: mert 
AuthorDate: Fri Feb 19 09:37:19 2021 +0300
Commit: Mert Tumer 
CommitDate: Tue Mar 2 08:27:34 2021 +0100

Implemented MoveShapeHandle uno command for sw

Change-Id: I9feccc4fa1a4d7426609afa474f87ab12c769090
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111512
Tested-by: Jenkins

diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index 7b11d4064d1f..f55496ee26a4 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -976,5 +976,10 @@ interface BaseTextEditView
 MenuConfig , AccelConfig , ToolBoxConfig ;
 ]
 
+SID_MOVE_SHAPE_HANDLE
+[
+ExecMethod = Execute ;
+]
+
 }
 
diff --git a/sw/sdi/drawsh.sdi b/sw/sdi/drawsh.sdi
index 5ea1f46d1ecc..a4e999872e48 100644
--- a/sw/sdi/drawsh.sdi
+++ b/sw/sdi/drawsh.sdi
@@ -537,5 +537,10 @@ shell SwDrawShell : SwDrawBaseShell
 StateMethod = GetState ;
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
+
+SID_MOVE_SHAPE_HANDLE
+[
+ExecMethod = Execute ;
+]
 }
 
diff --git a/sw/source/uibase/shells/drawsh.cxx 
b/sw/source/uibase/shells/drawsh.cxx
index 09b6bdbb3a0d..7589507511a9 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -197,7 +197,21 @@ void SwDrawShell::Execute(SfxRequest )
 GetView().FlipDrawRotate();
 }
 break;
-
+case SID_MOVE_SHAPE_HANDLE:
+{
+if (pArgs && pArgs->Count() == 3)
+{
+const SfxUInt32Item* handleNumItem = 
rReq.GetArg(FN_PARAM_1);
+const SfxUInt32Item* newPosXTwips = 
rReq.GetArg(FN_PARAM_2);
+const SfxUInt32Item* newPosYTwips = 
rReq.GetArg(FN_PARAM_3);
+
+const sal_uLong handleNum = handleNumItem->GetValue();
+const sal_uLong newPosX = newPosXTwips->GetValue();
+const sal_uLong newPosY = newPosYTwips->GetValue();
+pSdrView->MoveShapeHandle(handleNum, Point(newPosX, newPosY));
+}
+}
+break;
 case SID_BEZIER_EDIT:
 if (GetView().IsDrawRotate())
 {
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index e76fc2f30e41..1946f6a3a02d 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1348,6 +1348,24 @@ void SwView::Execute(SfxRequest )
 rReq.SetReturnValue(SfxBoolItem(nSlot, InsertGraphicDlg( rReq )));
 }
 break;
+case SID_MOVE_SHAPE_HANDLE:
+{
+if (pArgs && pArgs->Count() == 3)
+{
+SdrView *pSdrView = m_pWrtShell->HasDrawView() ? 
m_pWrtShell->GetDrawView() : nullptr;
+if (pSdrView == nullptr)
+break;
+const SfxUInt32Item* handleNumItem = 
rReq.GetArg(FN_PARAM_1);
+const SfxUInt32Item* newPosXTwips = 
rReq.GetArg(FN_PARAM_2);
+const SfxUInt32Item* newPosYTwips = 
rReq.GetArg(FN_PARAM_3);
+
+const sal_uLong handleNum = handleNumItem->GetValue();
+const sal_uLong newPosX = newPosXTwips->GetValue();
+const sal_uLong newPosY = newPosYTwips->GetValue();
+pSdrView->MoveShapeHandle(handleNum, Point(newPosX, newPosY));
+}
+break;
+}
 
 default:
 OSL_ENSURE(false, "wrong dispatcher");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source

2020-09-26 Thread Jim Raykowski (via logerrit)
 sw/sdi/_viewsh.sdi   |   10 ++
 sw/source/uibase/uiview/view2.cxx|   13 +
 sw/source/uibase/uiview/viewmdi.cxx  |3 +++
 sw/source/uibase/uiview/viewstat.cxx |   11 +++
 4 files changed, 37 insertions(+)

New commits:
commit 2cddaa6e199ed8bb6185b7825791199f9da4a670
Author: Jim Raykowski 
AuthorDate: Tue Sep 15 21:41:25 2020 -0800
Commit: Jim Raykowski 
CommitDate: Sun Sep 27 06:34:51 2020 +0200

tdf#45705 Integrate zoom UI commands into Writer text edit view

Change-Id: I71481e018175086a1a1711db22cea03b13eda490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102830
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index e087a07a6126..8231265d4e21 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -18,6 +18,16 @@
 
 interface BaseTextEditView
 {
+SID_ZOOM_IN
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
+SID_ZOOM_OUT
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
 FN_TOGGLE_OUTLINE_CONTENT_VISIBILITY
 [
 ExecMethod = Execute ;
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index b4ae522a2cf9..6866c8b4788a 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -141,6 +141,8 @@
 #include 
 #include 
 
+#include 
+
 const char sStatusDelim[] = " : ";
 
 using namespace sfx2;
@@ -581,6 +583,17 @@ void SwView::Execute(SfxRequest )
 rTmpWin.SetUseInputLanguage( false );
 }
 break;
+case SID_ZOOM_IN:
+case SID_ZOOM_OUT:
+{
+long nFact = m_pWrtShell->GetViewOptions()->GetZoom();
+if (SID_ZOOM_OUT == nSlot)
+nFact = basegfx::zoomtools::zoomIn(nFact);
+else
+nFact = basegfx::zoomtools::zoomOut(nFact);
+SetZoom(SvxZoomType::PERCENT, nFact);
+}
+break;
 case FN_TO_PREV_PAGE:
 case FN_TO_NEXT_PAGE:
 {
diff --git a/sw/source/uibase/uiview/viewmdi.cxx 
b/sw/source/uibase/uiview/viewmdi.cxx
index 12606618f8e2..3b18942f150d 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -77,6 +77,9 @@ void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, 
bool bViewOnly )
 if (bCursorIsVisible)
 m_pWrtShell->ShowCursor();
 
+Invalidate(SID_ZOOM_IN);
+Invalidate(SID_ZOOM_OUT);
+
 collectUIInformation(OUString::number(nFactor));
 }
 
diff --git a/sw/source/uibase/uiview/viewstat.cxx 
b/sw/source/uibase/uiview/viewstat.cxx
index c9ace0d854a0..8c267d180350 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -69,6 +69,17 @@ void SwView::GetState(SfxItemSet )
 {
 switch(nWhich)
 {
+case SID_ZOOM_IN:
+case SID_ZOOM_OUT:
+{
+long nFact = m_pWrtShell->GetViewOptions()->GetZoom();
+if ((SID_ZOOM_OUT == nWhich && nFact >= long(600)) ||
+(SID_ZOOM_IN == nWhich && nFact <= long(20)))
+{
+rSet.DisableItem(nWhich);
+}
+}
+break;
 case FN_TOGGLE_OUTLINE_CONTENT_VISIBILITY:
 {
 bool bDisable(true);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source sw/uiconfig

2019-08-06 Thread Samuel Mehrbrodt (via logerrit)
 sw/sdi/drwtxtsh.sdi|   12 +++
 sw/source/uibase/shells/drwtxtex.cxx   |   30 +
 sw/uiconfig/swriter/popupmenu/drawtext.xml |2 +
 3 files changed, 44 insertions(+)

New commits:
commit e959f4446cbba0e07c89c2be468e4ade29e7ef0c
Author: Samuel Mehrbrodt 
AuthorDate: Tue Aug 6 10:41:52 2019 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Aug 6 11:58:56 2019 +0200

Add missing hyperlink context menu entries to sw shapes

"Copy Hyperlink location" and "Open hyperlink" were missing.

Change-Id: I53ede27570a7b2378e5eb8be05d77bb131a87ab7
Reviewed-on: https://gerrit.libreoffice.org/77011
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi
index 560c60b9d7d1..259ed1e8be66 100644
--- a/sw/sdi/drwtxtsh.sdi
+++ b/sw/sdi/drwtxtsh.sdi
@@ -546,6 +546,12 @@ interface TextDrawText
 [
 StateMethod = StateInsert ;
 ]
+SID_OPEN_HYPERLINK
+[
+ExecMethod = Execute ;
+StateMethod = GetState;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
 SID_EDIT_HYPERLINK
 [
 ExecMethod = Execute ;
@@ -558,6 +564,12 @@ interface TextDrawText
 StateMethod = GetState;
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
+FN_COPY_HYPERLINK_LOCATION
+[
+ExecMethod = Execute ;
+StateMethod = GetState;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
 SID_TRANSLITERATE_SENTENCE_CASE
 [
 ExecMethod = ExecTransliteration;
diff --git a/sw/source/uibase/shells/drwtxtex.cxx 
b/sw/source/uibase/shells/drwtxtex.cxx
index e5c63fbb0f77..e802654a7717 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -74,6 +74,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -501,6 +502,33 @@ void SwDrawTextShell::Execute( SfxRequest  )
 }
 break;
 
+case SID_OPEN_HYPERLINK:
+{
+const SvxFieldData* pField = pOLV->GetFieldAtCursor();
+if (const SvxURLField* pURLField = dynamic_cast(pField))
+{
+SfxStringItem aUrl(SID_FILE_NAME, pURLField->GetURL());
+SfxStringItem aTarget(SID_TARGETNAME, 
pURLField->GetTargetFrame());
+SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, false);
+SfxBoolItem aBrowsing(SID_BROWSE, true);
+GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
+SID_OPENDOC, SfxCallMode::SYNCHRON, { , , 
,  });
+}
+}
+break;
+
+case FN_COPY_HYPERLINK_LOCATION:
+{
+const SvxFieldData* pField = pOLV->GetFieldAtCursor();
+if (const SvxURLField* pURLField = dynamic_cast(pField))
+{
+uno::Reference xClipboard
+= GetView().GetEditWin().GetClipboard();
+
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard);
+}
+}
+break;
+
 case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
 case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
 // Shell switch!
@@ -902,6 +930,8 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
 break;
 case SID_REMOVE_HYPERLINK:
 case SID_EDIT_HYPERLINK:
+case SID_OPEN_HYPERLINK:
+case FN_COPY_HYPERLINK_LOCATION:
 {
 if (!URLFieldHelper::IsCursorAtURLField(pOLV))
 rSet.DisableItem(nWhich);
diff --git a/sw/uiconfig/swriter/popupmenu/drawtext.xml 
b/sw/uiconfig/swriter/popupmenu/drawtext.xml
index 7536d60f7fd7..07a09cccae9d 100644
--- a/sw/uiconfig/swriter/popupmenu/drawtext.xml
+++ b/sw/uiconfig/swriter/popupmenu/drawtext.xml
@@ -25,7 +25,9 @@
   
   
   
+  
   
+  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sw/sdi sw/source

2019-05-28 Thread Miklos Vajna (via logerrit)
 sw/sdi/_frmsh.sdi |5 +
 sw/source/uibase/inc/frmsh.hxx|1 +
 sw/source/uibase/shells/frmsh.cxx |   13 +
 3 files changed, 19 insertions(+)

New commits:
commit 40c096508da7ee14f36715eee3185041f4a36ddd
Author: Miklos Vajna 
AuthorDate: Tue May 28 18:11:13 2019 +0200
Commit: Miklos Vajna 
CommitDate: Tue May 28 19:46:23 2019 +0200

sw: implement select-all for the frame shell

There is no reason why Ctrl-A should be a NOP when you have an image
selected.

No test, there is one in the cp-6.0 copy code, that coverage will
arrive as part of that copy code forward-port.

Change-Id: If0013ee0e9ff9a6fb038a22de7b5d3c76e5c52b9
Reviewed-on: https://gerrit.libreoffice.org/73118
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi
index 6d02c04efdeb..398cd30a93ff 100644
--- a/sw/sdi/_frmsh.sdi
+++ b/sw/sdi/_frmsh.sdi
@@ -406,5 +406,10 @@ interface BaseTextFrame
 ExecMethod = Execute ;
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
+SID_SELECTALL
+[
+ExecMethod = ExecMove ;
+StateMethod = NoState ;
+]
 }
 
diff --git a/sw/source/uibase/inc/frmsh.hxx b/sw/source/uibase/inc/frmsh.hxx
index f86e0d06501f..4b8a64c75823 100644
--- a/sw/source/uibase/inc/frmsh.hxx
+++ b/sw/source/uibase/inc/frmsh.hxx
@@ -35,6 +35,7 @@ public:
 virtual ~SwFrameShell() override;
 
 voidExecute(SfxRequest &);
+voidExecMove(SfxRequest& rReq);
 voidGetState(SfxItemSet &);
 voidExecFrameStyle(SfxRequest const & rReq);
 voidGetLineStyleState(SfxItemSet );
diff --git a/sw/source/uibase/shells/frmsh.cxx 
b/sw/source/uibase/shells/frmsh.cxx
index d0fead931a0b..dfb403b9ffcf 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -115,6 +115,19 @@ void SwFrameShell::InitInterface_Impl()
 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, 
SfxVisibilityFlags::Invisible, ToolbarId::Frame_Toolbox);
 }
 
+void SwFrameShell::ExecMove(SfxRequest& rReq)
+{
+SwWrtShell& rSh = GetShell();
+sal_uInt16 nSlot = rReq.GetSlot();
+switch (nSlot)
+{
+case SID_SELECTALL:
+rSh.SelAll();
+rReq.Done();
+break;
+}
+}
+
 void SwFrameShell::Execute(SfxRequest )
 {
 //First those who do not need FrameMgr.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sw/sdi sw/source

2019-02-16 Thread Libreoffice Gerrit user
 sw/sdi/_textsh.sdi  |6 +++
 sw/source/uibase/shells/textsh1.cxx |   59 
 2 files changed, 65 insertions(+)

New commits:
commit 770ef0d216a30efd756b4be26e9fc6e077748fed
Author: Tamás Zolnai 
AuthorDate: Fri Feb 15 14:11:37 2019 +0100
Commit: Tamás Zolnai 
CommitDate: Sat Feb 16 18:34:57 2019 +0100

MSForms: Make Control Properties menu to work with drop-down form field

Always forward the Execute and State method to the form shell,
so if a form control is selected the Control Properites will
work correctly.
Otherwise we check whether there is any field next to the cursor.

Change-Id: I25055c17d887a2f2a716d8325f46825cc408179e
Reviewed-on: https://gerrit.libreoffice.org/67911
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index f8c2daee6d65..3724ee041ecc 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -1694,5 +1694,11 @@ interface BaseText
 StateMethod = StateField ;
 ]
 
+SID_FM_CTL_PROPERTIES
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
+
 }  // end of interface text
 
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index fd759463b971..270fcabc08dc 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -119,6 +119,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace com::sun::star::beans;
@@ -1367,6 +1369,32 @@ void SwTextShell::Execute(SfxRequest )
 GetView().UpdateWordCount(this, nSlot);
 }
 break;
+case SID_FM_CTL_PROPERTIES:
+{
+SwPosition aPos(*GetShell().GetCursor()->GetPoint());
+sw::mark::IFieldmark* pFieldBM = 
GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos);
+if ( !pFieldBM )
+{
+--aPos.nContent;
+pFieldBM = 
GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos);
+}
+
+if ( pFieldBM && pFieldBM->GetFieldname() == ODF_FORMDROPDOWN )
+{
+SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ScopedVclPtr 
pDlg(pFact->CreateDropDownFormFieldDialog(rWrtSh.GetView().GetFrameWeld(), 
pFieldBM));
+pDlg->Execute();
+pFieldBM->Invalidate();
+rWrtSh.InvalidateWindows( rWrtSh.GetView().GetVisArea() );
+}
+else
+{
+SfxRequest aReq( GetView().GetViewFrame(), SID_FM_CTL_PROPERTIES );
+aReq.AppendItem( SfxBoolItem( SID_FM_CTL_PROPERTIES, true ) );
+rWrtSh.GetView().GetFormShell()->Execute( aReq );
+}
+}
+break;
 default:
 OSL_ENSURE(false, "wrong dispatcher");
 return;
@@ -1906,6 +1934,37 @@ void SwTextShell::GetState( SfxItemSet  )
 rSet.DisableItem(nWhich);
 }
 break;
+case SID_FM_CTL_PROPERTIES:
+{
+bool bDisable = false;
+
+// First get the state from the form shell
+SfxItemSet aSet(GetShell().GetAttrPool(), 
svl::Items{});
+aSet.Put(SfxBoolItem( SID_FM_CTL_PROPERTIES, true ));
+GetShell().GetView().GetFormShell()->GetState( aSet );
+
+if(SfxItemState::DISABLED == 
aSet.GetItemState(SID_FM_CTL_PROPERTIES))
+{
+bDisable = true;
+}
+
+// Enable it if we have a valid object other than what form 
shell knows
+SwPosition aPos(*GetShell().GetCursor()->GetPoint());
+sw::mark::IFieldmark* pFieldBM = 
GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos);
+if ( !pFieldBM )
+{
+--aPos.nContent;
+pFieldBM = 
GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos);
+}
+if ( pFieldBM && pFieldBM->GetFieldname() == ODF_FORMDROPDOWN )
+{
+bDisable = false;
+}
+
+if(bDisable)
+rSet.DisableItem(nWhich);
+}
+break;
 }
 nWhich = aIter.NextWhich();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sw/sdi sw/source

2018-09-03 Thread Libreoffice Gerrit user
 sw/sdi/_frmsh.sdi |6 ++
 sw/source/uibase/shells/frmsh.cxx |6 ++
 2 files changed, 12 insertions(+)

New commits:
commit 6c3d10d86e48e92ad963750ec5ba6e1049df2532
Author: Maxim Monastirsky 
AuthorDate: Mon Sep 3 12:16:55 2018 +0300
Commit: Maxim Monastirsky 
CommitDate: Mon Sep 3 23:39:20 2018 +0200

Enable the align group button for frames

Change-Id: I6ba8b5fe0d185817e61986c90f5264493b6d5339
Reviewed-on: https://gerrit.libreoffice.org/59951
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi
index 734b50c5ebc1..6d02c04efdeb 100644
--- a/sw/sdi/_frmsh.sdi
+++ b/sw/sdi/_frmsh.sdi
@@ -330,6 +330,12 @@ interface BaseTextFrame
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
 
+SID_OBJECT_ALIGN
+[
+StateMethod = GetState ;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
+
 FN_FORMAT_FOOTNOTE_DLG // status()
 [
 ExecMethod = Execute;
diff --git a/sw/source/uibase/shells/frmsh.cxx 
b/sw/source/uibase/shells/frmsh.cxx
index b9c7b98a3f95..1f3a0d3424ca 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -735,6 +735,12 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
 rSet.Put(aSet.Get(GetPool().GetWhich(nWhich)));
 }
 break;
+case SID_OBJECT_ALIGN:
+{
+if ( bProtect )
+rSet.DisableItem( nWhich );
+}
+break;
 case SID_OBJECT_ALIGN_LEFT   :
 case SID_OBJECT_ALIGN_CENTER :
 case SID_OBJECT_ALIGN_RIGHT  :
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source

2018-09-02 Thread Libreoffice Gerrit user
 sw/sdi/_annotsh.sdi |7 +++
 sw/source/uibase/shells/annotsh.cxx |5 +
 2 files changed, 12 insertions(+)

New commits:
commit 4d8a5ebdf9d2bef608a77559e93b5c543acfe6fd
Author: Maxim Monastirsky 
AuthorDate: Sun Sep 2 14:40:45 2018 +0300
Commit: Maxim Monastirsky 
CommitDate: Sun Sep 2 19:30:04 2018 +0200

tdf#117835 Paste as Unformatted for comments in Writer

Change-Id: Ia96f8c51cc0a3898c1169454bd7c3031e08c45d4
Reviewed-on: https://gerrit.libreoffice.org/59906
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi
index 27c200944c0f..e271625bcdd8 100644
--- a/sw/sdi/_annotsh.sdi
+++ b/sw/sdi/_annotsh.sdi
@@ -96,6 +96,13 @@ interface _Annotation
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
 
+SID_PASTE_UNFORMATTED
+[
+ExecMethod = ExecClpbrd ;
+StateMethod = StateClpbrd ;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
+
 SID_PASTE_SPECIAL  // api:
 [
 StateMethod = StateClpbrd ;
diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index 19a513387e3f..9a519715a5c9 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -906,6 +906,10 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest const )
 if 
(pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
 pOLV->PasteSpecial();
 break;
+case SID_PASTE_UNFORMATTED:
+if 
(pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
+pOLV->Paste();
+break;
 case SID_PASTE_SPECIAL:
 {
 if 
(pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
@@ -986,6 +990,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet )
 break;
 }
 case SID_PASTE:
+case SID_PASTE_UNFORMATTED:
 case SID_PASTE_SPECIAL:
 {
 if( !bPastePossible )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source

2018-09-02 Thread Libreoffice Gerrit user
 sw/sdi/drwtxtsh.sdi  |   19 +--
 sw/source/uibase/shells/drwtxtex.cxx |   86 ++-
 2 files changed, 88 insertions(+), 17 deletions(-)

New commits:
commit 8fb5567dc05397e9b28b821b2d3ff2735ccdeb33
Author: Maxim Monastirsky 
AuthorDate: Sun Sep 2 13:20:07 2018 +0300
Commit: Maxim Monastirsky 
CommitDate: Sun Sep 2 18:07:04 2018 +0200

tdf#118674 Paste special and unformatted for shapes in Writer

Change-Id: I348a6f93b61ea644077dcd3a16ba9d9fe17afb91
Reviewed-on: https://gerrit.libreoffice.org/59905
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi
index b24f0e8e43f2..a8e79c298b4f 100644
--- a/sw/sdi/drwtxtsh.sdi
+++ b/sw/sdi/drwtxtsh.sdi
@@ -44,17 +44,26 @@ interface TextDrawText
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
 
+SID_PASTE_UNFORMATTED  // api:
+[
+ExecMethod = ExecClpbrd ;
+StateMethod = StateClpbrd ;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
+
 SID_PASTE_SPECIAL  // api:
 [
+ExecMethod = ExecClpbrd ;
 StateMethod = StateClpbrd ;
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
 
-SID_CLIPBOARD_FORMAT_ITEMS  // api:
-[
-StateMethod = StateClpbrd ;
-DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
-]
+SID_CLIPBOARD_FORMAT_ITEMS  // api:
+[
+ExecMethod = ExecClpbrd ;
+StateMethod = StateClpbrd ;
+DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+]
 
 FN_ESCAPE // api:
 [
diff --git a/sw/source/uibase/shells/drwtxtex.cxx 
b/sw/source/uibase/shells/drwtxtex.cxx
index 15bd355de83d..8328b9ffd8c2 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -54,7 +54,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -995,6 +997,54 @@ void SwDrawTextShell::ExecClpbrd(SfxRequest const )
 pOLV->PasteSpecial();
 break;
 
+case SID_PASTE_UNFORMATTED:
+pOLV->Paste();
+break;
+
+case SID_PASTE_SPECIAL:
+{
+SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
+ScopedVclPtr 
pDlg(pFact->CreatePasteDialog(GetView().GetEditWin().GetFrameWeld()));
+
+pDlg->Insert(SotClipboardFormatId::STRING, OUString());
+pDlg->Insert(SotClipboardFormatId::RTF, OUString());
+pDlg->Insert(SotClipboardFormatId::RICHTEXT, OUString());
+
+TransferableDataHelper 
aDataHelper(TransferableDataHelper::CreateFromSystemClipboard(().GetEditWin()));
+SotClipboardFormatId nFormat = 
pDlg->GetFormat(aDataHelper.GetTransferable());
+
+if (nFormat != SotClipboardFormatId::NONE)
+{
+if (nFormat == SotClipboardFormatId::STRING)
+pOLV->Paste();
+else
+pOLV->PasteSpecial();
+}
+
+break;
+}
+
+case SID_CLIPBOARD_FORMAT_ITEMS:
+{
+SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;
+const SfxPoolItem* pItem;
+if (rReq.GetArgs() && rReq.GetArgs()->GetItemState(nId, true, 
) == SfxItemState::SET)
+{
+if (const SfxUInt32Item* pUInt32Item = dynamic_cast(pItem))
+nFormat = 
static_cast(pUInt32Item->GetValue());
+}
+
+if (nFormat != SotClipboardFormatId::NONE)
+{
+if (nFormat == SotClipboardFormatId::STRING)
+pOLV->Paste();
+else
+pOLV->PasteSpecial();
+}
+
+break;
+}
+
 default:
 OSL_FAIL("wrong dispatcher");
 return;
@@ -1011,6 +1061,11 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet )
 const bool bCopy = (aSel.nStartPara != aSel.nEndPara) ||
 (aSel.nStartPos != aSel.nEndPos);
 
+TransferableDataHelper aDataHelper( 
TransferableDataHelper::CreateFromSystemClipboard( ().GetEditWin() ) );
+const bool bPaste = aDataHelper.HasFormat( SotClipboardFormatId::STRING ) 
||
+aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ||
+aDataHelper.HasFormat( SotClipboardFormatId::RICHTEXT 
);
+
 SfxWhichIter aIter(rSet);
 sal_uInt16 nWhich = aIter.FirstWhich();
 
@@ -1025,21 +1080,28 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet )
 break;
 
 case SID_PASTE:
-{
-TransferableDataHelper aDataHelper(
-TransferableDataHelper::CreateFromSystemClipboard( 
().GetEditWin() ) );
-
-if( !aDataHelper.GetXTransferable().is()
-|| !SwTransferable::IsPaste( GetShell(), aDataHelper ) )
-   

[Libreoffice-commits] core.git: sw/sdi sw/source

2017-03-07 Thread Pranav Kant
 sw/sdi/swriter.sdi  |2 +-
 sw/source/uibase/shells/textfld.cxx |   34 +-
 2 files changed, 34 insertions(+), 2 deletions(-)

New commits:
commit c3d1be64e882f7e0edd0e693b9f73a0556bcb003
Author: Pranav Kant 
Date:   Wed Mar 1 17:32:08 2017 +0530

lok: Allow changing comment text of document redlines

The id of the redline is optional. If not mentioned, the current redline
is assumed to be the one whose comment text will be changed.

Change-Id: Ia859de171603239a78f4bdef5eff0facd580d027
Reviewed-on: https://gerrit.libreoffice.org/34923
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index cb42b58..e9ac677 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -663,7 +663,7 @@ SfxVoidItem ClosePreview FN_CLOSE_PAGEPREVIEW
 ]
 
 SfxVoidItem CommentChangeTracking FN_REDLINE_COMMENT
-()
+(SfxUInt16Item ChangeTrackingId FN_REDLINE_COMMENT,SvxPostItTextItem Text 
SID_ATTR_POSTIT_TEXT)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sw/source/uibase/shells/textfld.cxx 
b/sw/source/uibase/shells/textfld.cxx
index 6cee279..ac5af41 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -509,9 +509,41 @@ void SwTextShell::ExecField(SfxRequest )
 */
 
 const SwRangeRedline *pRedline = rSh.GetCurrRedline();
+SwDoc *pDoc = rSh.GetDoc();
+SwRedlineTable::size_type nRedline = SwRedlineTable::npos;
+if (pArgs && pArgs->GetItemState(nSlot, false, ) == 
SfxItemState::SET)
+{
+//TODO: SfxUInt16Item vs. SwRedlineTable::size_type 
mismatch:
+nRedline = static_cast(pItem)->GetValue();
+if (nRedline == USHRT_MAX)
+nRedline = SwRedlineTable::npos;
+
+if (nRedline != SwRedlineTable::npos)
+{
+// If index is specified, goto and select the 
appropriate redline
+const SwRedlineTable& rTable = 
pDoc->getIDocumentRedlineAccess().GetRedlineTable();
+if (nRedline < rTable.size())
+pRedline = rSh.GotoRedline(nRedline, true);
+}
+}
+
+OUString sCommentText;
+const SfxStringItem* pTextItem = 
rReq.GetArg(SID_ATTR_POSTIT_TEXT);
+if (pTextItem)
+sCommentText = pTextItem->GetValue();
 
 if (pRedline)
 {
+// In case of LOK and comment text is already provided, 
skip
+// dialog creation and just change the redline comment 
directly
+if (comphelper::LibreOfficeKit::isActive() && 
!sCommentText.isEmpty())
+{
+rSh.SetRedlineComment(sCommentText);
+GetView().AttrChangedNotify(GetShellPtr());
+
const_cast(pRedline)->MaybeNotifyModification();
+break;
+}
+
 OUString sComment = convertLineEnd(pRedline->GetComment(), 
GetSystemLineEnd());
 
 bool bTravel = false;
@@ -811,7 +843,7 @@ void SwTextShell::StateField( SfxItemSet  )
 break;
 
 case FN_REDLINE_COMMENT:
-if (!rSh.GetCurrRedline())
+if (!comphelper::LibreOfficeKit::isActive() && 
!rSh.GetCurrRedline())
 rSet.DisableItem(nWhich);
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source

2016-11-13 Thread Gulsah Kose
 sw/sdi/_frmsh.sdi |7 +++
 sw/source/uibase/shells/frmsh.cxx |   25 -
 2 files changed, 31 insertions(+), 1 deletion(-)

New commits:
commit c3c08a16f8317266bcb86041d812d8a9821c237f
Author: Gulsah Kose 
Date:   Thu Nov 10 17:32:11 2016 +0300

tdf#103268 Activate editing object name function for writer images.

Change-Id: Idfe88a3f5b7492dc6ac71fa3791839a000a7483b
Signed-off-by: Gulsah Kose 
Reviewed-on: https://gerrit.libreoffice.org/30759
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 

diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi
index e496cecf..2ccb88f 100644
--- a/sw/sdi/_frmsh.sdi
+++ b/sw/sdi/_frmsh.sdi
@@ -369,6 +369,13 @@ interface BaseTextFrame
 StateMethod = GetState ;
 DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
 ]
+// tdf#103268
+FN_NAME_SHAPE
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+]
 
 // Abfragefunktionen fuer ImageMaps
 // Slots ohne Export
diff --git a/sw/source/uibase/shells/frmsh.cxx 
b/sw/source/uibase/shells/frmsh.cxx
index 764d004..3b962a7 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -614,6 +614,29 @@ void SwFrameShell::Execute(SfxRequest )
 rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror));
 }
 break;
+case FN_NAME_SHAPE:
+{
+bUpdateMgr = false;
+SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
+if ( pSdrView &&
+ pSdrView->GetMarkedObjectCount() == 1 )
+{
+OUString aName(rSh.GetFlyName());
+SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
+assert(pFact);
+ScopedVclPtr pDlg(
+pFact->CreateSvxObjectNameDialog( aName ));
+
+assert(pDlg);
+
+if ( pDlg->Execute() == RET_OK )
+{
+pDlg->GetName(aName);
+rSh.SetFlyName(aName);
+}
+}
+}
+break;
 // #i73249#
 case FN_TITLE_DESCRIPTION_SHAPE:
 {
@@ -917,6 +940,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
 break;
 // #i73249#
 case FN_TITLE_DESCRIPTION_SHAPE:
+case FN_NAME_SHAPE:
 {
 SwWrtShell  = GetShell();
 SdrView* pSdrView = rWrtSh.GetDrawViewWithValidMarkList();
@@ -925,7 +949,6 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
 {
 rSet.DisableItem( nWhich );
 }
-
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source sw/uiconfig

2016-10-13 Thread Gulsah Kose
 sw/sdi/viewsh.sdi |5 +
 sw/source/uibase/ribbar/conrect.cxx   |1 +
 sw/source/uibase/ribbar/drawbase.cxx  |2 +-
 sw/source/uibase/uiview/viewdraw.cxx  |1 +
 sw/source/uibase/uiview/viewstat.cxx  |1 +
 sw/uiconfig/swriter/toolbar/arrowsbar.xml |1 +
 6 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit c3f95221b83f2302778e315330ff8ccf2998a397
Author: Gulsah Kose 
Date:   Thu Oct 13 14:54:24 2016 +0300

tdf#101390 Add "Diagonal Line" command to the writer arrowsbar.

Change-Id: If21ea239289b985e6a7cea717b41e073bc591c62
Signed-off-by: Gulsah Kose 
Reviewed-on: https://gerrit.libreoffice.org/29768
Reviewed-by: Maxim Monastirsky 
Tested-by: Maxim Monastirsky 

diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi
index 56a2d6e..c6d83c8 100644
--- a/sw/sdi/viewsh.sdi
+++ b/sw/sdi/viewsh.sdi
@@ -82,6 +82,11 @@ interface TextEditView : BaseTextEditView
 ExecMethod = ExecDraw ;
 StateMethod = GetDrawState ;
 ]
+SID_DRAW_XLINE
+[
+ExecMethod = ExecDraw ;
+StateMethod = GetDrawState ;
+]
 SID_LINE_ARROW_END
 [
 ExecMethod = ExecDraw ;
diff --git a/sw/source/uibase/ribbar/conrect.cxx 
b/sw/source/uibase/ribbar/conrect.cxx
index 2e0542f..39ccea5 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -167,6 +167,7 @@ void ConstRectangle::Activate(const sal_uInt16 nSlotId)
 case SID_LINE_SQUARE_ARROW:
 case SID_LINE_ARROWS:
 case SID_DRAW_LINE:
+case SID_DRAW_XLINE:
 m_pWin->SetSdrDrawMode(OBJ_LINE);
 break;
 
diff --git a/sw/source/uibase/ribbar/drawbase.cxx 
b/sw/source/uibase/ribbar/drawbase.cxx
index 48526fb..820a99e 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -621,7 +621,7 @@ Point  SwDrawBase::GetDefaultCenterPos()
 // #i33136#
 bool SwDrawBase::doConstructOrthogonal() const
 {
-return ( m_nSlotId == SID_DRAW_XPOLYGON || m_nSlotId == 
SID_DRAW_XPOLYGON_NOFILL );
+return ( m_nSlotId == SID_DRAW_XPOLYGON || m_nSlotId == 
SID_DRAW_XPOLYGON_NOFILL || m_nSlotId == SID_DRAW_XLINE );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uiview/viewdraw.cxx 
b/sw/source/uibase/uiview/viewdraw.cxx
index 750caf8..dbe74d5 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -253,6 +253,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
 case SID_LINE_SQUARE_ARROW:
 case SID_LINE_ARROWS:
 case SID_DRAW_LINE:
+case SID_DRAW_XLINE:
 case SID_DRAW_MEASURELINE:
 case SID_DRAW_RECT:
 case SID_DRAW_ELLIPSE:
diff --git a/sw/source/uibase/uiview/viewstat.cxx 
b/sw/source/uibase/uiview/viewstat.cxx
index 1de3fc7..3f01b80 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -495,6 +495,7 @@ void SwView::GetDrawState(SfxItemSet )
 switch(nWhich)
 {
 case SID_DRAW_LINE:
+case SID_DRAW_XLINE:
 case SID_LINE_ARROW_END:
 case SID_LINE_ARROW_CIRCLE:
 case SID_LINE_ARROW_SQUARE:
diff --git a/sw/uiconfig/swriter/toolbar/arrowsbar.xml 
b/sw/uiconfig/swriter/toolbar/arrowsbar.xml
index cfe177a..40d7238 100644
--- a/sw/uiconfig/swriter/toolbar/arrowsbar.xml
+++ b/sw/uiconfig/swriter/toolbar/arrowsbar.xml
@@ -29,4 +29,5 @@
  
  
  
+ 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source sw/uiconfig

2016-09-13 Thread jan iversen
 sw/sdi/_grfsh.sdi   |7 ---
 sw/sdi/drawsh.sdi   |8 
 sw/source/uibase/shells/drawsh.cxx  |   10 ++
 sw/source/uibase/shells/grfsh.cxx   |   10 --
 sw/uiconfig/swriter/toolbar/standardbar.xml |2 --
 5 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit 465d3076835d88972d99c92b9b518a0e1762fea2
Author: jan iversen 
Date:   Tue Sep 13 09:14:23 2016 +

Revert "tdf#73797 Enable object rotation (.uno:ToggleObjectRotateMode) for 
writer"

This reverts commit 594182ce7c2551dd1d13a014cfdfd96a057e63de.

Change-Id: Idf2580e84d4190ba0aaba1a3394a4318043da458
Reviewed-on: https://gerrit.libreoffice.org/28858
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/sw/sdi/_grfsh.sdi b/sw/sdi/_grfsh.sdi
index 36ba32c..bf8270c 100644
--- a/sw/sdi/_grfsh.sdi
+++ b/sw/sdi/_grfsh.sdi
@@ -87,13 +87,6 @@ interface BaseTextGraphic
 DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
 ]
 
-SID_OBJECT_ROTATE
-[
-ExecMethod = ExecuteRotation ;
-StateMethod = GetAttrStateForRotation ;
-DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
-]
-
 SID_OBJECT_CROP
 [
 ExecMethod = Execute ;
diff --git a/sw/sdi/drawsh.sdi b/sw/sdi/drawsh.sdi
index 523990f..6b95420 100644
--- a/sw/sdi/drawsh.sdi
+++ b/sw/sdi/drawsh.sdi
@@ -217,6 +217,14 @@ interface TextDraw : TextDrawBase
 DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
 ]
 
+SID_OBJECT_ROTATE
+[
+Export = FALSE;
+ExecMethod = Execute ;
+StateMethod = GetState ;
+DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+]
+
 SID_BEZIER_EDIT
 [
 Export = FALSE;
diff --git a/sw/source/uibase/shells/drawsh.cxx 
b/sw/source/uibase/shells/drawsh.cxx
index e62b324..a0b3b35 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -422,6 +422,16 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
 rSet.DisableItem( nWhich );
 break;
 
+case SID_OBJECT_ROTATE:
+{
+const bool bIsRotate = GetView().IsDrawRotate();
+if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || 
bProtected )
+rSet.DisableItem( nWhich );
+else
+rSet.Put( SfxBoolItem( nWhich, bIsRotate ) );
+}
+break;
+
 case SID_BEZIER_EDIT:
 if (!Disable(rSet, nWhich))
 rSet.Put( SfxBoolItem( nWhich, 
!GetView().IsDrawSelMode()));
diff --git a/sw/source/uibase/shells/grfsh.cxx 
b/sw/source/uibase/shells/grfsh.cxx
index dd64d13..db91663 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -840,15 +840,6 @@ void SwGrfShell::ExecuteRotation(SfxRequest )
 
 SwWrtShell& rShell = GetShell();
 
-if (rReq.GetSlot() == SID_OBJECT_ROTATE)
-{
-if (GetView().IsDrawRotate())
-rShell.SetDragMode(SdrDragMode::Move);
-else
-rShell.SetDragMode(SdrDragMode::Rotate);
-
-GetView().FlipDrawRotate();
-}
 if (rReq.GetSlot() == SID_ROTATE_GRAPHIC_LEFT)
 {
 aRotation = 900;
@@ -917,7 +908,6 @@ void SwGrfShell::GetAttrStateForRotation(SfxItemSet )
 bool bDisable = bIsParentContentProtected;
 switch( nWhich )
 {
-case SID_OBJECT_ROTATE:
 case SID_ROTATE_GRAPHIC_LEFT:
 case SID_ROTATE_GRAPHIC_RIGHT:
 if( rShell.GetGraphicType() == GraphicType::NONE )
diff --git a/sw/uiconfig/swriter/toolbar/standardbar.xml 
b/sw/uiconfig/swriter/toolbar/standardbar.xml
index 396f035..4db30e8 100644
--- a/sw/uiconfig/swriter/toolbar/standardbar.xml
+++ b/sw/uiconfig/swriter/toolbar/standardbar.xml
@@ -39,8 +39,6 @@
  
  
  
- 
- 
  
  
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source sw/uiconfig

2016-09-10 Thread Gulsah Kose
 sw/sdi/_grfsh.sdi   |7 +++
 sw/sdi/drawsh.sdi   |8 
 sw/source/uibase/shells/drawsh.cxx  |   10 --
 sw/source/uibase/shells/grfsh.cxx   |   10 ++
 sw/uiconfig/swriter/toolbar/standardbar.xml |2 ++
 5 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit 594182ce7c2551dd1d13a014cfdfd96a057e63de
Author: Gulsah Kose 
Date:   Mon Aug 8 22:11:22 2016 +0300

tdf#73797 Enable object rotation (.uno:ToggleObjectRotateMode) for writer

Change-Id: Ida868d0fc077d6697a0c3754b1add6a48c5d426c
Signed-off-by: Gulsah Kose 
Reviewed-on: https://gerrit.libreoffice.org/27995
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/sw/sdi/_grfsh.sdi b/sw/sdi/_grfsh.sdi
index bf8270c..36ba32c 100644
--- a/sw/sdi/_grfsh.sdi
+++ b/sw/sdi/_grfsh.sdi
@@ -87,6 +87,13 @@ interface BaseTextGraphic
 DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
 ]
 
+SID_OBJECT_ROTATE
+[
+ExecMethod = ExecuteRotation ;
+StateMethod = GetAttrStateForRotation ;
+DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+]
+
 SID_OBJECT_CROP
 [
 ExecMethod = Execute ;
diff --git a/sw/sdi/drawsh.sdi b/sw/sdi/drawsh.sdi
index 6b95420..523990f 100644
--- a/sw/sdi/drawsh.sdi
+++ b/sw/sdi/drawsh.sdi
@@ -217,14 +217,6 @@ interface TextDraw : TextDrawBase
 DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
 ]
 
-SID_OBJECT_ROTATE
-[
-Export = FALSE;
-ExecMethod = Execute ;
-StateMethod = GetState ;
-DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
-]
-
 SID_BEZIER_EDIT
 [
 Export = FALSE;
diff --git a/sw/source/uibase/shells/drawsh.cxx 
b/sw/source/uibase/shells/drawsh.cxx
index a0b3b35..e62b324 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -422,16 +422,6 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
 rSet.DisableItem( nWhich );
 break;
 
-case SID_OBJECT_ROTATE:
-{
-const bool bIsRotate = GetView().IsDrawRotate();
-if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || 
bProtected )
-rSet.DisableItem( nWhich );
-else
-rSet.Put( SfxBoolItem( nWhich, bIsRotate ) );
-}
-break;
-
 case SID_BEZIER_EDIT:
 if (!Disable(rSet, nWhich))
 rSet.Put( SfxBoolItem( nWhich, 
!GetView().IsDrawSelMode()));
diff --git a/sw/source/uibase/shells/grfsh.cxx 
b/sw/source/uibase/shells/grfsh.cxx
index db91663..dd64d13 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -840,6 +840,15 @@ void SwGrfShell::ExecuteRotation(SfxRequest )
 
 SwWrtShell& rShell = GetShell();
 
+if (rReq.GetSlot() == SID_OBJECT_ROTATE)
+{
+if (GetView().IsDrawRotate())
+rShell.SetDragMode(SdrDragMode::Move);
+else
+rShell.SetDragMode(SdrDragMode::Rotate);
+
+GetView().FlipDrawRotate();
+}
 if (rReq.GetSlot() == SID_ROTATE_GRAPHIC_LEFT)
 {
 aRotation = 900;
@@ -908,6 +917,7 @@ void SwGrfShell::GetAttrStateForRotation(SfxItemSet )
 bool bDisable = bIsParentContentProtected;
 switch( nWhich )
 {
+case SID_OBJECT_ROTATE:
 case SID_ROTATE_GRAPHIC_LEFT:
 case SID_ROTATE_GRAPHIC_RIGHT:
 if( rShell.GetGraphicType() == GraphicType::NONE )
diff --git a/sw/uiconfig/swriter/toolbar/standardbar.xml 
b/sw/uiconfig/swriter/toolbar/standardbar.xml
index 4db30e8..396f035 100644
--- a/sw/uiconfig/swriter/toolbar/standardbar.xml
+++ b/sw/uiconfig/swriter/toolbar/standardbar.xml
@@ -39,6 +39,8 @@
  
  
  
+ 
+ 
  
  
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source

2014-09-09 Thread Jennifer Liebel
 sw/sdi/_grfsh.sdi |   12 
 sw/source/ui/app/mn.src   |1 +
 sw/source/uibase/shells/grfsh.cxx |3 +--
 3 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 24077ffc063990f9de11c6819432219a59d809f8
Author: Jennifer Liebel jliebe...@gmail.com
Date:   Tue Sep 2 12:40:20 2014 +

fdo#82496: Change picture option by rightclicking

Change-Id: I31fb1a1f89030610a9d11b9236e8cde22dbc0ca5
Reviewed-on: https://gerrit.libreoffice.org/11332
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/sdi/_grfsh.sdi b/sw/sdi/_grfsh.sdi
index 15c00cc..2eb2ab2 100644
--- a/sw/sdi/_grfsh.sdi
+++ b/sw/sdi/_grfsh.sdi
@@ -62,6 +62,13 @@ interface BaseTextGraphic
 DisableFlags=SW_DISABLE_ON_PROTECTED_CURSOR;
 ]
 
+SID_CHANGE_PICTURE
+[
+ExecMethod = Execute ;
+StateMethod = GetAttrState ;
+DisableFlags=SW_DISABLE_ON_PROTECTED_CURSOR;
+]
+
 SID_EXTERNAL_EDIT
 [
 ExecMethod = Execute ;
@@ -224,6 +231,11 @@ interface BaseTextGraphic
 StateMethod = GetAttrState ;
 DisableFlags=SW_DISABLE_ON_PROTECTED_CURSOR;
 ]
+SID_CHANGE_PICTURE
+[
+ExecMethod = FuTemporary ;
+StateMethod = GetMenuState ;
+]
 SID_GRFFILTER_SOLARIZE  // status(final|play|rec)
 [
 ExecMethod = ExecAttr ;
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index f62c8da..79b797d 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -1239,6 +1239,7 @@ Menu MN_GRF_POPUPMENU
 MN_FRM_CAPTION_ITEM
 SEPARATOR;
 MenuItem { ITEM_SAVE_GRAPHIC };
+MenuItem { ITEM_CHANGE_PICTURE };
 MenuItem { ITEM_COMPRESS_GRAPHIC };
 MenuItem { ITEM_EXTERNAL_EDIT };
 
diff --git a/sw/source/uibase/shells/grfsh.cxx 
b/sw/source/uibase/shells/grfsh.cxx
index d5ecec5..0e13b38 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -178,7 +178,6 @@ void SwGrfShell::Execute(SfxRequest rReq)
 }
 }
 break;
-
 case SID_EXTERNAL_EDIT:
 {
 // When the graphic is selected to be opened via some external tool
@@ -191,7 +190,7 @@ void SwGrfShell::Execute(SfxRequest rReq)
 }
 }
 break;
-
+case SID_CHANGE_PICTURE:
 case SID_INSERT_GRAPHIC:
 {
 // #i123922# implement slot independent from the two below to
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/sdi sw/source sw/uiconfig

2014-01-30 Thread Maxim Monastirsky
 sw/sdi/drwtxtsh.sdi|   13 +
 sw/source/ui/shells/drwtxtex.cxx   |   50 +
 sw/uiconfig/sglobal/toolbar/drawtextobjectbar.xml  |2 
 sw/uiconfig/sweb/toolbar/drawtextobjectbar.xml |2 
 sw/uiconfig/swform/toolbar/drawtextobjectbar.xml   |2 
 sw/uiconfig/swreport/toolbar/drawtextobjectbar.xml |2 
 sw/uiconfig/swriter/toolbar/drawtextobjectbar.xml  |2 
 sw/uiconfig/swxform/toolbar/drawtextobjectbar.xml  |2 
 8 files changed, 75 insertions(+)

New commits:
commit c885850e2e54da986bd85cfc00bc8a23c272704d
Author: Maxim Monastirsky momonas...@gmail.com
Date:   Thu Jan 30 10:26:28 2014 +0200

Add Increase/Decrease font functionality to drawing objects

Change-Id: I9abfca6f8cefd1e1211a98fa36ce07a407c2fd06
Reviewed-on: https://gerrit.libreoffice.org/7655
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi
index 23402a3..e019b76 100644
--- a/sw/sdi/drwtxtsh.sdi
+++ b/sw/sdi/drwtxtsh.sdi
@@ -609,6 +609,19 @@ interface TextDrawText
 StateMethod = GetStatePropPanelAttr ;
 DisableFlags=SW_DISABLE_ON_PROTECTED_CURSOR;
 ]
+
+FN_GROW_FONT_SIZE
+[
+ExecMethod = Execute ;
+StateMethod = GetDrawTxtCtrlState ;
+DisableFlags=SW_DISABLE_ON_PROTECTED_CURSOR;
+]
+FN_SHRINK_FONT_SIZE
+[
+ExecMethod = Execute ;
+StateMethod = GetDrawTxtCtrlState ;
+DisableFlags=SW_DISABLE_ON_PROTECTED_CURSOR;
+]
 }
 
 interface TextDrawFont
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 80a1049..43b0dfb 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -101,6 +101,8 @@
 #include chrdlg.hrc
 #include misc.hrc
 
+const sal_uInt32 nFontInc = 40;  // 2pt
+const sal_uInt32 nFontMaxSz = 19998; // 999.9pt
 
 using namespace ::com::sun::star;
 
@@ -548,6 +550,32 @@ void SwDrawTextShell::Execute( SfxRequest rReq )
 rSh.GetView().AttrChangedNotify( rSh );
 }
 return;
+
+case FN_GROW_FONT_SIZE:
+case FN_SHRINK_FONT_SIZE:
+{
+SfxItemPool* pPool2 = aEditAttr.GetPool()-GetSecondaryPool();
+if( !pPool2 )
+pPool2 = aEditAttr.GetPool();
+
+SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONTHEIGHT, *pPool2 );
+aSetItem.GetItemSet().Put( aEditAttr, false );
+
+sal_uInt16 nScriptTypes = pOLV-GetSelectedScriptType();
+SvxFontHeightItem aSize( *static_castconst SvxFontHeightItem*( 
aSetItem.GetItemOfScript( nScriptTypes ) ) );
+sal_uInt32 nSize = aSize.GetHeight();
+
+if( nSlot == FN_GROW_FONT_SIZE  ( nSize += nFontInc )  
nFontMaxSz )
+nSize = nFontMaxSz;
+else if( nSlot == FN_SHRINK_FONT_SIZE  ( nSize -= nFontInc )  
nFontInc )
+nSize = nFontInc;
+
+aSize.SetHeight( nSize );
+aSetItem.PutItemForScriptType( nScriptTypes, aSize );
+aNewAttr.Put( aSetItem.GetItemSet() );
+}
+break;
+
 default:
 OSL_ENSURE(!this, wrong dispatcher);
 return;
@@ -888,6 +916,28 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet rSet)
 case SID_ATTR_CHAR_SCALEWIDTH:   nEEWhich = 
EE_CHAR_FONTWIDTH;break;
 case SID_ATTR_CHAR_AUTOKERN  :   nEEWhich = EE_CHAR_PAIRKERNING; 
break;
 case SID_ATTR_CHAR_ESCAPEMENT:   nEEWhich = EE_CHAR_ESCAPEMENT; 
break;
+case FN_GROW_FONT_SIZE:
+case FN_SHRINK_FONT_SIZE:
+{
+SfxItemPool* pEditPool = 
aEditAttr.GetPool()-GetSecondaryPool();
+if( !pEditPool )
+pEditPool = aEditAttr.GetPool();
+
+SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONTHEIGHT, 
*pEditPool );
+aSetItem.GetItemSet().Put( aEditAttr, false );
+const SvxFontHeightItem* aSize( static_castconst 
SvxFontHeightItem*( aSetItem.GetItemOfScript( nScriptType ) ) );
+
+if( !aSize )
+rSet.DisableItem( nSlotId );
+else
+{
+sal_uInt32 nSize = aSize-GetHeight();
+if( nSize == nFontMaxSz )
+rSet.DisableItem( FN_GROW_FONT_SIZE );
+else if( nSize == nFontInc )
+rSet.DisableItem( FN_SHRINK_FONT_SIZE );
+}
+}
 }
 if(nEEWhich)
 rSet.Put(aEditAttr.Get(nEEWhich, sal_True), nWhich);
diff --git a/sw/uiconfig/sglobal/toolbar/drawtextobjectbar.xml 
b/sw/uiconfig/sglobal/toolbar/drawtextobjectbar.xml
index f604605..5db228b 100644
--- a/sw/uiconfig/sglobal/toolbar/drawtextobjectbar.xml
+++ b/sw/uiconfig/sglobal/toolbar/drawtextobjectbar.xml
@@ -27,6 +27,8 @@

[Libreoffice-commits] core.git: sw/sdi sw/source

2013-12-03 Thread Noel Grandin
 sw/sdi/swriter.sdi  |8 
 sw/source/ui/shells/textsh1.cxx |6 +++---
 sw/source/ui/shells/txtcrsr.cxx |8 
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 63947810107e042ebe440b865904c62e2d3f74d8
Author: Noel Grandin n...@peralex.com
Date:   Mon Dec 2 14:12:09 2013 +0200

convert FN_PARAM_MOVE_COUNT from SfxInt16 to SfxInt32

so that we can convert surrounding code from xub_StrLen to sal_Int32

Change-Id: Ib779c82a71405f855cfe72bcde2511e8153445f0
Reviewed-on: https://gerrit.libreoffice.org/6896
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 9cb8c62..0c7cff7 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -1947,7 +1947,7 @@ SfxVoidItem FrameDialog FN_FORMAT_FRAME_DLG
 
 //--
 SfxBoolItem GoDown FN_LINE_DOWN
-(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select 
FN_PARAM_MOVE_SELECTION)
+(SfxInt32Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select 
FN_PARAM_MOVE_SELECTION)
 [
 /* flags: */
 AutoUpdate = FALSE,
@@ -1972,7 +1972,7 @@ SfxBoolItem GoDown FN_LINE_DOWN
 
 //--
 SfxBoolItem GoLeft FN_CHAR_LEFT
-(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select 
FN_PARAM_MOVE_SELECTION)
+(SfxInt32Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select 
FN_PARAM_MOVE_SELECTION)
 [
 /* flags: */
 AutoUpdate = FALSE,
@@ -1997,7 +1997,7 @@ SfxBoolItem GoLeft FN_CHAR_LEFT
 
 //--
 SfxBoolItem GoRight FN_CHAR_RIGHT
-(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select 
FN_PARAM_MOVE_SELECTION)
+(SfxInt32Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select 
FN_PARAM_MOVE_SELECTION)
 [
 /* flags: */
 AutoUpdate = FALSE,
@@ -3222,7 +3222,7 @@ SfxVoidItem GoToStartOfPrevPageSel 
FN_START_OF_PREV_PAGE_SEL
 
 //--
 SfxBoolItem GoUp FN_LINE_UP
-(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select 
FN_PARAM_MOVE_SELECTION)
+(SfxInt32Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select 
FN_PARAM_MOVE_SELECTION)
 [
 /* flags: */
 AutoUpdate = FALSE,
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 091058e..9868653 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -197,7 +197,7 @@ void sw_CharDialog( SwWrtShell rWrtSh, bool bUseDialog, 
sal_uInt16 nSlot,const
 
 const SfxPoolItem* pSelectionItem;
 sal_Bool bInsert = sal_False;
-xub_StrLen nInsert = 0;
+sal_Int32 nInsert = 0;
 
 // The old item is for unknown reasons back in the set again.
 if( !bSelectionPut  SFX_ITEM_SET == 
aTmpSet.GetItemState(FN_PARAM_SELECTION, sal_False, pSelectionItem) )
@@ -215,7 +215,7 @@ void sw_CharDialog( SwWrtShell rWrtSh, bool bUseDialog, 
sal_uInt16 nSlot,const
 aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) );
 aReq.Done();
 SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), 
FN_CHAR_LEFT );
-aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
+aReq1.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nInsert) );
 aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, 
sal_True) );
 aReq1.Done();
 }
@@ -234,7 +234,7 @@ void sw_CharDialog( SwWrtShell rWrtSh, bool bUseDialog, 
sal_uInt16 nSlot,const
 if(bInsert)
 {
 SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
-aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
+aReq1.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nInsert) );
 aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_False) 
);
 aReq1.Done();
 rWrtSh.SwapPam();
diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx
index 2c09fea..d686012 100644
--- a/sw/source/ui/shells/txtcrsr.cxx
+++ b/sw/source/ui/shells/txtcrsr.cxx
@@ -48,12 +48,12 @@ void SwTextShell::ExecBasicMove(SfxRequest rReq)
 GetView().GetEditWin().FlushInBuffer();
 const SfxItemSet *pArgs = rReq.GetArgs();
 sal_Bool bSelect = sal_False;
-sal_uInt16 nCount = 1;
+sal_Int32 nCount = 1;
 if(pArgs)
 {
 const SfxPoolItem *pItem;
 if(SFX_ITEM_SET == pArgs-GetItemState(FN_PARAM_MOVE_COUNT, sal_True, 
pItem))
-nCount = ((const SfxInt16Item *)pItem)-GetValue();
+nCount = ((const SfxInt32Item *)pItem)-GetValue();
 if(SFX_ITEM_SET == pArgs-GetItemState(FN_PARAM_MOVE_SELECTION, 
sal_True, pItem))
 bSelect = ((const SfxBoolItem *)pItem)-GetValue();
 }
@@