[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - include/svx svx/source sw/inc sw/source

2019-12-11 Thread Caolán McNamara (via logerrit)
 include/svx/ctredlin.hxx   |   19 ++-
 svx/source/dialog/ctredlin.cxx |   23 ---
 sw/inc/IDocumentRedlineAccess.hxx  |   16 +---
 sw/source/uibase/misc/redlndlg.cxx |2 ++
 4 files changed, 41 insertions(+), 19 deletions(-)

New commits:
commit 2f6fb28ded84878c5a19453f5076309505e30f0a
Author: Caolán McNamara 
AuthorDate: Tue Dec 10 10:40:22 2019 +
Commit: Xisco Faulí 
CommitDate: Wed Dec 11 10:29:12 2019 +0100

Resolves: tdf#129250 move redline type into RedlinData so we can sort on it

Change-Id: Ia8e6744c1679655240a9a9cee9425030e994e16b
Reviewed-on: https://gerrit.libreoffice.org/84808
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 238207c72723..cc63771d2af6 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -48,15 +48,32 @@ enum class SvxRedlinDateMode
 BEFORE, SINCE, EQUAL, NOTEQUAL, BETWEEN, SAVE, NONE
 };
 
+enum class RedlineType : sal_uInt16
+{
+// Range of RedlineTypes is 0 to 127.
+Insert = 0x0,// Content has been inserted.
+Delete = 0x1,// Content has been deleted.
+Format = 0x2,// Attributes have been applied.
+Table = 0x3,// Table structure has been altered.
+FmtColl = 0x4,// Style has been altered (Autoformat!).
+ParagraphFormat = 0x5,// Paragraph attributes have been changed.
+TableRowInsert = 0x6,// Table row has been inserted.
+TableRowDelete = 0x7,// Table row has been deleted.
+TableCellInsert = 0x8,// Table cell has been inserted.
+TableCellDelete = 0x9,// Table cell has been deleted.
+Any = USHRT_MAX // special value to indicate any redline type in some 
method calls
+};
+
 /// Struct for sorting data.
 class SAL_WARN_UNUSED SVX_DLLPUBLIC RedlinData
 {
 public:
 RedlinData();
 virtual ~RedlinData();
-boolbDisabled;
 DateTimeaDateTime;
 void*   pData;
+RedlineType eType;
+boolbDisabled;
 };
 
 /// Class for the representation of Strings depending on the font.
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index e4e8eeb654df..f2d119b0005c 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -37,10 +37,12 @@
 #define WRITER_DATE 2
 #define CALC_DATE   3
 
-RedlinData::RedlinData() : aDateTime(DateTime::EMPTY)
+RedlinData::RedlinData()
+: aDateTime(DateTime::EMPTY)
+, pData(nullptr)
+, eType(RedlineType::Any)
+, bDisabled(false)
 {
-bDisabled=false;
-pData=nullptr;
 }
 
 RedlinData::~RedlinData()
@@ -155,6 +157,21 @@ int SvxRedlinTable::ColCompare(const weld::TreeIter& 
rLeft, const weld::TreeIter
 
 int nSortCol = pTreeView->get_sort_column();
 
+if (pTreeView == xWriterTreeView.get() && nSortCol == 0)
+{
+RedlinData *pLeftData = 
reinterpret_cast(pTreeView->get_id(rLeft).toInt64());
+RedlinData *pRightData = 
reinterpret_cast(pTreeView->get_id(rRight).toInt64());
+
+if (pLeftData && pRightData)
+{
+if (pLeftData->eType < pRightData->eType)
+nCompare = -1;
+else if (pLeftData->eType > pRightData->eType)
+nCompare = 1;
+return nCompare;
+}
+}
+
 if (nSortCol == nDatePos)
 {
 RedlinData *pLeftData = 
reinterpret_cast(pTreeView->get_id(rLeft).toInt64());
diff --git a/sw/inc/IDocumentRedlineAccess.hxx 
b/sw/inc/IDocumentRedlineAccess.hxx
index 20c6d5b97210..f446184d37ce 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -28,6 +28,7 @@
 
 #include 
 #include 
+#include 
 
 #include "docary.hxx"
 
@@ -60,21 +61,6 @@ namespace o3tl
 template<> struct typed_flags : is_typed_flags {};
 }
 
-enum class RedlineType : sal_uInt16
-{
-// Range of RedlineTypes is 0 to 127.
-Insert = 0x0,// Content has been inserted.
-Delete = 0x1,// Content has been deleted.
-Format = 0x2,// Attributes have been applied.
-Table = 0x3,// Table structure has been altered.
-FmtColl = 0x4,// Style has been altered (Autoformat!).
-ParagraphFormat = 0x5,// Paragraph attributes have been changed.
-TableRowInsert = 0x6,// Table row has been inserted.
-TableRowDelete = 0x7,// Table row has been deleted.
-TableCellInsert = 0x8,// Table cell has been inserted.
-TableCellDelete = 0x9,// Table cell has been deleted.
-Any = USHRT_MAX // special value to indicate any redline type in some 
method calls
-};
 inline OUString SwRedlineTypeToOUString(RedlineType eType)
 {
 OUString sRet;
diff --git a/sw/source/uibase/misc/redlndlg.cxx 
b/sw/source/uibase/misc/redlndlg.cxx
index 9d2db971da19..0dcf42280092 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -573,6 +573,7 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent 
*pParent, 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - include/svx svx/source

2019-11-18 Thread Caolán McNamara (via logerrit)
 include/svx/weldeditview.hxx   |1 +
 svx/source/dialog/weldeditview.cxx |6 ++
 2 files changed, 7 insertions(+)

New commits:
commit 070bb33d301daeb8767d31847c0eeaa19165d761
Author: Caolán McNamara 
AuthorDate: Thu Nov 14 16:01:53 2019 +
Commit: Xisco Faulí 
CommitDate: Mon Nov 18 13:21:25 2019 +0100

Resolves: tdf#128104 Input Engine events are delivered via Command

so editengine needs to get those events too.

Change-Id: I528065ef804f0a2dfa98e49034c86e9483bade2d
Reviewed-on: https://gerrit.libreoffice.org/82720
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/include/svx/weldeditview.hxx b/include/svx/weldeditview.hxx
index f5e0183d194d..d4e015ce6568 100644
--- a/include/svx/weldeditview.hxx
+++ b/include/svx/weldeditview.hxx
@@ -39,6 +39,7 @@ protected:
 virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
 virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
 virtual bool KeyInput(const KeyEvent& rKEvt) override;
+virtual bool Command(const CommandEvent& rCEvt) override;
 virtual void GetFocus() override;
 virtual void LoseFocus() override;
 virtual void Resize() override;
diff --git a/svx/source/dialog/weldeditview.cxx 
b/svx/source/dialog/weldeditview.cxx
index 1f6e0332cfe5..764f933c256c 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -132,6 +132,12 @@ bool WeldEditView::KeyInput(const KeyEvent& rKEvt)
 return true;
 }
 
+bool WeldEditView::Command(const CommandEvent& rCEvt)
+{
+m_xEditView->Command(rCEvt);
+return true;
+}
+
 class WeldEditAccessible;
 
 class WeldViewForwarder : public SvxViewForwarder
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - include/svx svx/source

2019-07-14 Thread Sumit Chauhan (via logerrit)
 include/svx/sidebar/AreaPropertyPanelBase.hxx |2 ++
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   18 ++
 2 files changed, 20 insertions(+)

New commits:
commit 6d3dfe83c82860c0688fd8c8dcc250402df53c74
Author: Sumit Chauhan 
AuthorDate: Sat Feb 9 13:16:50 2019 +0530
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Jul 15 01:16:24 2019 +0200

tdf#120495 Providing self adapting height to the Area section of Sidebar

This problem comes when we switch between different fill tabs in area 
sidebar and
this patch solves the issue.

Change-Id: I09936e600214394d26a27d26d47be3ef9942b65f
Reviewed-on: https://gerrit.libreoffice.org/67577
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 347afce3a997291313fd88843ba248ccbbcb3990)
Reviewed-on: https://gerrit.libreoffice.org/75483
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index b24281efea5f..d24803b3e9ce 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class XFillFloatTransparenceItem;
 class XFillTransparenceItem;
@@ -151,6 +152,7 @@ protected:
 Image   maImgLinear;
 
 VclPtr   mxTrGrPopup;
+VclPtrmpPanel;
 
 std::unique_ptr< XFillFloatTransparenceItem >   mpFloatTransparenceItem;
 std::unique_ptr< SfxUInt16Item >mpTransparanceItem;
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx 
b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 4c7a15c9f9a9..348babec99d8 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -104,6 +104,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
 get(mpLbFillGradTo, "fillgrad2");
 get(mpGradientStyle, "gradientstyle");
 get(mpBmpImport, "bmpimport");
+mpPanel = dynamic_cast(pParent);
 
 Initialize();
 }
@@ -130,6 +131,7 @@ void AreaPropertyPanelBase::dispose()
 mpLbFillGradTo.clear();
 mpGradientStyle.clear();
 mpBmpImport.clear();
+mpPanel.clear();
 
 PanelLayout::dispose();
 }
@@ -440,6 +442,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, 
ListBox&, void)
 {
 mpLbFillType->Selected();
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillColorHdl, SvxColorListBox&, 
void)
@@ -602,6 +606,8 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl()
 break;
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::ImpUpdateTransparencies()
@@ -857,6 +863,8 @@ void AreaPropertyPanelBase::updateFillStyle(bool bDisabled, 
bool bDefaultOrSet,
 mpToolBoxColor->Hide();
 meLastXFS = static_cast(-1);
 mpStyleItem.reset();
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool 
bDefaultOrSet, const SfxPoolItem* pState)
@@ -896,6 +904,8 @@ void AreaPropertyPanelBase::updateFillGradient(bool 
bDisabled, bool bDefaultOrSe
 mpLbFillGradTo->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool 
bDefaultOrSet, const SfxPoolItem* pState)
@@ -927,6 +937,8 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, 
bool bDefaultOrSet,
 mpLbFillAttr->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const 
SfxPoolItem* pState)
@@ -944,6 +956,8 @@ void AreaPropertyPanelBase::updateFillColor(bool 
bDefaultOrSet, const SfxPoolIte
 mpLbFillType->SelectEntryPos(SOLID);
 Update();
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool 
bDefaultOrSet, const SfxPoolItem* pState)
@@ -977,6 +991,8 @@ void AreaPropertyPanelBase::updateFillBitmap(bool 
bDisabled, bool bDefaultOrSet,
 mpLbFillAttr->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::NotifyItemUpdate(
@@ -1243,6 +1259,8 @@ void AreaPropertyPanelBase::Update()
 OSL_ENSURE(false, "Non supported FillType (!)");
 break;
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransSliderHdl, Slider*, void)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org