summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/svxids.hrc5
-rw-r--r--svx/sdi/svx.sdi16
-rw-r--r--sw/sdi/_viewsh.sdi4
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx27
4 files changed, 51 insertions, 1 deletions
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 61d02ff504ea..5c18856d0713 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -537,6 +537,9 @@ class SvxSetItem;
#define SID_TABSTOP_ADD_OR_CHANGE ( SID_SVX_START + 581 )
#define SID_TABSTOP_ATTR_INDEX ( SID_SVX_START + 582 )
#define SID_TABSTOP_ATTR_POSITION ( SID_SVX_START + 583 )
+#define SID_PARAGRAPH_FIRST_LINE_INDENT ( SID_SVX_START + 584 )
+#define SID_PARAGRAPH_LEFT_INDENT ( SID_SVX_START + 585 )
+#define SID_PARAGRAPH_RIGHT_INDENT ( SID_SVX_START + 586 )
// CAUTION! Range <587 .. 587> used by EditEngine (!)
@@ -649,7 +652,7 @@ class SvxSetItem;
#define SID_FM_CONVERTTO_FORMATTED ( SID_SVX_START + 751 )
#define SID_FM_FILTER_NAVIGATOR_CONTROL ( SID_SVX_START + 752 )
#define SID_INSERT_GRIDCONTROL ( SID_SVX_START + 753 )
-//FREE
+#define SID_PARAGRAPH_CHANGE_STATE ( SID_SVX_START + 754 )
//FREE
//FREE
//FREE
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index bf3b73f5ab78..e8d6cf705b71 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -7226,6 +7226,22 @@ SfxVoidItem ChangeTabStop SID_TABSTOP_ADD_OR_CHANGE
GroupId = ;
]
+SfxVoidItem ParagraphChangeState SID_PARAGRAPH_CHANGE_STATE
+(SfxStringItem FirstLineIndent SID_PARAGRAPH_FIRST_LINE_INDENT, SfxStringItem LeftParaIndent SID_PARAGRAPH_LEFT_INDENT, SfxStringItem RightParaIndent SID_PARAGRAPH_RIGHT_INDENT)
+[
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
SfxVoidItem TableChangeCurrentBorderPosition SID_TABLE_CHANGE_CURRENT_BORDER_POSITION
(SfxStringItem BorderType SID_TABLE_BORDER_TYPE,
SfxUInt16Item Index SID_TABLE_BORDER_INDEX,
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index 47b95ab80409..55072f98ec2a 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -647,6 +647,10 @@ interface BaseTextEditView
[
ExecMethod = ExecTabWin;
]
+ SID_PARAGRAPH_CHANGE_STATE // status()
+ [
+ ExecMethod = ExecTabWin;
+ ]
// from here Export = FALSE;
FID_SEARCH_ON // status()
[
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 7be532cd29b4..0c2995e0b56d 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -693,7 +693,34 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
}
}
break;
+ case SID_PARAGRAPH_CHANGE_STATE:
+ {
+ const SfxPoolItem *fLineIndent, *pLeftIndent, *pRightIndent;
+ if (pReqArgs)
+ {
+ SfxItemSet aLRSpaceSet( GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{} );
+ rSh.GetCurAttr( aLRSpaceSet );
+ SvxLRSpaceItem aParaMargin( aLRSpaceSet.Get( RES_LR_SPACE ) );
+ if (pReqArgs->GetItemState(SID_PARAGRAPH_FIRST_LINE_INDENT,true,&fLineIndent) == SfxItemState::SET)
+ {
+ const OUString ratio = static_cast<const SfxStringItem*>(fLineIndent)->GetValue();
+ aParaMargin.SetTextFirstLineOffset(nPageWidth * ratio.toFloat());
+ }
+ else if (pReqArgs->GetItemState(SID_PARAGRAPH_LEFT_INDENT,true,&pLeftIndent) == SfxItemState::SET)
+ {
+ const OUString ratio = static_cast<const SfxStringItem*>(pLeftIndent)->GetValue();
+ aParaMargin.SetLeft(nPageWidth * ratio.toFloat());
+ }
+ else if (pReqArgs->GetItemState(SID_PARAGRAPH_RIGHT_INDENT,true,&pRightIndent) == SfxItemState::SET)
+ {
+ const OUString ratio = static_cast<const SfxStringItem*>(pRightIndent)->GetValue();
+ aParaMargin.SetRight(nPageWidth * ratio.toFloat());
+ }
+ rSh.SetAttrItem(aParaMargin);
+ }
+ break;
+ }
case SID_HANGING_INDENT:
{
SfxItemSet aLRSpaceSet( GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{} );