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

2020-09-23 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 c3997a03d41b5bd92b52cfc852dac56c6175c735
Author: Sumit Chauhan 
AuthorDate: Sat Feb 9 13:16:50 2019 +0530
Commit: Aron Budea 
CommitDate: Wed Sep 23 12:59:19 2020 +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 
(cherry picked from commit 6d3dfe83c82860c0688fd8c8dcc250402df53c74)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103231
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 5736617080f8..eb02b7a33823 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;
@@ -155,6 +156,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 0e911e47b1e9..f84f38fdec59 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -106,6 +106,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
 get(mpLbFillGradTo, "fillgrad2");
 get(mpGradientStyle, "gradientstyle");
 get(mpBmpImport, "bmpimport");
+mpPanel = dynamic_cast(pParent);
 
 Initialize();
 }
@@ -132,6 +133,7 @@ void AreaPropertyPanelBase::dispose()
 mpLbFillGradTo.clear();
 mpGradientStyle.clear();
 mpBmpImport.clear();
+mpPanel.clear();
 
 PanelLayout::dispose();
 }
@@ -443,6 +445,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, 
ListBox&, void)
 {
 mpLbFillType->Selected();
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillColorHdl, SvxColorListBox&, 
void)
@@ -605,6 +609,8 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl()
 break;
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::ImpUpdateTransparencies()
@@ -860,6 +866,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)
@@ -899,6 +907,8 @@ void AreaPropertyPanelBase::updateFillGradient(bool 
bDisabled, bool bDefaultOrSe
 mpLbFillGradTo->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool 
bDefaultOrSet, const SfxPoolItem* pState)
@@ -930,6 +940,8 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, 
bool bDefaultOrSet,
 mpLbFillAttr->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const 
SfxPoolItem* pState)
@@ -947,6 +959,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)
@@ -980,6 +994,8 @@ void AreaPropertyPanelBase::updateFillBitmap(bool 
bDisabled, bool bDefaultOrSet,
 mpLbFillAttr->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::NotifyItemUpdate(
@@ -1247,6 +1263,8 @@ void AreaPropertyPanelBase::Update()
 OSL_ENSURE(false, "Non supported FillType (!)");
 break;
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, 

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

2019-11-26 Thread Sumit Chauhan (via logerrit)
 include/sfx2/notebookbar/SfxNotebookBar.hxx |8 +---
 include/vcl/syswin.hxx  |5 -
 sfx2/source/notebookbar/SfxNotebookBar.cxx  |   26 --
 vcl/source/window/syswin.cxx|6 --
 4 files changed, 33 insertions(+), 12 deletions(-)

New commits:
commit b497349fc04d1e3fe4eac265067feae2e5519dd9
Author: Sumit Chauhan 
AuthorDate: Mon Jun 10 15:47:55 2019 +0530
Commit: Caolán McNamara 
CommitDate: Tue Nov 26 15:55:37 2019 +0100

Reload Notebookbar, when customization is being done.

This patch is related to notebookbar customization tab. When one clicks
the widget checkbox , to preview the real-time changes one need to call
this ReloadNotebookBar() method .

Reviewed-on: https://gerrit.libreoffice.org/73750
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
(cherry picked from commit 6b888ac476fe6ac2ee96c7086cb8c24249f08473)

Change-Id: I3d6314e4b8220a8744331246639acadea941252f
Reviewed-on: https://gerrit.libreoffice.org/82737
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx 
b/include/sfx2/notebookbar/SfxNotebookBar.hxx
index 9eb76e9c3ba5..2a30a126beaf 100644
--- a/include/sfx2/notebookbar/SfxNotebookBar.hxx
+++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx
@@ -36,10 +36,11 @@ public:
 static void ExecMethod(SfxBindings& rBindings, const OUString& rUIName);
 
 /// Function to be called from the sdi's StateMethod.
-static bool StateMethod(SfxBindings& rBindings, const OUString& rUIFile);
+static bool StateMethod(SfxBindings& rBindings, const OUString& rUIFile,
+bool bReloadNotebookbar = false);
 static bool StateMethod(SystemWindow* pSysWindow,
-const css::uno::Reference & 
xFrame,
-const OUString& rUIFile);
+const css::uno::Reference& 
xFrame,
+const OUString& rUIFile, bool bReloadNotebookbar = 
false);
 
 /// Method temporarily blocks showing of the NotebookBar
 static void LockNotebookBar();
@@ -53,6 +54,7 @@ public:
 /** Show menu bar only in current frame */
 static void ShowMenubar(SfxViewFrame const * pViewFrame, bool bShow);
 static void ToggleMenubar();
+static void ReloadNotebookBar(OUString& sUIPath);
 
 private:
 static bool m_bLock;
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index c285abe2c024..22dd359e927b 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -215,7 +215,10 @@ public:
 MenuBar*GetMenuBar() const { return mpMenuBar; }
 voidSetMenuBarMode( MenuBarMode nMode );
 
-voidSetNotebookBar(const OUString& rUIXMLDescription, const 
css::uno::Reference& rFrame);
+void SetNotebookBar(const OUString& rUIXMLDescription,
+const css::uno::Reference& rFrame,
+bool bReloadNotebookbar = false);
+
 voidCloseNotebookBar();
 VclPtr const & GetNotebookBar() const;
 
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx 
b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 0090cb1de1bd..402874ccb4ef 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -283,15 +284,17 @@ void SfxNotebookBar::ExecMethod(SfxBindings& rBindings, 
const OUString& rUIName)
 rBindings.Update();
 }
 
-bool SfxNotebookBar::StateMethod(SfxBindings& rBindings, const OUString& 
rUIFile)
+bool SfxNotebookBar::StateMethod(SfxBindings& rBindings, const OUString& 
rUIFile,
+ bool bReloadNotebookbar)
 {
 SfxFrame& rFrame = rBindings.GetDispatcher_Impl()->GetFrame()->GetFrame();
-return StateMethod(rFrame.GetSystemWindow(), rFrame.GetFrameInterface(), 
rUIFile);
+return StateMethod(rFrame.GetSystemWindow(), rFrame.GetFrameInterface(), 
rUIFile,
+   bReloadNotebookbar);
 }
 
 bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
- const Reference & xFrame,
- const OUString& rUIFile)
+ const Reference& xFrame,
+ const OUString& rUIFile, bool 
bReloadNotebookbar)
 {
 if (!pSysWindow)
 {
@@ -325,15 +328,17 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
 bChangedFile = sNewFile != sCurrentFile;
 }
 
-if ( ( !sFile.isEmpty() && bChangedFile ) || !pNotebookBar || 
!pNotebookBar->IsVisible() )
+if ((!sFile.isEmpty() && bChangedFile) || !pNotebookBar || 
!pNotebookBar->IsVisible()
+|| bReloadNotebookbar)
 {
 RemoveListeners(pSysWindow);
 
 OUStringBuffer 

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

2019-09-16 Thread Sumit Chauhan (via logerrit)
 sw/uiconfig/swriter/ui/notebookbar.ui|5 -
 sw/uiconfig/swriter/ui/notebookbar_compact.ui|   33 --
 sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui |   72 ---
 3 files changed, 27 insertions(+), 83 deletions(-)

New commits:
commit ebdb8a832aca93d295b9115363e15d0f2e2a18f6
Author: Sumit Chauhan 
AuthorDate: Tue Sep 10 15:17:34 2019 +0530
Commit: Szymon Kłos 
CommitDate: Mon Sep 16 17:30:34 2019 +0200

Modified writer's notebookbar*.ui file to display extension

Change-Id: I52793cec017939bf525cae11cc5eff0693620cf7
Reviewed-on: https://gerrit.libreoffice.org/78799
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui 
b/sw/uiconfig/swriter/ui/notebookbar.ui
index 06149f4798ce..eaf946e40253 100644
--- a/sw/uiconfig/swriter/ui/notebookbar.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar.ui
@@ -17440,11 +17440,14 @@
 center
 True
 
-  
+  
 True
 False
 center
 True
+both
+False
+3
   
   
 False
diff --git a/sw/uiconfig/swriter/ui/notebookbar_compact.ui 
b/sw/uiconfig/swriter/ui/notebookbar_compact.ui
index 4b55ff931b06..e57604ff8a6f 100644
--- a/sw/uiconfig/swriter/ui/notebookbar_compact.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar_compact.ui
@@ -17505,45 +17505,16 @@
 center
 True
 
-  
+  
 True
 False
 center
 True
-
-  
-True
-False
-center
-True
-both-horiz
-False
-
-  
-True
-False
-AddonCommand
-  
-  
-False
-True
-  
-
-  
-  
-False
-True
-1
-  
-
-
-  
-
   
   
 False
 True
-0
+1
   
 
   
diff --git a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui 
b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui
index 7813098dd1b2..c511dae7226e 100644
--- a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui
@@ -4982,48 +4982,21 @@
   
 
 
-  
+  
 True
 False
-bottom
-
-  
-True
-False
-5
-5
-vertical
-  
-  
-False
-True
-5
-0
-  
-
+vertical
 
-  
+  
 True
 False
-vertical
 
-  
+  
 True
 False
 icons
 False
 2
-
-  
-True
-False
-AddonCommand
-  
-  
-False
-True
-  
-  

[Libreoffice-commits] core.git: vcl/source

2019-09-03 Thread Sumit Chauhan (via logerrit)
 vcl/source/window/builder.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 0473141a91a686de700fd73118bcc142b4f636b4
Author: Sumit Chauhan 
AuthorDate: Tue Sep 3 02:05:07 2019 +0530
Commit: Mike Kaganski 
CommitDate: Tue Sep 3 19:36:02 2019 +0200

tdf#127272 Writer crash issue resolve

Change-Id: Ibbdc10cc11170b8d8d55c42e6626d064ce4ef702
Reviewed-on: https://gerrit.libreoffice.org/78427
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index ad9706cd7339..c83f6339d432 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2235,14 +2235,11 @@ VclPtr VclBuilder::makeObject(vcl::Window 
*pParent, const OString &
 {
 xWindow = VclPtr::Create(pParent, WB_3DLOOK | WB_TABSTOP);
 }
-else if (name == "NotebookBarAddonsToolMergePoint")
+else if(name == "NotebookBarAddonsToolMergePoint")
 {
-#ifndef DISABLE_DYNLOADING
-customMakeWidget pFunction = nullptr;
-ModuleMap::iterator aI = g_aModuleMap.find(SAL_DLLPREFIX "sfxlo" 
SAL_DLLEXTENSION);
-pFunction = 
reinterpret_cast(aI->second->getFunctionSymbol("makeNotebookbarToolBox"));
-NotebookBarAddonsMerger::MergeNotebookBarAddons( pParent, pFunction, 
m_xFrame, m_pNotebookBarAddonsItem, rMap );
-#endif
+customMakeWidget pFunction = 
GetCustomMakeWidget("sfxlo-NotebookbarToolBox");
+if(pFunction != nullptr)
+NotebookBarAddonsMerger::MergeNotebookBarAddons(pParent, 
pFunction, m_xFrame, m_pNotebookBarAddonsItem, rMap);
 return nullptr;
 }
 else if (name == "GtkToolButton" || name == "GtkMenuToolButton" ||
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/vcl sfx2/Library_sfx.mk sfx2/source sw/uiconfig vcl/Library_vcl.mk vcl/source

2019-08-28 Thread Sumit Chauhan (via logerrit)
 include/vcl/NotebookBarAddonsMerger.hxx|9 +-
 include/vcl/OptionalBox.hxx|9 --
 sfx2/Library_sfx.mk|1 
 sfx2/source/notebookbar/PriorityMergedHBox.cxx |2 
 sw/uiconfig/swriter/ui/notebookbar.ui  |   34 
 vcl/Library_vcl.mk |1 
 vcl/source/window/NotebookBarAddonsMerger.cxx  |  104 -
 vcl/source/window/OptionalBox.cxx  |4 
 vcl/source/window/builder.cxx  |5 -
 9 files changed, 86 insertions(+), 83 deletions(-)

New commits:
commit e0d29fb937b0f423f151e0a504bfe326f4d8279e
Author: Sumit Chauhan 
AuthorDate: Mon Aug 5 20:27:54 2019 +0530
Commit: Szymon Kłos 
CommitDate: Wed Aug 28 08:13:11 2019 +0200

GtkWidget for the priority of extension under Extension Tab.

The new structure :
 PriorityMergedHBox
  --OptionalBox
--ToolBoxExtension
  --Extension1
  --OptionalBox
.

Change-Id: I72760e4f0d60eb6f1f82c1e928601d41a2e4b6ce
Reviewed-on: https://gerrit.libreoffice.org/76987
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/include/vcl/NotebookBarAddonsMerger.hxx 
b/include/vcl/NotebookBarAddonsMerger.hxx
index fde1196e4a63..ccd45ffb0f65 100644
--- a/include/vcl/NotebookBarAddonsMerger.hxx
+++ b/include/vcl/NotebookBarAddonsMerger.hxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class PopupMenu;
 
@@ -62,11 +63,15 @@ struct AddonNotebookBarItem
 class NotebookBarAddonsMerger
 {
 public:
+typedef std::map stringmap;
+typedef void (*customMakeWidget)(VclPtr& rRet, 
VclPtr& pParent,
+ stringmap& rVec);
 NotebookBarAddonsMerger();
 ~NotebookBarAddonsMerger();
-static void MergeNotebookBarAddons(vcl::Window* pParent,
+static void MergeNotebookBarAddons(vcl::Window* pParent, const 
customMakeWidget& pFunction,
const 
css::uno::Reference& rFrame,
-   const NotebookBarAddonsItem& 
aNotebookBarAddonsItem);
+   const NotebookBarAddonsItem& 
aNotebookBarAddonsItem,
+   stringmap rVec);
 static void MergeNotebookBarMenuAddons(PopupMenu* pPopupMenu, sal_Int16 
nItemId,
const OString& sItemIdName,
NotebookBarAddonsItem& 
aNotebookBarAddonsItem);
diff --git a/sfx2/source/notebookbar/OptionalBox.hxx 
b/include/vcl/OptionalBox.hxx
similarity index 83%
rename from sfx2/source/notebookbar/OptionalBox.hxx
rename to include/vcl/OptionalBox.hxx
index ad36540aed61..0b6731bd15c1 100644
--- a/sfx2/source/notebookbar/OptionalBox.hxx
+++ b/include/vcl/OptionalBox.hxx
@@ -17,19 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SFX2_NOTEBOOKBAR_OPTIONALBOX_HXX
-#define INCLUDED_SFX2_NOTEBOOKBAR_OPTIONALBOX_HXX
+#ifndef INCLUDED_VCL_OPTIONALBOX_HXX
+#define INCLUDED_VCL_OPTIONALBOX_HXX
 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
-#include 
 
-class SFX2_DLLPUBLIC OptionalBox : public VclHBox, public vcl::IPrioritable
+class OptionalBox : public VclHBox, public vcl::IPrioritable
 {
 private:
 bool m_bInFullView;
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 6abba0617c7f..2ca29436aff7 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -238,7 +238,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
 sfx2/source/inet/inettbc \
 sfx2/source/notebookbar/ContextVBox \
 sfx2/source/notebookbar/DropdownBox \
-sfx2/source/notebookbar/OptionalBox \
 sfx2/source/notebookbar/PriorityHBox \
 sfx2/source/notebookbar/PriorityMergedHBox \
 sfx2/source/notebookbar/SfxNotebookBar \
diff --git a/sfx2/source/notebookbar/PriorityMergedHBox.cxx 
b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
index 4e7fa0c16d2a..e187306ff437 100644
--- a/sfx2/source/notebookbar/PriorityMergedHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 #include 
-#include "OptionalBox.hxx"
+#include 
 #include "PriorityHBox.hxx"
 #include "NotebookbarPopup.hxx"
 
diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui 
b/sw/uiconfig/swriter/ui/notebookbar.ui
index c7c8ac3976c1..06149f4798ce 100644
--- a/sw/uiconfig/swriter/ui/notebookbar.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar.ui
@@ -17440,46 +17440,16 @@
 center
 True
 
-  
+  
 True
 False
 center
 True
-
-  
-True
-False
-center
- 

[Libreoffice-commits] core.git: extras/source include/vcl sw/uiconfig vcl/source

2019-07-26 Thread Sumit Chauhan (via logerrit)
 extras/source/glade/libreoffice-catalog.xml.in |6 
 include/vcl/NotebookBarAddonsMerger.hxx|   11 -
 sw/uiconfig/swriter/ui/notebookbar.ui  |  203 -
 vcl/source/window/NotebookBarAddonsMerger.cxx  |   94 ---
 vcl/source/window/builder.cxx  |   11 -
 5 files changed, 288 insertions(+), 37 deletions(-)

New commits:
commit 7b0dd98941911c686c0d127810d1c333df5026c3
Author: Sumit Chauhan 
AuthorDate: Thu Jul 25 02:51:10 2019 +0530
Commit: Szymon Kłos 
CommitDate: Fri Jul 26 18:36:08 2019 +0200

Extension support for gtkmenuItem and notebookbar.ui file added for writer

Change-Id: I65a07fbef7726cdaa9061ebf2227fbedd725d4db
Reviewed-on: https://gerrit.libreoffice.org/76278
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/extras/source/glade/libreoffice-catalog.xml.in 
b/extras/source/glade/libreoffice-catalog.xml.in
index 655e5b8dbe1f..3cf70cfc456f 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -363,5 +363,11 @@
 
+
+
   
 
diff --git a/include/vcl/NotebookBarAddonsMerger.hxx 
b/include/vcl/NotebookBarAddonsMerger.hxx
index c3b9998c7750..fde1196e4a63 100644
--- a/include/vcl/NotebookBarAddonsMerger.hxx
+++ b/include/vcl/NotebookBarAddonsMerger.hxx
@@ -24,12 +24,15 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 
+class PopupMenu;
+
 struct NotebookBarAddonsItem
 {
 Image aImage;
@@ -59,12 +62,14 @@ struct AddonNotebookBarItem
 class NotebookBarAddonsMerger
 {
 public:
-NotebookBarAddonsMerger(vcl::Window* pParent,
-const css::uno::Reference& 
rFrame,
-const NotebookBarAddonsItem& 
aNotebookBarAddonsItem);
+NotebookBarAddonsMerger();
+~NotebookBarAddonsMerger();
 static void MergeNotebookBarAddons(vcl::Window* pParent,
const 
css::uno::Reference& rFrame,
const NotebookBarAddonsItem& 
aNotebookBarAddonsItem);
+static void MergeNotebookBarMenuAddons(PopupMenu* pPopupMenu, sal_Int16 
nItemId,
+   const OString& sItemIdName,
+   NotebookBarAddonsItem& 
aNotebookBarAddonsItem);
 };
 
 #endif
diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui 
b/sw/uiconfig/swriter/ui/notebookbar.ui
index f6935d190cab..c2ea3f405612 100644
--- a/sw/uiconfig/swriter/ui/notebookbar.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar.ui
@@ -1,9 +1,33 @@
 
-
+
 
   
   
   
+  
+True
+False
+
+  
+True
+False
+AddonCommand
+  
+
+
+  
+True
+False
+  
+
+
+  
+True
+False
+service:com.sun.star.deployment.ui.PackageManagerDialog
+  
+
+  
   
 True
 False
@@ -17314,6 +17338,175 @@
   
 
 
+  
+True
+False
+
+  
+True
+False
+end
+center
+True
+
+  
+True
+False
+center
+True
+vertical
+
+  
+E_xtension
+True
+True
+False
+False
+end
+center
+True
+none
+True
+  
+  
+False
+True
+0
+  
+
+
+  
+True
+True
+end
+True
+both-horiz
+False
+1
+
+  
+True
+False
+service:com.sun.star.deployment.ui.PackageManagerDialog
+  
+  
+False
+True
+  
+
+  
+  
+False
+True
+1
+  
+

[Libreoffice-commits] core.git: sfx2/source vcl/source

2019-07-21 Thread Sumit Chauhan (via logerrit)
 sfx2/source/notebookbar/SfxNotebookBar.cxx|   18 --
 vcl/source/window/NotebookBarAddonsMerger.cxx |   21 ++---
 2 files changed, 34 insertions(+), 5 deletions(-)

New commits:
commit 22f2ecbcabf3928d5486690ca6465b7b37bc8a10
Author: Sumit Chauhan 
AuthorDate: Sat Jul 20 02:43:15 2019 +0530
Commit: Szymon Kłos 
CommitDate: Mon Jul 22 06:36:27 2019 +0200

Patch fixes the image rendering issue of extension in NotebookBar

Change-Id: I7645766af1a6acfd7117fce3fcb29da038d9d92f
Reviewed-on: https://gerrit.libreoffice.org/75986
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx 
b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 3b56156b7c2c..73ca5614935e 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -39,6 +39,8 @@ using namespace css::ui;
 using namespace css;
 
 #define MENUBAR_STR "private:resource/menubar/menubar"
+
+static const char MERGE_NOTEBOOKBAR_URL[] = "URL";
 static const char MERGE_NOTEBOOKBAR_IMAGEID[] = "ImageIdentifier";
 
 bool SfxNotebookBar::m_bLock = false;
@@ -59,14 +61,26 @@ static void NotebookbarAddonValues(
 {
 css::uno::Sequence pExtensionVal = 
aExtension[nSecIdx];
 Image aImage;
-
+bool isBigImage = true;
 for (int nRes = 0; nRes < pExtensionVal.getLength(); nRes++)
 {
 OUString sImage;
 if (pExtensionVal[nRes].Name == MERGE_NOTEBOOKBAR_IMAGEID)
 {
 pExtensionVal[nRes].Value >>= sImage;
-aImage = 
framework::AddonsOptions().GetImageFromURL(sImage, false);
+aImage = 
framework::AddonsOptions().GetImageFromURL(sImage, isBigImage);
+}
+}
+if(!aImage)
+{
+for (int nRes = 0; nRes < pExtensionVal.getLength(); nRes++)
+{
+OUString sImage;
+if (pExtensionVal[nRes].Name == MERGE_NOTEBOOKBAR_URL)
+{
+pExtensionVal[nRes].Value >>= sImage;
+aImage = 
framework::AddonsOptions().GetImageFromURL(sImage, isBigImage);
+}
 }
 }
 aImageValues.push_back(aImage);
diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx 
b/vcl/source/window/NotebookBarAddonsMerger.cxx
index 9bab4a4ea425..d65aba9624f8 100644
--- a/vcl/source/window/NotebookBarAddonsMerger.cxx
+++ b/vcl/source/window/NotebookBarAddonsMerger.cxx
@@ -21,6 +21,9 @@
 #include 
 #include 
 
+static const char STYLE_TEXT[] = "Text";
+static const char STYLE_ICON[] = "Icon";
+
 static const char MERGE_NOTEBOOKBAR_URL[] = "URL";
 static const char MERGE_NOTEBOOKBAR_TITLE[] = "Title";
 static const char MERGE_NOTEBOOKBAR_IMAGEID[] = "ImageIdentifier";
@@ -77,21 +80,33 @@ void NotebookBarAddonsMerger::MergeNotebookBarAddons(
 if (pToolbox)
 {
 Size aSize(0, 0);
+Image sImage;
 pToolbox->InsertItem(aAddonNotebookBarItem.sCommandURL, 
m_xFrame,
  ToolBoxItemBits::NONE, aSize);
 nItemId = 
pToolbox->GetItemId(aAddonNotebookBarItem.sCommandURL);
 pToolbox->SetItemCommand(nItemId, 
aAddonNotebookBarItem.sCommandURL);
 pToolbox->SetQuickHelpText(nItemId, 
aAddonNotebookBarItem.sLabel);
-pToolbox->SetItemText(nItemId, aAddonNotebookBarItem.sLabel);
+
 if (nIter < aImageVec.size())
 {
-Image sImage = aImageVec[nIter];
+sImage = aImageVec[nIter];
 if (!sImage)
+{
 sImage = vcl::CommandInfoProvider::GetImageForCommand(
 aAddonNotebookBarItem.sImageIdentifier, m_xFrame);
+}
+nIter++;
+}
+
+if (aAddonNotebookBarItem.sStyle == STYLE_TEXT)
+pToolbox->SetItemText(nItemId, 
aAddonNotebookBarItem.sLabel);
+else if (aAddonNotebookBarItem.sStyle == STYLE_ICON)
+pToolbox->SetItemImage(nItemId, sImage);
+else
+{
+pToolbox->SetItemText(nItemId, 
aAddonNotebookBarItem.sLabel);
 pToolbox->SetItemImage(nItemId, sImage);
 }
-nIter++;
 }
 pToolbox->InsertSeparator();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/vcl sfx2/source vcl/inc vcl/Library_vcl.mk vcl/source

2019-07-19 Thread Sumit Chauhan (via logerrit)
 include/vcl/NotebookBarAddonsMerger.hxx   |   72 ++
 include/vcl/builder.hxx   |   17 ++--
 include/vcl/notebookbar.hxx   |5 +
 include/vcl/syswin.hxx|2 
 sfx2/source/notebookbar/SfxNotebookBar.cxx|   46 +++
 vcl/Library_vcl.mk|1 
 vcl/inc/brdwin.hxx|7 +
 vcl/source/control/notebookbar.cxx|   12 +--
 vcl/source/window/NotebookBarAddonsMerger.cxx |  101 ++
 vcl/source/window/brdwin.cxx  |7 +
 vcl/source/window/builder.cxx |   11 ++
 vcl/source/window/syswin.cxx  |4 -
 12 files changed, 261 insertions(+), 24 deletions(-)

New commits:
commit fbcd5f074ca3dc105f4fe45b6975c6de2bf60f35
Author: Sumit Chauhan 
AuthorDate: Mon Jul 15 22:19:00 2019 +0530
Commit: Szymon Kłos 
CommitDate: Fri Jul 19 11:51:36 2019 +0200

Engine to add Extension inside extension tab in NotebookBar

The patch provides backend for adding the extension.Schema for the
adding extension in notebookbar can be seen here
https://gerrit.libreoffice.org/#/c/75134/

Change-Id: I10f0e83d1aaec5330c80b3b53cf59a21b93be015
Reviewed-on: https://gerrit.libreoffice.org/75650
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/include/vcl/NotebookBarAddonsMerger.hxx 
b/include/vcl/NotebookBarAddonsMerger.hxx
new file mode 100644
index ..c3b9998c7750
--- /dev/null
+++ b/include/vcl/NotebookBarAddonsMerger.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_NOTEBOOKBARADDONSMERGER_HXX
+#define INCLUDED_VCL_NOTEBOOKBARADDONSMERGER_HXX
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct NotebookBarAddonsItem
+{
+Image aImage;
+std::vector aImageValues;
+
std::vector>> 
aAddonValues;
+};
+
+struct AddonsParams
+{
+OUString sImageId;
+OUString sControlType;
+sal_uInt16 nWidth;
+};
+
+struct AddonNotebookBarItem
+{
+OUString sCommandURL;
+OUString sLabel;
+OUString sImageIdentifier;
+OUString sTarget;
+OUString sContext;
+OUString sControlType;
+sal_uInt16 nWidth;
+OUString sStyle;
+};
+
+class NotebookBarAddonsMerger
+{
+public:
+NotebookBarAddonsMerger(vcl::Window* pParent,
+const css::uno::Reference& 
rFrame,
+const NotebookBarAddonsItem& 
aNotebookBarAddonsItem);
+static void MergeNotebookBarAddons(vcl::Window* pParent,
+   const 
css::uno::Reference& rFrame,
+   const NotebookBarAddonsItem& 
aNotebookBarAddonsItem);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 2fa8f445199f..adefc6d39713 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -67,18 +68,16 @@ public:
 typedef void (*customMakeWidget)(VclPtr , 
VclPtr , stringmap );
 
 public:
-VclBuilder(
-vcl::Window *pParent,
-const OUString& sUIRootDir,
-const OUString& sUIFile,
-const OString& sID = OString(),
-const css::uno::Reference  = 
css::uno::Reference(),
-bool bLegacy = true);
+VclBuilder(vcl::Window* pParent, const OUString& sUIRootDir, const 
OUString& sUIFile,
+   const OString& sID = OString(),
+   const css::uno::Reference& rFrame
+   = css::uno::Reference(),
+   bool bLegacy = true,
+   const NotebookBarAddonsItem& aNotebookBarAddonsItem = 
NotebookBarAddonsItem());
 ~VclBuilder();
-
 ///releases references and disposes all children.
 void disposeBuilder();
-
+NotebookBarAddonsItem m_pNotebookBarAddonsItem;
 //sID must exist and be of type T
 template  T* get(VclPtr& ret, 

[Libreoffice-commits] core.git: 2 commits - cppcanvas/source cppuhelper/source cui/source framework/source include/framework officecfg/registry

2019-07-19 Thread Sumit Chauhan (via logerrit)
 cppcanvas/source/wrapper/implbitmapcanvas.cxx  |3 
 cppcanvas/source/wrapper/implcustomsprite.cxx  |3 
 cppcanvas/source/wrapper/implspritecanvas.cxx  |3 
 cppcanvas/source/wrapper/vclfactory.cxx|4 
 cppuhelper/source/propshlp.cxx |2 
 cui/source/customize/CommandCategoryListBox.cxx|2 
 cui/source/customize/acccfg.cxx|   13 
 cui/source/customize/cfg.cxx   |   27 
 cui/source/customize/cfgutil.cxx   |2 
 cui/source/dialogs/SpellDialog.cxx |   10 
 cui/source/dialogs/hlmarkwn.cxx|5 
 cui/source/options/optdict.cxx |6 
 cui/source/options/optlingu.cxx|2 
 cui/source/options/treeopt.cxx |   18 
 cui/source/options/webconninfo.cxx |   10 
 framework/source/fwe/classes/addonsoptions.cxx |  352 -
 include/framework/addonsoptions.hxx|   47 +
 officecfg/registry/schema/org/openoffice/Office/Addons.xcs |  105 +++
 18 files changed, 546 insertions(+), 68 deletions(-)

New commits:
commit 147e820cc1bd7110331a6ea73db678a4a6c324e0
Author: Sumit Chauhan 
AuthorDate: Fri Jul 5 17:13:26 2019 +0530
Commit: Szymon Kłos 
CommitDate: Fri Jul 19 11:47:56 2019 +0200

Addons(extension) support is extended for NotebookBar

This patch adds the schema for the extensions to be available in 
Notebookbar.
We will adding items in addons.xcs in future if needed.

Change-Id: I0a3831983b9758fac0a6fa32213ad6da20d6a97f
Reviewed-on: https://gerrit.libreoffice.org/75134
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/framework/source/fwe/classes/addonsoptions.cxx 
b/framework/source/fwe/classes/addonsoptions.cxx
index 8bd00646294c..d0e5ece16c7f 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -75,7 +75,8 @@ using namespace ::com::sun::star;
 #define INDEX_AUTOSIZE  9
 #define INDEX_OWNERDRAW 10
 #define INDEX_MANDATORY 11
-#define PROPERTYCOUNT_INDEX 12
+#define INDEX_STYLE 12
+#define PROPERTYCOUNT_INDEX 13
 
 // The following order is mandatory. Please add properties at the end!
 #define PROPERTYCOUNT_MENUITEM  6
@@ -104,6 +105,17 @@ using namespace ::com::sun::star;
 #define OFFSET_TOOLBARITEM_WIDTH6
 
 // The following order is mandatory. Please add properties at the end!
+#define PROPERTYCOUNT_NOTEBOOKBARITEM   8
+#define OFFSET_NOTEBOOKBARITEM_URL  0
+#define OFFSET_NOTEBOOKBARITEM_TITLE1
+#define OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER  2
+#define OFFSET_NOTEBOOKBARITEM_TARGET   3
+#define OFFSET_NOTEBOOKBARITEM_CONTEXT  4
+#define OFFSET_NOTEBOOKBARITEM_CONTROLTYPE  5
+#define OFFSET_NOTEBOOKBARITEM_WIDTH6
+#define OFFSET_NOTEBOOKBARITEM_STYLE7
+
+// The following order is mandatory. Please add properties at the end!
 #define PROPERTYCOUNT_STATUSBARITEM 8
 #define OFFSET_STATUSBARITEM_URL0
 #define OFFSET_STATUSBARITEM_TITLE  1
@@ -143,6 +155,15 @@ using namespace ::com::sun::star;
 #define OFFSET_MERGETOOLBAR_MERGECONTEXT5
 #define OFFSET_MERGETOOLBAR_TOOLBARITEMS6
 
+#define PROPERTYCOUNT_MERGE_NOTEBOOKBAR 7
+#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBAR 0
+#define OFFSET_MERGENOTEBOOKBAR_MERGEPOINT  1
+#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMAND2
+#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMANDPARAMETER   3
+#define OFFSET_MERGENOTEBOOKBAR_MERGEFALLBACK   4
+#define OFFSET_MERGENOTEBOOKBAR_MERGECONTEXT5
+#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBARITEMS6
+
 #define PROPERTYCOUNT_MERGE_STATUSBAR   6
 #define OFFSET_MERGESTATUSBAR_MERGEPOINT0
 #define OFFSET_MERGESTATUSBAR_MERGECOMMAND  1
@@ -197,14 +218,18 @@ class AddonsOptions_Impl : public ConfigItem
 
 boolHasAddonsMenu
() const;
 sal_Int32   
GetAddonsToolBarCount() const;
+sal_Int32   
GetAddonsNotebookBarCount() const;
 const Sequence< Sequence< PropertyValue > >&GetAddonsMenu
() const { return m_aCachedMenuProperties;}
 const Sequence< Sequence< PropertyValue > >&GetAddonsMenuBarPart 
() const { return m_aCachedMenuBarPartProperties;}
 const Sequence< Sequence< PropertyValue > >&GetAddonsToolBarPart ( 

[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

[Libreoffice-commits] core.git: include/svx svx/source

2019-07-08 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 347afce3a997291313fd88843ba248ccbbcb3990
Author: Sumit Chauhan 
AuthorDate: Sat Feb 9 13:16:50 2019 +0530
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jul 8 11:49:00 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 

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 1614077bbb55..0f568600563d 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class XFillFloatTransparenceItem;
 class XFillTransparenceItem;
@@ -146,6 +147,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 93d2881820a8..6298b6f9d7f0 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -105,6 +105,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
 get(mpLbFillGradTo, "fillgrad2");
 get(mpGradientStyle, "gradientstyle");
 get(mpBmpImport, "bmpimport");
+mpPanel = dynamic_cast(pParent);
 
 Initialize();
 }
@@ -131,6 +132,7 @@ void AreaPropertyPanelBase::dispose()
 mpLbFillGradTo.clear();
 mpGradientStyle.clear();
 mpBmpImport.clear();
+mpPanel.clear();
 
 PanelLayout::dispose();
 }
@@ -441,6 +443,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, 
ListBox&, void)
 {
 mpLbFillType->Selected();
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillColorHdl, SvxColorListBox&, 
void)
@@ -603,6 +607,8 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl()
 break;
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::ImpUpdateTransparencies()
@@ -858,6 +864,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)
@@ -897,6 +905,8 @@ void AreaPropertyPanelBase::updateFillGradient(bool 
bDisabled, bool bDefaultOrSe
 mpLbFillGradTo->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool 
bDefaultOrSet, const SfxPoolItem* pState)
@@ -928,6 +938,8 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, 
bool bDefaultOrSet,
 mpLbFillAttr->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const 
SfxPoolItem* pState)
@@ -945,6 +957,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)
@@ -978,6 +992,8 @@ void AreaPropertyPanelBase::updateFillBitmap(bool 
bDisabled, bool bDefaultOrSet,
 mpLbFillAttr->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::NotifyItemUpdate(
@@ -1244,6 +1260,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
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: cui/source

2019-06-28 Thread Sumit Chauhan (via logerrit)
 cui/source/customize/SvxNotebookbarConfigPage.cxx |  268 --
 cui/source/inc/SvxNotebookbarConfigPage.hxx   |   20 +
 cui/source/inc/cfg.hxx|4 
 3 files changed, 221 insertions(+), 71 deletions(-)

New commits:
commit 9105b85c708f42024ce063b9a944466c0afdfe9a
Author: Sumit Chauhan 
AuthorDate: Fri Jun 28 14:17:58 2019 +0530
Commit: Szymon Kłos 
CommitDate: Fri Jun 28 21:15:00 2019 +0200

Category Target and Function Target enhanced in customization Tab

Better filters available in Category Target for selecting category .
We now have sfxlo-PriorityHBox , sfxlo-PriorityMergedHBox and
svtlo-ManagedMenuButton as category.Changes are also done in Function
Target, lists are now more generic.

Change-Id: Ia52890c09bb8083c2f907b5a9fe90eab4ec86aeb
Reviewed-on: https://gerrit.libreoffice.org/74836
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index c8ad0b8d3c18..1938e8a1835e 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -64,19 +64,26 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
-static bool isCategoryAvailable(OUString& sClassId, OUString& sUIItemID, 
OUString& sActiveCategory,
+namespace uno = com::sun::star::uno;
+namespace frame = com::sun::star::frame;
+namespace lang = com::sun::star::lang;
+namespace container = com::sun::star::container;
+namespace beans = com::sun::star::beans;
+namespace graphic = com::sun::star::graphic;
+
+static bool isCategoryAvailable(OUString& sClassId, OUString& sUIItemId, 
OUString& sActiveCategory,
 bool& isCategory)
 {
-if (sClassId == "GtkMenu" && sUIItemID != sActiveCategory)
+if (sUIItemId == sActiveCategory)
+return true;
+else if ((sClassId == "GtkMenu" || sClassId == "GtkGrid") && sUIItemId != 
sActiveCategory)
 {
 isCategory = false;
 return false;
 }
-else if (sActiveCategory == "All Commands")
-return true;
-else if (sUIItemID == sActiveCategory)
-return true;
 return false;
 }
 
@@ -104,6 +111,20 @@ static OUString getFileName(const OUString& aFileName)
 return "None";
 }
 
+static OUString getModuleId(const OUString& sModuleName)
+{
+if (sModuleName == "Writer")
+return OUString("com.sun.star.text.TextDocument");
+else if (sModuleName == "Draw")
+return OUString("com.sun.star.drawing.DrawingDocument");
+else if (sModuleName == "Impress")
+return OUString("com.sun.star.presentation.PresentationDocument");
+else if (sModuleName == "Calc")
+return OUString("com.sun.star.sheet.SpreadsheetDocument");
+else
+return OUString("None");
+}
+
 SvxNotebookbarConfigPage::SvxNotebookbarConfigPage(TabPageParent pParent, 
const SfxItemSet& rSet)
 : SvxConfigPage(pParent, rSet)
 {
@@ -180,8 +201,8 @@ void SvxNotebookbarConfigPage::Init()
 m_xSaveInListBox->append(sSaveInListBoxID, sScopeName);
 m_xSaveInListBox->set_active_id(sSaveInListBoxID);
 
-m_xTopLevelListBox->append("All Commands", "All Commands");
-m_xTopLevelListBox->set_active_id("All Commands");
+m_xTopLevelListBox->append("NotebookBar", "All Commands");
+m_xTopLevelListBox->set_active_id("NotebookBar");
 SelectElement();
 }
 
@@ -223,18 +244,69 @@ short SvxNotebookbarConfigPage::QueryReset()
 return nValue;
 }
 
-void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(OUString& sUIItemID, 
OUString& sUIItemCommand,
-int nPos, int nStartCol, 
int nSpace)
+void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(OUString& sClassId, 
OUString& sUIItemId,
+OUString& sUIItemCommand, 
int nPos,
+int nStartCol)
 {
-auto xImage = GetSaveInData()->GetImage(sUIItemCommand);
-if (xImage.is())
-m_xContentsListBox->set_image(nPos, xImage, nStartCol);
-OUStringBuffer sDataInTree;
-for (int nIdx = 0; nIdx < nSpace; nIdx++)
-sDataInTree.append("");
-sDataInTree.append("-> ");
-sDataInTree.append(sUIItemID);
-m_xContentsListBox->set_text(nPos, sDataInTree.makeStringAndClear(), 
nStartCol + 1);
+OUString sAppName, sFileName;
+CustomNotebookbarGenerator::getFileNameAndAppName(sAppName, sFileName);
+
+css::uno::Reference m_xCommandToLabelMap,
+m_xGlobalCommandToLabelMap;
+uno::Reference xContext = 
::comphelper::getProcessComponentContext();
+uno::Reference xNameAccess(
+css::frame::theUICommandDescription::get(xContext));
+
+uno::Sequence aPropSeq, aGlobalPropSeq;
+
+xNameAccess->getByName("com.sun.star.text.GlobalDocument") >>= 
m_xGlobalCommandToLabelMap;
+

[Libreoffice-commits] core.git: cui/source sfx2/source

2019-06-24 Thread Sumit Chauhan (via logerrit)
 cui/source/customize/CustomNotebookbarGenerator.cxx |   17 
 cui/source/customize/SvxNotebookbarConfigPage.cxx   |   84 ++--
 cui/source/inc/SvxNotebookbarConfigPage.hxx |9 +-
 sfx2/source/notebookbar/SfxNotebookBar.cxx  |3 
 4 files changed, 70 insertions(+), 43 deletions(-)

New commits:
commit 7eab1e14c5874901757a291609f289911ac64031
Author: Sumit Chauhan 
AuthorDate: Sun Jun 23 21:49:12 2019 +0530
Commit: Szymon Kłos 
CommitDate: Mon Jun 24 16:18:45 2019 +0200

Category Target, now available for customization tab

The patch activates the category target i.e one can filter the widgets
on the basis of categories.
The patch also solves
-> GtkMenuToolButton is added in treeview(customization dialog)
-> Code refractor suggested by mike

Change-Id: I0c9f80300cc1202f19e90abe42fb5c5f7ca53915
Reviewed-on: https://gerrit.libreoffice.org/74609
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx 
b/cui/source/customize/CustomNotebookbarGenerator.cxx
index 1d5a2eb83ba7..ceb5bd30fa64 100644
--- a/cui/source/customize/CustomNotebookbarGenerator.cxx
+++ b/cui/source/customize/CustomNotebookbarGenerator.cxx
@@ -105,27 +105,18 @@ static OUString customizedUIPathBuffer()
 
 OUString CustomNotebookbarGenerator::getCustomizedUIPath()
 {
-OUStringBuffer aCustomizedUIPathBuffer;
-aCustomizedUIPathBuffer.append(customizedUIPathBuffer());
 OUString sAppName, sNotebookbarUIFileName;
 CustomNotebookbarGenerator::getFileNameAndAppName(sAppName, 
sNotebookbarUIFileName);
-OUString sUIFilePath
-= "modules/s" + sAppName.toAsciiLowerCase() + "/ui/" + 
sNotebookbarUIFileName;
-aCustomizedUIPathBuffer.append(sUIFilePath);
-OUString sCustomizedUIPath = aCustomizedUIPathBuffer.makeStringAndClear();
-return sCustomizedUIPath;
+return customizedUIPathBuffer() + "modules/s" + 
sAppName.toAsciiLowerCase() + "/ui/"
+   + sNotebookbarUIFileName;
 }
 
 OUString CustomNotebookbarGenerator::getOriginalUIPath()
 {
-OUStringBuffer aOriginalUIPathBuffer = VclBuilderContainer::getUIRootDir();
 OUString sAppName, sNotebookbarUIFileName;
 CustomNotebookbarGenerator::getFileNameAndAppName(sAppName, 
sNotebookbarUIFileName);
-OUString sUIFilePath
-= "modules/s" + sAppName.toAsciiLowerCase() + "/ui/" + 
sNotebookbarUIFileName;
-aOriginalUIPathBuffer.append(sUIFilePath);
-OUString sOriginalUIPath = aOriginalUIPathBuffer.makeStringAndClear();
-return sOriginalUIPath;
+return VclBuilderContainer::getUIRootDir() + "modules/s" + 
sAppName.toAsciiLowerCase() + "/ui/"
+   + sNotebookbarUIFileName;
 }
 
 static OUString getUIDirPath()
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index 181e1b3d0ee3..c8ad0b8d3c18 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -65,7 +65,20 @@
 #include 
 #include 
 
-#define sTopLevelListBoxID "sTopLevelListBoxID"
+static bool isCategoryAvailable(OUString& sClassId, OUString& sUIItemID, 
OUString& sActiveCategory,
+bool& isCategory)
+{
+if (sClassId == "GtkMenu" && sUIItemID != sActiveCategory)
+{
+isCategory = false;
+return false;
+}
+else if (sActiveCategory == "All Commands")
+return true;
+else if (sUIItemID == sActiveCategory)
+return true;
+return false;
+}
 
 static OUString charToString(const char* cString)
 {
@@ -156,8 +169,7 @@ void SvxNotebookbarConfigPage::Init()
 m_xContentsListBox->clear();
 m_xSaveInListBox->clear();
 CustomNotebookbarGenerator::createCustomizedUIFile();
-OUString sAppName;
-OUString sFileName;
+OUString sAppName, sFileName;
 CustomNotebookbarGenerator::getFileNameAndAppName(sAppName, sFileName);
 OUString sNotebookbarInterface = getFileName(sFileName);
 
@@ -168,8 +180,8 @@ void SvxNotebookbarConfigPage::Init()
 m_xSaveInListBox->append(sSaveInListBoxID, sScopeName);
 m_xSaveInListBox->set_active_id(sSaveInListBoxID);
 
-m_xTopLevelListBox->append(sTopLevelListBoxID, "All Commands");
-m_xTopLevelListBox->set_active_id(sTopLevelListBoxID);
+m_xTopLevelListBox->append("All Commands", "All Commands");
+m_xTopLevelListBox->set_active_id("All Commands");
 SelectElement();
 }
 
@@ -200,8 +212,7 @@ short SvxNotebookbarConfigPage::QueryReset()
 OUString sOriginalUIPath = 
CustomNotebookbarGenerator::getOriginalUIPath();
 OUString sCustomizedUIPath = 
CustomNotebookbarGenerator::getCustomizedUIPath();
 osl::File::copy(sOriginalUIPath, sCustomizedUIPath);
-OUString sAppName;
-OUString sFileName;
+OUString sAppName, sFileName;
 CustomNotebookbarGenerator::getFileNameAndAppName(sAppName, sFileName);
 

[Libreoffice-commits] core.git: vcl/source

2019-06-21 Thread Sumit Chauhan (via logerrit)
 vcl/source/control/notebookbar.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f6d09d0abe75f1ea7cc1b874c42bed843875d113
Author: Sumit Chauhan 
AuthorDate: Wed Jun 19 20:44:30 2019 +0530
Commit: Szymon Kłos 
CommitDate: Fri Jun 21 13:56:20 2019 +0200

User directory path changed

The old path was not rendering file from user directory in production
build

Change-Id: Id1529b94d5f8c35988ae4b8d9aba6e7bdcce7fb2
Reviewed-on: https://gerrit.libreoffice.org/74364
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/vcl/source/control/notebookbar.cxx 
b/vcl/source/control/notebookbar.cxx
index 7a3a70370497..8682e7f743ba 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -17,12 +17,14 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
 static OUString getCustomizedUIRootDir()
 {
-OUString sShareLayer("$BRAND_BASE_DIR/user/config/soffice.cfg/");
+OUString sShareLayer("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE(
+"bootstrap") ":UserInstallation}/user/config/soffice.cfg/");
 rtl::Bootstrap::expandMacros(sShareLayer);
 return sShareLayer;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: cui/source

2019-06-18 Thread Sumit Chauhan (via logerrit)
 cui/source/customize/CustomNotebookbarGenerator.cxx |4 ++-
 cui/source/customize/SvxNotebookbarConfigPage.cxx   |   25 
 2 files changed, 13 insertions(+), 16 deletions(-)

New commits:
commit 7d9ff70206dbd75a7751515b642fbbbc8878c159
Author: Sumit Chauhan 
AuthorDate: Mon Jun 17 21:54:27 2019 +0530
Commit: Szymon Kłos 
CommitDate: Tue Jun 18 11:22:22 2019 +0200

User directory path changed

The old path was not rendering file from user directory in production
build

Change-Id: I58e84156f8c93933d59b1ab9d50e3b24becdf3cd
Reviewed-on: https://gerrit.libreoffice.org/74181
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx 
b/cui/source/customize/CustomNotebookbarGenerator.cxx
index a1aa63bca568..1d5a2eb83ba7 100644
--- a/cui/source/customize/CustomNotebookbarGenerator.cxx
+++ b/cui/source/customize/CustomNotebookbarGenerator.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -96,7 +97,8 @@ static OUString getAppNameRegistryPath()
 
 static OUString customizedUIPathBuffer()
 {
-OUString sDirPath("$BRAND_BASE_DIR/user/config/soffice.cfg/");
+OUString sDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE(
+"bootstrap") ":UserInstallation}/user/config/soffice.cfg/");
 rtl::Bootstrap::expandMacros(sDirPath);
 return sDirPath;
 }
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index f32ad2c472a0..181e1b3d0ee3 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -304,24 +304,19 @@ void 
SvxNotebookbarConfigPage::searchNodeandAttribute(std::vector& 
aEntries)
 {
+xmlDocPtr pDoc;
+xmlNodePtr pNodePtr;
 OUString sUIFilePath = CustomNotebookbarGenerator::getCustomizedUIPath();
-sal_uInt32 nflag = osl_File_OpenFlag_Read | osl_File_OpenFlag_Write;
-osl::File aFile(sUIFilePath);
-if (aFile.open(nflag) == osl::FileBase::E_None)
+char* cUIFileUIPath = 
CustomNotebookbarGenerator::convertToCharPointer(sUIFilePath);
+pDoc = xmlParseFile(cUIFileUIPath);
+pNodePtr = xmlDocGetRootElement(pDoc);
+int aRightPos = 0;
+searchNodeandAttribute(aEntries, pNodePtr, aRightPos);
+if (pDoc != nullptr)
 {
-xmlDocPtr pDoc;
-xmlNodePtr pNodePtr;
-char* cUIFileUIPath = 
CustomNotebookbarGenerator::convertToCharPointer(sUIFilePath);
-pDoc = xmlParseFile(cUIFileUIPath);
-pNodePtr = xmlDocGetRootElement(pDoc);
-int aRightPos = 0;
-searchNodeandAttribute(aEntries, pNodePtr, aRightPos);
-if (pDoc != nullptr)
-{
-xmlFreeDoc(pDoc);
-}
-delete[] cUIFileUIPath;
+xmlFreeDoc(pDoc);
 }
+delete[] cUIFileUIPath;
 }
 
 void SvxNotebookbarConfigPage::SelectElement()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: cui/source include/sfx2 include/vcl sfx2/source vcl/source

2019-06-16 Thread Sumit Chauhan (via logerrit)
 cui/source/customize/SvxNotebookbarConfigPage.cxx |   17 +-
 include/sfx2/notebookbar/SfxNotebookBar.hxx   |8 --
 include/vcl/syswin.hxx|5 +++-
 sfx2/source/notebookbar/SfxNotebookBar.cxx|   26 --
 vcl/source/window/syswin.cxx  |6 +++--
 5 files changed, 44 insertions(+), 18 deletions(-)

New commits:
commit 6b888ac476fe6ac2ee96c7086cb8c24249f08473
Author: Sumit Chauhan 
AuthorDate: Mon Jun 10 15:47:55 2019 +0530
Commit: Szymon Kłos 
CommitDate: Sun Jun 16 22:14:10 2019 +0200

Reload Notebookbar, when customization is being done.

This patch is related to notebookbar customization tab. When one clicks
the widget checkbox , to preview the real-time changes one need to call
this ReloadNotebookBar() method .

Change-Id: I3d6314e4b8220a8744331246639acadea941252f
Reviewed-on: https://gerrit.libreoffice.org/73750
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index d2ef34807920..f32ad2c472a0 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -206,6 +206,8 @@ short SvxNotebookbarConfigPage::QueryReset()
 OUString sNotebookbarInterface = getFileName(sFileName);
 Sequence sSequenceEntries;
 CustomNotebookbarGenerator::setCustomizedUIItem(sSequenceEntries, 
sNotebookbarInterface);
+OUString sUIPath = "modules/s" + sAppName.toAsciiLowerCase() + "/ui/";
+sfx2::SfxNotebookBar::ReloadNotebookBar(sUIPath);
 }
 return nValue;
 }
@@ -374,13 +376,10 @@ static OUString getUIItemID(OUString sString)
 return sUIItemID.makeStringAndClear();
 }
 
-static void EditRegistryFile(OUString& sUIItemID, OUString& sSetEntry)
+static void EditRegistryFile(OUString& sUIItemID, OUString& sSetEntry,
+ OUString& sNotebookbarInterface)
 {
 int nFlag = 0;
-OUString sAppName;
-OUString sFileName;
-CustomNotebookbarGenerator::getFileNameAndAppName(sAppName, sFileName);
-OUString sNotebookbarInterface = getFileName(sFileName);
 Sequence aOldEntries
 = 
CustomNotebookbarGenerator::getCustomizedUIItem(sNotebookbarInterface);
 Sequence aNewEntries(aOldEntries.getLength() + 1);
@@ -411,6 +410,10 @@ static void EditRegistryFile(OUString& sUIItemID, 
OUString& sSetEntry)
 void SvxNotebookbarEntriesListBox::ChangedVisibility(int nRow)
 {
 OUString sUIItemID = m_xControl->get_selected_text();
+OUString sAppName;
+OUString sFileName;
+CustomNotebookbarGenerator::getFileNameAndAppName(sAppName, sFileName);
+OUString sNotebookbarInterface = getFileName(sFileName);
 OUString sVisible;
 sUIItemID = getUIItemID(sUIItemID);
 if (m_xControl->get_toggle(nRow, 0) == TRISTATE_TRUE)
@@ -420,8 +423,10 @@ void SvxNotebookbarEntriesListBox::ChangedVisibility(int 
nRow)
 OUString sSetEntries = sUIItemID + ",visible," + sVisible;
 Sequence sSeqOfEntries(1);
 sSeqOfEntries[0] = sSetEntries;
-EditRegistryFile(sUIItemID, sSetEntries);
+EditRegistryFile(sUIItemID, sSetEntries, sNotebookbarInterface);
 CustomNotebookbarGenerator::modifyCustomizedUIFile(sSeqOfEntries);
+OUString sUIPath = "modules/s" + sAppName.toAsciiLowerCase() + "/ui/";
+sfx2::SfxNotebookBar::ReloadNotebookBar(sUIPath);
 }
 
 IMPL_LINK(SvxNotebookbarEntriesListBox, CheckButtonHdl, const row_col&, 
rRowCol, void)
diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx 
b/include/sfx2/notebookbar/SfxNotebookBar.hxx
index 9eb76e9c3ba5..2a30a126beaf 100644
--- a/include/sfx2/notebookbar/SfxNotebookBar.hxx
+++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx
@@ -36,10 +36,11 @@ public:
 static void ExecMethod(SfxBindings& rBindings, const OUString& rUIName);
 
 /// Function to be called from the sdi's StateMethod.
-static bool StateMethod(SfxBindings& rBindings, const OUString& rUIFile);
+static bool StateMethod(SfxBindings& rBindings, const OUString& rUIFile,
+bool bReloadNotebookbar = false);
 static bool StateMethod(SystemWindow* pSysWindow,
-const css::uno::Reference & 
xFrame,
-const OUString& rUIFile);
+const css::uno::Reference& 
xFrame,
+const OUString& rUIFile, bool bReloadNotebookbar = 
false);
 
 /// Method temporarily blocks showing of the NotebookBar
 static void LockNotebookBar();
@@ -53,6 +54,7 @@ public:
 /** Show menu bar only in current frame */
 static void ShowMenubar(SfxViewFrame const * pViewFrame, bool bShow);
 static void ToggleMenubar();
+static void ReloadNotebookBar(OUString& sUIPath);
 
 private:
 static bool m_bLock;
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig

2019-06-14 Thread Sumit Chauhan (via logerrit)
 cui/Library_cui.mk  |1 
 cui/source/customize/CustomNotebookbarGenerator.cxx |2 
 cui/source/customize/SvxNotebookbarConfigPage.cxx   |  446 
 cui/source/customize/cfg.cxx|   39 +
 cui/source/inc/CustomNotebookbarGenerator.hxx   |1 
 cui/source/inc/SvxNotebookbarConfigPage.hxx |   85 +++
 cui/source/inc/cfg.hxx  |   12 
 cui/source/inc/helpids.h|1 
 cui/uiconfig/ui/customizedialog.ui  |   59 ++
 9 files changed, 630 insertions(+), 16 deletions(-)

New commits:
commit 015dc88a595c1c92d2b724cd868aecb07199f995
Author: Sumit Chauhan 
AuthorDate: Fri May 31 14:59:54 2019 +0530
Commit: Szymon Kłos 
CommitDate: Fri Jun 14 15:17:33 2019 +0200

UI for the Notebookbar Customization tab

This patch generates the UI for the notebookbar customization tab.
Patch is working and one can show/hide the UIItem by clicking on the
checkbox.

Change-Id: I4923c57e6443474f178a72922646619f07b5ffc1
Reviewed-on: https://gerrit.libreoffice.org/73261
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
Tested-by: Szymon Kłos 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 4cf00159dcad..b02520529fab 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -97,6 +97,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/SvxConfigPageHelper \
 cui/source/customize/SvxMenuConfigPage \
 cui/source/customize/SvxToolbarConfigPage \
+cui/source/customize/SvxNotebookbarConfigPage \
 cui/source/customize/CustomNotebookbarGenerator \
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx 
b/cui/source/customize/CustomNotebookbarGenerator.cxx
index 925f43dd0add..40fbe9012183 100644
--- a/cui/source/customize/CustomNotebookbarGenerator.cxx
+++ b/cui/source/customize/CustomNotebookbarGenerator.cxx
@@ -114,7 +114,7 @@ OUString CustomNotebookbarGenerator::getCustomizedUIPath()
 return sCustomizedUIPath;
 }
 
-static OUString getOriginalUIPath()
+OUString CustomNotebookbarGenerator::getOriginalUIPath()
 {
 OUStringBuffer aOriginalUIPathBuffer = VclBuilderContainer::getUIRootDir();
 OUString sAppName, sNotebookbarUIFileName;
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx 
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
new file mode 100644
index ..d2ef34807920
--- /dev/null
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -0,0 +1,446 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define sTopLevelListBoxID "sTopLevelListBoxID"
+
+static OUString charToString(const char* cString)
+{
+OUStringBuffer aString;
+for (unsigned long i = 0; i < strlen(cString); i++)
+{
+aString.append(cString[i]);
+}
+return aString.makeStringAndClear();
+}
+
+static OUString getFileName(const OUString& aFileName)
+{
+if (aFileName == "notebookbar.ui")
+return "Tabbed";
+else if (aFileName == "notebookbar_compact.ui")
+return "TabbedCompact";
+else if (aFileName == "notebookbar_groupedbar_full.ui")
+return "Groupedbar";
+else if (aFileName == "notebookbar_groupedbar_compact.ui")
+return "GroupedbarCompact";
+else
+return "None";
+}
+
+SvxNotebookbarConfigPage::SvxNotebookbarConfigPage(TabPageParent pParent, 
const SfxItemSet& rSet)
+: SvxConfigPage(pParent, rSet)
+{
+m_xDescriptionFieldLb->set_visible(false);
+m_xSearchEdit->set_visible(false);
+   

[Libreoffice-commits] core.git: include/vcl vcl/source

2019-06-14 Thread Sumit Chauhan (via logerrit)
 include/vcl/notebookbar.hxx|5 -
 vcl/source/control/notebookbar.cxx |   31 +--
 2 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit e598440a946ba3e7785b81f57a36673f7b88db2e
Author: Sumit Chauhan 
AuthorDate: Fri Jun 14 02:30:48 2019 +0530
Commit: Stephan Bergmann 
CommitDate: Fri Jun 14 08:20:43 2019 +0200

Refactoring - Converting private methods to static non-member methods

Related Patch: https://gerrit.libreoffice.org/#/c/72313/

Change-Id: I3f30b4abe87f16e94d7c29bf9b9413b59b825e5e
Reviewed-on: https://gerrit.libreoffice.org/73986
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/vcl/notebookbar.hxx b/include/vcl/notebookbar.hxx
index 5ca3798587c4..e7ed5c79dc44 100644
--- a/include/vcl/notebookbar.hxx
+++ b/include/vcl/notebookbar.hxx
@@ -13,7 +13,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 namespace com { namespace sun { namespace star { namespace ui { class 
XContextChangeEventListener; } } } }
@@ -58,12 +57,8 @@ private:
 
 void UpdateDefaultSettings();
 void UpdatePersonaSettings();
-static OUString getCustomizedUIRootDir();
-static bool doesFileExist(const OUString& sUIDir, const OUString& sUIFile);
-
 };
 
-
 #endif // INCLUDED_VCL_NOTEBOOKBAR_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/notebookbar.cxx 
b/vcl/source/control/notebookbar.cxx
index 1865af605799..7a3a70370497 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -16,8 +16,25 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+
+static OUString getCustomizedUIRootDir()
+{
+OUString sShareLayer("$BRAND_BASE_DIR/user/config/soffice.cfg/");
+rtl::Bootstrap::expandMacros(sShareLayer);
+return sShareLayer;
+}
+
+static bool doesFileExist(const OUString& sUIDir, const OUString& sUIFile)
+{
+OUString sUri = sUIDir + sUIFile;
+osl::File file(sUri);
+sal_uInt32 flag = 0;
+return( file.open(flag) == osl::FileBase::E_None );
+}
+
 /**
  * split from the main class since it needs different ref-counting mana
  */
@@ -257,18 +274,4 @@ void NotebookBar::UpdatePersonaSettings()
 PersonaSettings = aAllSettings;
 }
 
-OUString NotebookBar::getCustomizedUIRootDir()
-{
-OUString sShareLayer("$BRAND_BASE_DIR/user/config/soffice.cfg/");
-rtl::Bootstrap::expandMacros(sShareLayer);
-return sShareLayer;
-}
-
-bool NotebookBar::doesFileExist(const OUString& sUIDir, const OUString& 
sUIFile)
-{
-OUString sUri = sUIDir + sUIFile;
-osl::File file(sUri);
-sal_uInt32 flag = 0;
-return( file.open(flag) == osl::FileBase::E_None );
-}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: officecfg/registry

2019-06-13 Thread Sumit Chauhan (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu |   56 
+-
 1 file changed, 28 insertions(+), 28 deletions(-)

New commits:
commit ee4823e16e5fece068ee123b9c3e29834cd38763
Author: Sumit Chauhan 
AuthorDate: Wed Jun 12 20:29:14 2019 +0530
Commit: Stephan Bergmann 
CommitDate: Thu Jun 13 08:20:41 2019 +0200

Item syntax changed to explicit - Custom Notebookbar Tab

Related Patch : https://gerrit.libreoffice.org/#/c/72698/

Change-Id: I87984289ab180d10cecf382320b391192f6ca71e
Reviewed-on: https://gerrit.libreoffice.org/73890
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu
index 98f3cafc33ae..332c9b5d9085 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu
@@ -179,8 +179,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -212,8 +212,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -245,8 +245,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -281,8 +281,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -431,8 +431,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -464,8 +464,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -497,8 +497,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -530,8 +530,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -655,8 +655,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -688,8 +688,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -721,8 +721,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -790,8 +790,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -854,8 +854,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
@@ -890,8 +890,8 @@
 
   
   
-
- UIItemID , propertyName , propertyValue;
+
+  UIItemID,propertyName,propertyValue
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source include/sal officecfg/registry

2019-06-10 Thread Sumit Chauhan (via logerrit)
 cui/Library_cui.mk |2 
 cui/source/customize/CustomNotebookbarGenerator.cxx|  299 
++
 cui/source/inc/CustomNotebookbarGenerator.hxx  |   43 +
 include/sal/log-areas.dox  |1 
 officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu   |   70 ++
 officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs |   11 
 6 files changed, 426 insertions(+)

New commits:
commit c473c5b462f33df439b4b62b394c5d7811a05c7c
Author: Sumit Chauhan 
AuthorDate: Wed May 22 01:19:21 2019 +0530
Commit: Szymon Kłos 
CommitDate: Mon Jun 10 19:18:22 2019 +0200

Using registrymodifications.xcu for storing customized uiitem data

This patch store and render the GtkToolButton/GtkMenuButton of
notebookbar*.ui show/hide property in registrymodifications.xcu.
The patch also gives a solution to copy the notebookbar*.ui
file in user directory from share directory provided file is absent
in user directory.The patch also uses libxml2 library and write i.e
change the property of uiitem(GtkToolButton/GtkMenuButton) in
notebookbar*.ui files present in user directory.

Change-Id: I518f37fc858250a04fafd2a4475e3ed03185f6ff
Reviewed-on: https://gerrit.libreoffice.org/72698
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 2d46420c4b1a..4cf00159dcad 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_Library_use_externals,cui,\
curl) \
 icuuc \
 icu_headers \
+libxml2 \
 orcus-parser \
 orcus \
 ))
@@ -96,6 +97,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/SvxConfigPageHelper \
 cui/source/customize/SvxMenuConfigPage \
 cui/source/customize/SvxToolbarConfigPage \
+cui/source/customize/CustomNotebookbarGenerator \
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
 cui/source/dialogs/cuicharmap \
diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx 
b/cui/source/customize/CustomNotebookbarGenerator.cxx
new file mode 100644
index ..925f43dd0add
--- /dev/null
+++ b/cui/source/customize/CustomNotebookbarGenerator.cxx
@@ -0,0 +1,299 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define aUIItemIDLength 255
+#define aUIPropertiesCount 3
+
+using namespace css;
+
+CustomNotebookbarGenerator::CustomNotebookbarGenerator() {}
+
+static OUString lcl_activeAppName(vcl::EnumContext::Application eApp)
+{
+switch (eApp)
+{
+case vcl::EnumContext::Application::Writer:
+return OUString("ActiveWriter");
+break;
+case vcl::EnumContext::Application::Calc:
+return OUString("ActiveCalc");
+break;
+case vcl::EnumContext::Application::Impress:
+return OUString("ActiveImpress");
+break;
+case vcl::EnumContext::Application::Draw:
+return OUString("ActiveDraw");
+break;
+default:
+return OUString();
+break;
+}
+}
+
+static OUString lcl_getAppName(vcl::EnumContext::Application eApp)
+{
+switch (eApp)
+{
+case vcl::EnumContext::Application::Writer:
+return OUString("Writer");
+break;
+case vcl::EnumContext::Application::Calc:
+return OUString("Calc");
+break;
+case vcl::EnumContext::Application::Impress:
+return OUString("Impress");
+break;
+case vcl::EnumContext::Application::Draw:
+return OUString("Draw");
+break;
+default:
+return OUString();
+break;
+}
+}
+
+static OUString getAppNameRegistryPath()
+{
+vcl::EnumContext::Application eApp = vcl::EnumContext::Application::Any;
+const Reference& xFrame
+   

[Libreoffice-commits] core.git: include/vcl vcl/source

2019-06-04 Thread Sumit Chauhan (via logerrit)
 include/vcl/notebookbar.hxx|3 +++
 vcl/source/control/notebookbar.cxx |   24 ++--
 2 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit 889a4fed08aecfd45e5706af27510e40932f2732
Author: Sumit Chauhan 
AuthorDate: Wed May 15 00:57:09 2019 +0530
Commit: Szymon Kłos 
CommitDate: Tue Jun 4 09:48:41 2019 +0200

Rendering notebookbar*.ui file from user/share directory

This patch will get the modified customized notebookbar*.ui
files from user directory(if present) otherwise the files will be rendered
from default shared directory.

Change-Id: I9393083bc0429659039c8dd5c10541ffa6661bf7
Reviewed-on: https://gerrit.libreoffice.org/72313
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/include/vcl/notebookbar.hxx b/include/vcl/notebookbar.hxx
index b2e9b8cf9f28..5ca3798587c4 100644
--- a/include/vcl/notebookbar.hxx
+++ b/include/vcl/notebookbar.hxx
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 namespace com { namespace sun { namespace star { namespace ui { class 
XContextChangeEventListener; } } } }
@@ -57,6 +58,8 @@ private:
 
 void UpdateDefaultSettings();
 void UpdatePersonaSettings();
+static OUString getCustomizedUIRootDir();
+static bool doesFileExist(const OUString& sUIDir, const OUString& sUIFile);
 
 };
 
diff --git a/vcl/source/control/notebookbar.cxx 
b/vcl/source/control/notebookbar.cxx
index e55ea57547c3..1865af605799 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 /**
@@ -38,7 +39,11 @@ NotebookBar::NotebookBar(Window* pParent, const OString& 
rID, const OUString& rU
 : Control(pParent), m_pEventListener(new 
NotebookBarContextChangeEventListener(this))
 {
 SetStyle(GetStyle() | WB_DIALOGCONTROL);
-m_pUIBuilder.reset( new VclBuilder(this, getUIRootDir(), 
rUIXMLDescription, rID, rFrame) );
+OUString sUIDir = getUIRootDir();
+bool doesCustomizedUIExist = doesFileExist(getCustomizedUIRootDir(), 
rUIXMLDescription);
+if ( doesCustomizedUIExist )
+sUIDir = getCustomizedUIRootDir();
+m_pUIBuilder.reset( new VclBuilder(this, sUIDir, rUIXMLDescription, rID, 
rFrame));
 mxFrame = rFrame;
 // In the Notebookbar's .ui file must exist control handling context
 // - implementing NotebookbarContextControl interface with id 
"ContextContainer"
@@ -251,4 +256,19 @@ void NotebookBar::UpdatePersonaSettings()
 aAllSettings.SetStyleSettings(aStyleSet);
 PersonaSettings = aAllSettings;
 }
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
+OUString NotebookBar::getCustomizedUIRootDir()
+{
+OUString sShareLayer("$BRAND_BASE_DIR/user/config/soffice.cfg/");
+rtl::Bootstrap::expandMacros(sShareLayer);
+return sShareLayer;
+}
+
+bool NotebookBar::doesFileExist(const OUString& sUIDir, const OUString& 
sUIFile)
+{
+OUString sUri = sUIDir + sUIFile;
+osl::File file(sUri);
+sal_uInt32 flag = 0;
+return( file.open(flag) == osl::FileBase::E_None );
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sfx2/inc sfx2/source

2019-05-10 Thread Sumit Chauhan (via logerrit)
 sfx2/inc/bitmaps.hlst  |1 +
 sfx2/source/notebookbar/PriorityMergedHBox.cxx |5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 96dd1cd36c2f9446d3455a06b5f77a3954950c03
Author: Sumit Chauhan 
AuthorDate: Fri May 10 14:08:10 2019 +0530
Commit: Szymon Kłos 
CommitDate: Fri May 10 12:06:09 2019 +0200

tdf#116629 added chevron icon for noteboookbar hide button

To test the patch , cherry pick this icon-patch first
https://gerrit.libreoffice.org/#/c/72082/

Change-Id: I706aee5695a2e275095832070382a9def4d89611
Reviewed-on: https://gerrit.libreoffice.org/72107
Reviewed-by: Szymon Kłos 
Tested-by: Szymon Kłos 

diff --git a/sfx2/inc/bitmaps.hlst b/sfx2/inc/bitmaps.hlst
index c420ba89bd78..654a41df125c 100644
--- a/sfx2/inc/bitmaps.hlst
+++ b/sfx2/inc/bitmaps.hlst
@@ -32,6 +32,7 @@
 #define BMP_HELP_TOOLBOX_L_SEARCHDIALOG "res/lc05961.png"
 
 //start, sfx2/source/sidebar/Theme.cxx
+#define CHEVRON "sfx2/res/chevron.png"
 #define CLOSEDOC"sfx2/res/closedoc.png"
 #define GRIP"sfx2/res/grip.png"
 #define OPEN_MORE   "sfx2/res/symphony/open_more.png"
diff --git a/sfx2/source/notebookbar/PriorityMergedHBox.cxx 
b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
index e52c467b6c23..4e7fa0c16d2a 100644
--- a/sfx2/source/notebookbar/PriorityMergedHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "OptionalBox.hxx"
 #include "PriorityHBox.hxx"
 #include "NotebookbarPopup.hxx"
@@ -43,8 +44,8 @@ public:
 {
 m_pButton = VclPtr::Create(this, WB_FLATBUTTON);
 m_pButton->SetClickHdl(LINK(this, PriorityMergedHBox, PBClickHdl));
-m_pButton->SetSymbol(SymbolType::NEXT);
-m_pButton->set_width_request(15);
+m_pButton->SetModeImage(Image(StockImage::Yes, CHEVRON));
+m_pButton->set_width_request(25);
 m_pButton->set_pack_type(VclPackType::End);
 m_pButton->Show();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits