[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - include/svx svx/sdi sw/sdi sw/source

gokaysatir (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 19 09:30:28 UTC 2020


 include/svx/svxids.hrc              |    5 ++++-
 svx/sdi/svx.sdi                     |   16 ++++++++++++++++
 sw/sdi/_viewsh.sdi                  |    4 ++++
 sw/source/uibase/uiview/viewtab.cxx |   27 +++++++++++++++++++++++++++
 4 files changed, 51 insertions(+), 1 deletion(-)

New commits:
commit db84e4b40e3ad8656738baeaa9e2036c038a8fa3
Author:     gokaysatir <gokaysatir at gmail.com>
AuthorDate: Wed May 6 12:04:39 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jun 19 11:29:51 2020 +0200

    tdf#111535 - Add First-line indent, paragraph indent, and tab spaces/Core part
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93165
    Tested-by: Jenkins
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    (cherry picked from commit 15adfafee5b48d6f88a0b970c50e5c5bc77a4ab1)
    
    Change-Id: Ib340e74646299c344dd770977497f59a030c86f3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96611
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index eba3066ecf74..a9960d216b4e 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -536,6 +536,9 @@ class SfxStringItem;
 
 // CAUTION! Range <587 .. 587> used by EditEngine (!)
 
+#define SID_PARAGRAPH_FIRST_LINE_INDENT                 ( SID_SVX_START + 588 )
+#define SID_PARAGRAPH_LEFT_INDENT                       ( SID_SVX_START + 589 )
+#define SID_PARAGRAPH_RIGHT_INDENT                      ( SID_SVX_START + 590 )
 
 // CAUTION! Range <591 .. 591> used by EditEngine (!)
 
@@ -645,7 +648,7 @@ class SfxStringItem;
 #define SID_FM_CONVERTTO_FORMATTED                      ( SID_SVX_START + 751 )
 #define SID_FM_FILTER_NAVIGATOR_CONTROL                 ( SID_SVX_START + 752 )
 //FREE
-//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 cf48781fc77e..f077e5abaddb 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -7194,6 +7194,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 b4c3803e0a0d..50a40e84c9ab 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -635,6 +635,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 6a70fb9e6397..f4d85a249846 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -702,7 +702,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.SetTextFirstLineOfst(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>{} );


More information about the Libreoffice-commits mailing list