[Libreoffice-commits] core.git: include/sfx2 sfx2/source sfx2/uiconfig solenv/sanitizers

2023-11-15 Thread Sarper Akdemir (via logerrit)
 include/sfx2/passwd.hxx|3 ++
 sfx2/source/dialog/passwd.cxx  |   45 
 sfx2/uiconfig/ui/password.ui   |   56 -
 solenv/sanitizers/ui/sfx.suppr |4 ++
 4 files changed, 96 insertions(+), 12 deletions(-)

New commits:
commit ed72c6fbfa02cf98cb0d0f761ef5a7b9ffb894bc
Author: Sarper Akdemir 
AuthorDate: Wed Nov 15 14:54:42 2023 +0300
Commit: Sarper Akdemir 
CommitDate: Wed Nov 15 23:05:49 2023 +0100

tdf#157518: enforce password policy on sfx2/ui/password.ui

Change-Id: I115b5b05ed82f2f900bcd70ec4f52c7f749544e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159443
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir 

diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index bc5e478bbf03..3ddffed196d0 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -51,6 +51,7 @@ private:
 std::unique_ptr m_xPassword1FT;
 std::unique_ptr m_xPassword1ED;
 std::unique_ptr m_xPassword1StrengthBar;
+std::unique_ptr m_xPassword1PolicyLabel;
 std::unique_ptr m_xConfirm1FT;
 std::unique_ptr m_xConfirm1ED;
 
@@ -58,6 +59,7 @@ private:
 std::unique_ptr m_xPassword2FT;
 std::unique_ptr m_xPassword2ED;
 std::unique_ptr m_xPassword2StrengthBar;
+std::unique_ptr m_xPassword2PolicyLabel;
 std::unique_ptr m_xConfirm2FT;
 std::unique_ptr m_xConfirm2ED;
 
@@ -74,6 +76,7 @@ private:
 OUStringmaMainPwdStr;
 sal_uInt16  mnMinLen;
 SfxShowExtras  mnExtras;
+std::optional moPasswordPolicy;
 
 boolmbAsciiOnly;
 DECL_DLLPRIVATE_LINK(OKHdl, weld::Button&, void);
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index a69d0aef352a..b78546722cb9 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -38,15 +39,35 @@ void SfxPasswordDialog::ModifyHdl()
 bEnable = (bEnable && (m_xPassword2ED->get_text().getLength() >= 
mnMinLen));
 m_xOKBtn->set_sensitive(bEnable);
 
+// if there's a confirm entry, the dialog is being used for setting a 
password
 if (m_xConfirm1ED->get_visible())
 {
 m_xPassword1StrengthBar->set_percentage(
 SvPasswordHelper::GetPasswordStrengthPercentage(aPassword1Text));
+bool bPasswordMeetsPolicy = SvPasswordHelper::PasswordMeetsPolicy(
+aPassword1Text, moPasswordPolicy);
+m_xPassword1ED->set_message_type(bPasswordMeetsPolicy ? 
weld::EntryMessageType::Normal
+  : 
weld::EntryMessageType::Error);
+m_xPassword1PolicyLabel->set_visible(!bPasswordMeetsPolicy);
 }
+
+// if there's a confirm entry, the dialog is being used for setting a 
password
 if (m_xConfirm2ED->get_visible())
 {
+OUString aPassword2Text = m_xPassword2ED->get_text();
+
 m_xPassword2StrengthBar->set_percentage(
 
SvPasswordHelper::GetPasswordStrengthPercentage(m_xPassword2ED->get_text()));
+
+// second password is optional, ignore policy if it is empty
+bool bPasswordMeetsPolicy
+= aPassword2Text.isEmpty()
+  ? true
+  : SvPasswordHelper::PasswordMeetsPolicy(
+  aPassword2Text, moPasswordPolicy);
+m_xPassword2ED->set_message_type(bPasswordMeetsPolicy ? 
weld::EntryMessageType::Normal
+  : 
weld::EntryMessageType::Error);
+m_xPassword2PolicyLabel->set_visible(!bPasswordMeetsPolicy);
 }
 }
 
@@ -81,6 +102,19 @@ IMPL_LINK(SfxPasswordDialog, InsertTextHdl, OUString&, 
rTest, bool)
 
 IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl, weld::Button&, void)
 {
+if (m_xConfirm1ED->get_visible()
+&& !SvPasswordHelper::PasswordMeetsPolicy(GetPassword(), 
moPasswordPolicy))
+{
+m_xPassword1ED->grab_focus();
+return;
+}
+if (m_xConfirm2ED->get_visible() && !GetPassword2().isEmpty()
+&& !SvPasswordHelper::PasswordMeetsPolicy(GetPassword2(), 
moPasswordPolicy))
+{
+m_xPassword2ED->grab_focus();
+return;
+}
+
 bool bConfirmFailed = bool( mnExtras & SfxShowExtras::CONFIRM ) &&
   ( GetConfirm() != GetPassword() );
 if( ( mnExtras & SfxShowExtras::CONFIRM2 ) && ( m_xConfirm2ED->get_text() 
!= GetPassword2() ) )
@@ -114,12 +148,14 @@ SfxPasswordDialog::SfxPasswordDialog(weld::Widget* 
pParent, const OUString* pGro
 , m_xPassword1FT(m_xBuilder->weld_label("pass1ft"))
 , m_xPassword1ED(m_xBuilder->weld_entry("pass1ed"))
 , m_xPassword1StrengthBar(m_xBuilder->weld_level_bar("pass1bar"))
+, m_xPassword1PolicyLabel(m_xBuilder->weld_label("pass1policylabel"))
 , m_xConfirm1FT(m_xBuilder->weld_label("confirm1ft"))

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

2023-10-24 Thread Balazs Varga (via logerrit)
 include/sfx2/printopt.hxx|   11 ++
 sfx2/source/dialog/printopt.cxx  |   89 +---
 sfx2/uiconfig/ui/optprintpage.ui |  167 ---
 3 files changed, 243 insertions(+), 24 deletions(-)

New commits:
commit 60952eb3234006e9fba189e4189e15f902cafb4b
Author: Balazs Varga 
AuthorDate: Fri Oct 20 19:38:58 2023 +0200
Commit: Balazs Varga 
CommitDate: Tue Oct 24 08:38:54 2023 +0200

tdf#157838 - UI: Part 4 - Unify lockdown behavior of Options dialog

for Print Page.

Change-Id: I724dcbaf8e3ed479aaf053965d2d0e64381e53fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158269
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index a251616a4890..e01991dad347 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -33,22 +33,33 @@ private:
 std::unique_ptr m_xPrinterOutputRB;
 std::unique_ptr m_xPrintFileOutputRB;
 std::unique_ptr m_xReduceTransparencyCB;
+std::unique_ptr m_xReduceTransparencyImg;
 std::unique_ptr m_xReduceTransparencyAutoRB;
 std::unique_ptr m_xReduceTransparencyNoneRB;
+std::unique_ptr m_xReduceTransparencyModeImg;
 std::unique_ptr m_xReduceGradientsCB;
+std::unique_ptr m_xReduceGradientsImg;
 std::unique_ptr m_xReduceGradientsStripesRB;
 std::unique_ptr m_xReduceGradientsColorRB;
+std::unique_ptr m_xReduceGradientsModeImg;
 std::unique_ptr m_xReduceGradientsStepCountNF;
 std::unique_ptr m_xReduceBitmapsCB;
+std::unique_ptr m_xReduceBitmapsImg;
 std::unique_ptr m_xReduceBitmapsOptimalRB;
 std::unique_ptr m_xReduceBitmapsNormalRB;
 std::unique_ptr m_xReduceBitmapsResolutionRB;
+std::unique_ptr m_xReduceBitmapsModeImg;
 std::unique_ptr m_xReduceBitmapsResolutionLB;
 std::unique_ptr m_xReduceBitmapsTransparencyCB;
+std::unique_ptr m_xReduceBitmapsTransparencyImg;
 std::unique_ptr m_xConvertToGreyscalesCB;
+std::unique_ptr m_xConvertToGreyscalesImg;
 std::unique_ptr m_xPaperSizeCB;
+std::unique_ptr m_xPaperSizeImg;
 std::unique_ptr m_xPaperOrientationCB;
+std::unique_ptr m_xPaperOrientationImg;
 std::unique_ptr m_xTransparencyCB;
+std::unique_ptr m_xTransparencyImg;
 
 private:
 
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index 1638f4e2f08e..d0ee19c17a1a 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -37,22 +37,33 @@ 
SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage(weld::Container* pPag
 , m_xPrinterOutputRB(m_xBuilder->weld_radio_button("printer"))
 , m_xPrintFileOutputRB(m_xBuilder->weld_radio_button("file"))
 , m_xReduceTransparencyCB(m_xBuilder->weld_check_button("reducetrans"))
+, m_xReduceTransparencyImg(m_xBuilder->weld_widget("lockreducetrans"))
 , 
m_xReduceTransparencyAutoRB(m_xBuilder->weld_radio_button("reducetransauto"))
 , 
m_xReduceTransparencyNoneRB(m_xBuilder->weld_radio_button("reducetransnone"))
+, 
m_xReduceTransparencyModeImg(m_xBuilder->weld_widget("lockreducetransmode"))
 , m_xReduceGradientsCB(m_xBuilder->weld_check_button("reducegrad"))
+, m_xReduceGradientsImg(m_xBuilder->weld_widget("lockreducegrad"))
 , 
m_xReduceGradientsStripesRB(m_xBuilder->weld_radio_button("reducegradstripes"))
 , 
m_xReduceGradientsColorRB(m_xBuilder->weld_radio_button("reducegradcolor"))
+, m_xReduceGradientsModeImg(m_xBuilder->weld_widget("lockreducegradmode"))
 , 
m_xReduceGradientsStepCountNF(m_xBuilder->weld_spin_button("reducegradstep"))
 , m_xReduceBitmapsCB(m_xBuilder->weld_check_button("reducebitmap"))
+, m_xReduceBitmapsImg(m_xBuilder->weld_widget("lockreducebitmap"))
 , 
m_xReduceBitmapsOptimalRB(m_xBuilder->weld_radio_button("reducebitmapoptimal"))
 , 
m_xReduceBitmapsNormalRB(m_xBuilder->weld_radio_button("reducebitmapnormal"))
 , 
m_xReduceBitmapsResolutionRB(m_xBuilder->weld_radio_button("reducebitmapresol"))
+, m_xReduceBitmapsModeImg(m_xBuilder->weld_widget("lockreducebitmapmode"))
 , 
m_xReduceBitmapsResolutionLB(m_xBuilder->weld_combo_box("reducebitmapdpi"))
 , 
m_xReduceBitmapsTransparencyCB(m_xBuilder->weld_check_button("reducebitmaptrans"))
+, 
m_xReduceBitmapsTransparencyImg(m_xBuilder->weld_widget("lockreducebitmaptrans"))
 , m_xConvertToGreyscalesCB(m_xBuilder->weld_check_button("converttogray"))
+, m_xConvertToGreyscalesImg(m_xBuilder->weld_widget("lockconverttogray"))
 , m_xPaperSizeCB(m_xBuilder->weld_check_button("papersize"))
+, m_xPaperSizeImg(m_xBuilder->weld_widget("lockpapersize"))
 , m_xPaperOrientationCB(m_xBuilder->weld_check_button("paperorient"))
+, m_xPaperOrientationImg(m_xBuilder->weld_widget("lockpaperorient"))
 , m_xTransparencyCB(m_xBuilder->weld_check_button("trans"))
+, m_xTransparencyImg(m_xBuilder->weld_widget("locktrans"))
 {
 if (bOutputForPrinter)
   

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

2022-05-19 Thread Caolán McNamara (via logerrit)
 include/sfx2/passwd.hxx   |6 ++
 sfx2/source/dialog/passwd.cxx |   12 
 sfx2/uiconfig/ui/password.ui  |   19 +++
 3 files changed, 33 insertions(+), 4 deletions(-)

New commits:
commit 48ecbe9f7b9e324e9acc544c9ad4121d30a232d7
Author: Caolán McNamara 
AuthorDate: Wed May 18 11:41:53 2022 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 19 09:51:51 2022 +0200

tdf#50400 show an explanatory label if ascii-only password is required

Change-Id: Ib0e3d07e29d56e9782b4b9d215eab4d743158a71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134526
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index cbbbf7a4a33d..3302c370b3b2 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -60,6 +60,7 @@ private:
 std::unique_ptr m_xConfirm2ED;
 
 std::unique_ptr m_xMinLengthFT;
+std::unique_ptr m_xOnlyAsciiFT;
 
 std::unique_ptr m_xOKBtn;
 
@@ -117,11 +118,8 @@ public:
 {
 mnExtras = nExtras;
 }
-void AllowAsciiOnly()
-{
-mbAsciiOnly = true;
-}
 
+void AllowAsciiOnly();
 void ShowMinLengthText(bool bShow);
 
 virtual short run() override;
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index da4dd80f0e6c..13822c4a94d4 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -56,7 +56,12 @@ IMPL_LINK(SfxPasswordDialog, InsertTextHdl, OUString&, 
rTest, bool)
 }
 
 if (bReset)
+{
 rTest = aFilter.makeStringAndClear();
+// upgrade from "Normal" to "Warning" if a invalid letter was
+// discarded
+m_xOnlyAsciiFT->set_label_type(weld::LabelType::Warning);
+}
 
 return true;
 }
@@ -97,6 +102,7 @@ SfxPasswordDialog::SfxPasswordDialog(weld::Widget* pParent, 
const OUString* pGro
 , m_xConfirm2FT(m_xBuilder->weld_label("confirm2ft"))
 , m_xConfirm2ED(m_xBuilder->weld_entry("confirm2ed"))
 , m_xMinLengthFT(m_xBuilder->weld_label("minlenft"))
+, m_xOnlyAsciiFT(m_xBuilder->weld_label("onlyascii"))
 , m_xOKBtn(m_xBuilder->weld_button("ok"))
 , maMinLenPwdStr(SfxResId(STR_PASSWD_MIN_LEN))
 , maMinLenPwdStr1(SfxResId(STR_PASSWD_MIN_LEN1))
@@ -153,6 +159,12 @@ void SfxPasswordDialog::ShowMinLengthText(bool bShow)
 m_xMinLengthFT->set_visible(bShow);
 }
 
+void SfxPasswordDialog::AllowAsciiOnly()
+{
+mbAsciiOnly = true;
+m_xOnlyAsciiFT->show();
+}
+
 short SfxPasswordDialog::run()
 {
 m_xUserFT->hide();
diff --git a/sfx2/uiconfig/ui/password.ui b/sfx2/uiconfig/ui/password.ui
index 4cc57090042b..ff7cfe9f1006 100644
--- a/sfx2/uiconfig/ui/password.ui
+++ b/sfx2/uiconfig/ui/password.ui
@@ -330,6 +330,25 @@
 2
   
 
+
+  
+False
+True
+6
+Only Basic Latin characters can be 
entered
+0
+
+  
+static
+  
+
+  
+  
+False
+True
+3
+  
+
   
   
 False


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

2021-07-06 Thread Caolán McNamara (via logerrit)
 include/sfx2/sidebar/Deck.hxx  |2 +-
 include/sfx2/sidebar/Panel.hxx |6 +++---
 sfx2/source/sidebar/Deck.cxx   |2 +-
 sfx2/source/sidebar/Panel.cxx  |6 +++---
 sfx2/uiconfig/ui/panel.ui  |   14 --
 5 files changed, 16 insertions(+), 14 deletions(-)

New commits:
commit 93bda63aaadedda64dfb8f4a6f9d7f3a08d49aab
Author: Caolán McNamara 
AuthorDate: Tue Jul 6 12:34:45 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 6 16:46:54 2021 +0200

use box instead of grid

Change-Id: I394779489c256d666e14c7c5bfe55e8ebd94e32d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118481
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx
index a3d3a63aff01..1c6d2faae379 100644
--- a/include/sfx2/sidebar/Deck.hxx
+++ b/include/sfx2/sidebar/Deck.hxx
@@ -80,7 +80,7 @@ private:
 VclPtr mxParentWindow;
 std::unique_ptr mxTitleBar;
 std::unique_ptr mxVerticalScrollBar;
-std::unique_ptr mxContents;
+std::unique_ptr mxContents;
 };
 
 } // end of namespace sfx2::sidebar
diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx
index 8ab43b330130..485063f2152d 100644
--- a/include/sfx2/sidebar/Panel.hxx
+++ b/include/sfx2/sidebar/Panel.hxx
@@ -61,7 +61,7 @@ public:
 ~Panel();
 
 PanelTitleBar* GetTitleBar() const;
-weld::Container* GetContents() const;
+weld::Box* GetContents() const;
 void Show(bool bShow);
 bool IsTitleBarOptional() const { return mbIsTitleBarOptional; }
 void SetUIElement(const css::uno::Reference& 
rxElement);
@@ -108,9 +108,9 @@ private:
 const css::uno::Reference& mxFrame;
 weld::Widget* mpParentWindow;
 VclPtr mxDeck;
-std::unique_ptr mxContainer;
+std::unique_ptr mxContainer;
 std::unique_ptr mxTitleBar;
-std::unique_ptr mxContents;
+std::unique_ptr mxContents;
 css::uno::Reference mxXWindow;
 
 DECL_LINK(DumpAsPropertyTreeHdl, tools::JsonWriter&, void);
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 074a0bad7466..394c767001c2 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -51,7 +51,7 @@ Deck::Deck(const DeckDescriptor& rDeckDescriptor, 
SidebarDockingWindow* pParentW
 , mxParentWindow(pParentWindow)
 , mxTitleBar(new DeckTitleBar(rDeckDescriptor.msTitle, *m_xBuilder, 
rCloserAction))
 , mxVerticalScrollBar(m_xBuilder->weld_scrolled_window("scrolledwindow"))
-, mxContents(m_xBuilder->weld_container("contents"))
+, mxContents(m_xBuilder->weld_box("contents"))
 {
 SetStyle(GetStyle() | WB_DIALOGCONTROL);
 
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx
index 2d799a32d10a..61b9370f8e26 100644
--- a/sfx2/source/sidebar/Panel.cxx
+++ b/sfx2/source/sidebar/Panel.cxx
@@ -63,9 +63,9 @@ Panel::Panel(const PanelDescriptor& rPanelDescriptor,
 , mxFrame(rxFrame)
 , mpParentWindow(pParentWindow)
 , mxDeck(pDeck)
-, mxContainer(mxBuilder->weld_container("Panel"))
+, mxContainer(mxBuilder->weld_box("Panel"))
 , mxTitleBar(new PanelTitleBar(rPanelDescriptor.msTitle, *mxBuilder, this))
-, mxContents(mxBuilder->weld_container("contents"))
+, mxContents(mxBuilder->weld_box("contents"))
 {
 mxContents->set_visible(mbIsExpanded);
 mxContainer->connect_get_property_tree(LINK(this, Panel, 
DumpAsPropertyTreeHdl));
@@ -149,7 +149,7 @@ PanelTitleBar* Panel::GetTitleBar() const
 return mxTitleBar.get();
 }
 
-weld::Container* Panel::GetContents() const
+weld::Box* Panel::GetContents() const
 {
 return mxContents.get();
 }
diff --git a/sfx2/uiconfig/ui/panel.ui b/sfx2/uiconfig/ui/panel.ui
index b6995f386bbd..769acfddc2b2 100644
--- a/sfx2/uiconfig/ui/panel.ui
+++ b/sfx2/uiconfig/ui/panel.ui
@@ -2,10 +2,10 @@
 
 
   
-  
-  
+  
 True
 False
+vertical
 
   
 True
@@ -96,8 +96,9 @@
 
   
   
-0
-0
+False
+True
+0
   
 
 
@@ -111,8 +112,9 @@
 
   
   
-0
-1
+False
+True
+1
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-06 Thread Caolán McNamara (via logerrit)
 include/sfx2/sidebar/TabBar.hxx|2 
 sfx2/source/sidebar/TabBar.cxx |2 
 sfx2/uiconfig/ui/tabbarcontents.ui |   82 +
 3 files changed, 49 insertions(+), 37 deletions(-)

New commits:
commit c420b05745a507d6649c84279b6de5455d7d6ecb
Author: Caolán McNamara 
AuthorDate: Tue Jul 6 12:22:30 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 6 15:20:55 2021 +0200

gtk4: insert an intermediate GtkBox as 'toplevel'

so we only have to concern outselves about GtkBox and GtkGrid as
containers

Change-Id: I7154c6256d26b0bb1e13a75eb063ae86d3632bf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118479
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx
index 4c9b30e3f6e8..d788f9f01c1b 100644
--- a/include/sfx2/sidebar/TabBar.hxx
+++ b/include/sfx2/sidebar/TabBar.hxx
@@ -92,7 +92,7 @@ private:
 // gtk will warn on loading a .ui with an accelerator defined, so use a
 // temporary toplevel to suppress that and move the contents after load
 std::unique_ptr mxAuxBuilder;
-std::unique_ptr mxTempToplevel;
+std::unique_ptr mxTempToplevel;
 std::unique_ptr mxContents;
 
 std::unique_ptr mxMenuButton;
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index eda97378bcae..a233519f4752 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -48,7 +48,7 @@ TabBar::TabBar(vcl::Window* pParentWindow,
 : InterimItemWindow(pParentWindow, "sfx/ui/tabbar.ui", "TabBar")
 , mxFrame(rxFrame)
 , mxAuxBuilder(Application::CreateBuilder(m_xContainer.get(), 
"sfx/ui/tabbarcontents.ui"))
-, mxTempToplevel(mxAuxBuilder->weld_container("toplevel"))
+, mxTempToplevel(mxAuxBuilder->weld_box("toplevel"))
 , mxContents(mxAuxBuilder->weld_widget("TabBarContents"))
 , mxMenuButton(mxAuxBuilder->weld_menu_button("menubutton"))
 , mxMainMenu(mxAuxBuilder->weld_menu("mainmenu"))
diff --git a/sfx2/uiconfig/ui/tabbarcontents.ui 
b/sfx2/uiconfig/ui/tabbarcontents.ui
index 31a8ceb818b4..d1fe113122b4 100644
--- a/sfx2/uiconfig/ui/tabbarcontents.ui
+++ b/sfx2/uiconfig/ui/tabbarcontents.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -72,65 +72,77 @@
   
 
   
-  
+  
 False
 
-  
+  
 True
 False
 vertical
 
-  
+  
 True
 False
-2
 vertical
 
-  
-True
-True
-True
-Sidebar Settings
-center
-center
-3
-image6
-none
-True
-mainmenu
-False
-  
-  
-False
-True
-0
-  
-
-
-  
+  
 True
 False
-center
+2
 vertical
-icons
-False
 
-  
+  
+True
+True
+True
+Sidebar Settings
+center
+center
+3
+image6
+none
+True
+mainmenu
+False
+  
+  
+False
+True
+0
+  
+
+
+  
 True
 False
-True
-sfx2/res/symphony/sidebar-property-large.png
+center
+vertical
+icons
+False
+
+  
+True
+False
+True
+sfx2/res/symphony/sidebar-property-large.png
+  
+  
+False
+True
+  
+
   
   
 False
-True
+True
+1
   
 
   
   
 False
 True
-1
+0
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-17 Thread Gülşah Köse (via logerrit)
 include/sfx2/devtools/ObjectInspectorTreeHandler.hxx |2 +
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx  |   32 +++
 sfx2/uiconfig/ui/developmenttool.ui  |   10 -
 3 files changed, 34 insertions(+), 10 deletions(-)

New commits:
commit b1c0734ffe0f395757b6e0cea7830d820231afeb
Author: Gülşah Köse 
AuthorDate: Mon May 17 00:08:12 2021 +0300
Commit: Gülşah Köse 
CommitDate: Mon May 17 23:57:17 2021 +0200

tdf#141677 Make columns sortable

Change-Id: Ib4cb8aaba4c59a7afa347f8010deef41477b77f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115688
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx 
b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
index a9cf5be3dae6..03188276a4b4 100644
--- a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
+++ b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
@@ -83,6 +83,8 @@ public:
 DECL_LINK(NotebookEnterPage, const OString&, void);
 DECL_LINK(NotebookLeavePage, const OString&, bool);
 
+DECL_LINK(HeaderBarClick, int, void);
+
 void introspect(css::uno::Reference const& 
xInterface);
 
 void dispose();
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 60a81be9ab60..d7d4895e5d6b 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -956,6 +956,15 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
 mpObjectInspectorWidgets->mpPropertiesTreeView->make_sorted();
 mpObjectInspectorWidgets->mpMethodsTreeView->make_sorted();
 
+mpObjectInspectorWidgets->mpInterfacesTreeView->connect_column_clicked(
+LINK(this, ObjectInspectorTreeHandler, HeaderBarClick));
+mpObjectInspectorWidgets->mpServicesTreeView->connect_column_clicked(
+LINK(this, ObjectInspectorTreeHandler, HeaderBarClick));
+mpObjectInspectorWidgets->mpPropertiesTreeView->connect_column_clicked(
+LINK(this, ObjectInspectorTreeHandler, HeaderBarClick));
+mpObjectInspectorWidgets->mpMethodsTreeView->connect_column_clicked(
+LINK(this, ObjectInspectorTreeHandler, HeaderBarClick));
+
 mpObjectInspectorWidgets->mpToolbar->connect_clicked(
 LINK(this, ObjectInspectorTreeHandler, ToolbarButtonClicked));
 mpObjectInspectorWidgets->mpToolbar->set_item_sensitive("inspect", false);
@@ -1040,6 +1049,29 @@ IMPL_LINK(ObjectInspectorTreeHandler, SelectionChanged, 
weld::TreeView&, rTreeVi
 mpObjectInspectorWidgets->mpToolbar->set_item_sensitive("inspect", 
bHaveNodeWithObject);
 }
 
+static void updateOrder(std::unique_ptr& pTreeView, sal_Int32 
nColumn)
+{
+pTreeView->set_sort_column(nColumn);
+
+bool bSortAtoZ = pTreeView->get_sort_order();
+pTreeView->set_sort_order(!bSortAtoZ);
+pTreeView->set_sort_indicator(!bSortAtoZ ? TRISTATE_TRUE : TRISTATE_FALSE, 
nColumn);
+}
+
+IMPL_LINK(ObjectInspectorTreeHandler, HeaderBarClick, int, nColumn, void)
+{
+auto rPageId = 
mpObjectInspectorWidgets->mpNotebook->get_current_page_ident();
+
+if (rPageId == "object_inspector_interfaces_tab")
+updateOrder(mpObjectInspectorWidgets->mpInterfacesTreeView, nColumn);
+else if (rPageId == "object_inspector_services_tab")
+updateOrder(mpObjectInspectorWidgets->mpServicesTreeView, nColumn);
+else if (rPageId == "object_inspector_properties_tab")
+updateOrder(mpObjectInspectorWidgets->mpPropertiesTreeView, nColumn);
+else if (rPageId == "object_inspector_methods_tab")
+updateOrder(mpObjectInspectorWidgets->mpMethodsTreeView, nColumn);
+}
+
 IMPL_LINK(ObjectInspectorTreeHandler, PopupMenuHandler, const CommandEvent&, 
rCommandEvent, bool)
 {
 if (rCommandEvent.GetCommand() != CommandEventId::ContextMenu)
diff --git a/sfx2/uiconfig/ui/developmenttool.ui 
b/sfx2/uiconfig/ui/developmenttool.ui
index 58e03b3cf21a..27962e5863e7 100644
--- a/sfx2/uiconfig/ui/developmenttool.ui
+++ b/sfx2/uiconfig/ui/developmenttool.ui
@@ -320,7 +320,6 @@
 Name
 True
 True
-0
 
   
   
@@ -366,7 +365,6 @@
 Name
 True
 True
-0
 
   
   
@@ -421,7 +419,6 @@
 Object
 True
 True
-0
 
   
   
@@ -436,7 +433,6 @@
 Value
 True
  

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

2021-05-12 Thread Gülşah Köse (via logerrit)
 include/sfx2/devtools/ObjectInspectorTreeHandler.hxx |5 
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx  |   21 -
 sfx2/uiconfig/ui/developmenttool.ui  |  359 +--
 3 files changed, 181 insertions(+), 204 deletions(-)

New commits:
commit db35b9086476259fa2c047f2e4dfe7862d026530
Author: Gülşah Köse 
AuthorDate: Tue May 11 23:34:59 2021 +0300
Commit: Gülşah Köse 
CommitDate: Wed May 12 11:19:25 2021 +0200

tdf#141426 Remove GtkPaned struct unnecessary tabs.

In development tool we need GtkPaned for only properties tab.
Unnecessary hide() show() calls for the other tabs(Interfaces, Services,
Methods) causes complex problems about inital height of the second pane
with gen plugin.

Change-Id: I7523ef0bc425d7fc97ec5bd9e30e874f88e354f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115450
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx 
b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
index 0919bbfa3b9a..a9cf5be3dae6 100644
--- a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
+++ b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
@@ -40,9 +40,6 @@ private:
 // just the current context
 css::uno::Reference mxContext;
 
-// should the paned size be reset to default on resize
-bool mbPanedResetSize;
-
 static void clearObjectInspectorChildren(std::unique_ptr& 
pTreeView,
  weld::TreeIter const& rParent);
 static void handleExpanding(std::unique_ptr& pTreeView,
@@ -86,8 +83,6 @@ public:
 DECL_LINK(NotebookEnterPage, const OString&, void);
 DECL_LINK(NotebookLeavePage, const OString&, bool);
 
-DECL_LINK(PanedSizeChange, const Size&, void);
-
 void introspect(css::uno::Reference const& 
xInterface);
 
 void dispose();
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 62fb08229798..de81bd7df432 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -929,7 +929,6 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
 std::unique_ptr& pObjectInspectorWidgets)
 : mpObjectInspectorWidgets(pObjectInspectorWidgets)
 , mxContext(comphelper::getProcessComponentContext())
-, mbPanedResetSize(true)
 {
 mpObjectInspectorWidgets->mpInterfacesTreeView->connect_expanding(
 LINK(this, ObjectInspectorTreeHandler, ExpandingHandlerInterfaces));
@@ -962,15 +961,12 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
 mpObjectInspectorWidgets->mpToolbar->set_item_sensitive("inspect", false);
 mpObjectInspectorWidgets->mpToolbar->set_item_sensitive("back", false);
 
-mpObjectInspectorWidgets->mpTextView->hide();
-
 mpObjectInspectorWidgets->mpNotebook->connect_leave_page(
 LINK(this, ObjectInspectorTreeHandler, NotebookLeavePage));
 mpObjectInspectorWidgets->mpNotebook->connect_enter_page(
 LINK(this, ObjectInspectorTreeHandler, NotebookEnterPage));
 
-mpObjectInspectorWidgets->mpPaned->connect_size_allocate(
-LINK(this, ObjectInspectorTreeHandler, PanedSizeChange));
+pObjectInspectorWidgets->mpPaned->set_position(160);
 }
 
 void 
ObjectInspectorTreeHandler::handleExpanding(std::unique_ptr& 
pTreeView,
@@ -1085,8 +1081,6 @@ IMPL_LINK(ObjectInspectorTreeHandler, 
ToolbarButtonClicked, const OString&, rSel
 
 IMPL_LINK(ObjectInspectorTreeHandler, NotebookEnterPage, const OString&, 
rPageId, void)
 {
-mpObjectInspectorWidgets->mpTextView->hide();
-
 uno::Any aAny = maInspectionStack.back();
 if (!aAny.hasValue())
 return;
@@ -1108,12 +1102,10 @@ IMPL_LINK(ObjectInspectorTreeHandler, 
NotebookEnterPage, const OString&, rPageId
 }
 else if (rPageId == "object_inspector_properties_tab")
 {
-mbPanedResetSize = true;
 mpObjectInspectorWidgets->mpPropertiesTreeView->freeze();
 clearAll(mpObjectInspectorWidgets->mpPropertiesTreeView);
 appendProperties(xInterface);
 mpObjectInspectorWidgets->mpPropertiesTreeView->thaw();
-mpObjectInspectorWidgets->mpTextView->show();
 }
 else if (rPageId == "object_inspector_methods_tab")
 {
@@ -1153,17 +1145,6 @@ IMPL_LINK(ObjectInspectorTreeHandler, NotebookLeavePage, 
const OString&, rPageId
 return true;
 }
 
-IMPL_LINK(ObjectInspectorTreeHandler, PanedSizeChange, const Size&, rSize, 
void)
-{
-if (mbPanedResetSize)
-{
-// Set position at 90% of the height
-tools::Long nHeight = rSize.Height();
-mpObjectInspectorWidgets->mpPaned->set_position(nHeight * 0.9);
-mbPanedResetSize = false;
-}
-}
-
 void ObjectInspectorTreeHandler::clearObjectInspectorChildren(
 std::unique_ptr& pTreeView, weld::TreeIter const& rParent)
 {
diff --git a/sfx2/uiconfig/ui/developmenttool.ui 

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

2021-04-12 Thread Heiko Tietze (via logerrit)
 include/sfx2/dinfdlg.hxx |2 
 sfx2/source/dialog/dinfdlg.cxx   |   12 -
 sfx2/uiconfig/ui/documentinfopage.ui |  283 +--
 3 files changed, 149 insertions(+), 148 deletions(-)

New commits:
commit dc78803e2fc757fc3ddd97b59e698bf1385c
Author: Heiko Tietze 
AuthorDate: Fri Apr 9 11:25:54 2021 +0200
Commit: Heiko Tietze 
CommitDate: Mon Apr 12 08:24:45 2021 +0200

Resolves tdf#135896 - Add hyperlink to file location

File > Properties: Document Location is now a hyperlink
opening the file browser for local files or the internet
browser for remote content

Change-Id: If3de16172e12aa1a3f4acc7504a2b3dd78677c09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113839
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 04fe4131216b..6f332f7112e0 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -167,7 +167,7 @@ private:
 std::unique_ptr m_xChangePassBtn;
 
 std::unique_ptr m_xShowTypeFT;
-std::unique_ptr m_xFileValEd;
+std::unique_ptr m_xFileValEd;
 std::unique_ptr m_xShowSizeFT;
 
 std::unique_ptr m_xCreateValFt;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index c08c0dfa5cd8..ca5897df8a0a 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -689,7 +689,7 @@ SfxDocumentPage::SfxDocumentPage(weld::Container* pPage, 
weld::DialogController*
 , m_xNameED(m_xBuilder->weld_label("nameed"))
 , m_xChangePassBtn(m_xBuilder->weld_button("changepass"))
 , m_xShowTypeFT(m_xBuilder->weld_label("showtype"))
-, m_xFileValEd(m_xBuilder->weld_label("showlocation"))
+, m_xFileValEd(m_xBuilder->weld_link_button("showlocation"))
 , m_xShowSizeFT(m_xBuilder->weld_label("showsize"))
 , m_xCreateValFt(m_xBuilder->weld_label("showcreate"))
 , m_xChangeValFt(m_xBuilder->weld_label("showmodify"))
@@ -974,10 +974,14 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
 // we know it's a folder -> don't need the final slash, but it's 
better for WB_PATHELLIPSIS
 aPath.removeFinalSlash();
 OUString aText( aPath.PathToFileName() ); //! (pb) MaxLen?
-m_xFileValEd->set_label( aText );
+m_xFileValEd->set_label(aText);
+m_xFileValEd->set_uri("file://" + aText);
+}
+else if (aURL.GetProtocol() != INetProtocol::PrivSoffice)
+{
+m_xFileValEd->set_label(aURL.GetPartBeforeLastName());
+m_xFileValEd->set_uri(m_xFileValEd->get_label());
 }
-else if ( aURL.GetProtocol() != INetProtocol::PrivSoffice )
-m_xFileValEd->set_label( aURL.GetPartBeforeLastName() );
 
 // handle access data
 bool bUseUserData = rInfoItem.IsUseUserData();
diff --git a/sfx2/uiconfig/ui/documentinfopage.ui 
b/sfx2/uiconfig/ui/documentinfopage.ui
index 7fd64c4df456..49a4f8ab1c07 100644
--- a/sfx2/uiconfig/ui/documentinfopage.ui
+++ b/sfx2/uiconfig/ui/documentinfopage.ui
@@ -1,191 +1,191 @@
 
-
+
 
   
-  
+  
   
 True
-False
+False
 True
 True
-12
-6
-12
+12
+6
+12
 
   
 True
-False
+False
 end
 _Created:
-True
-showcreate
+True
+showcreate
   
   
-0
-4
+0
+4
   
 
 
   
 True
-False
+False
 end
 _Modified:
-True
-showmodify
+True
+showmodify
   
   
-0
-5
+0
+5
   
 
 
   
 True
-False
+False
 end
 _Digitally signed:
-True
-showsigned
+True
+showsigned
   
   
-0
-7
+0
+7
   
 
 
   
 True
-False
+False
 end
 Last pri_nted:
-True
-showprint
+True
+showprint
   
   
-0
-8
+0
+8
   
 
 
   
 True
-False
+False
 end
 Total _editing time:
-True
-showedittime
+True
+showedittime
   
   
-0
-9
+0
+9
   
 
 
   
 True
-False
+False
 end
 Re_vision number:
-True
-showrevision
+True
+showrevision
   
   
-0
-10
+0
+10
   
 
 
   
 True
-False
+False
 True
 True
 0
   
   
-1
-4
+1
+4
 2
   
 
 
   
 True
-False
+False
 True
 True
 0
   
   
-1
-5
+1
+5
 2
   
 

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

2021-03-20 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/devtools/DevelopmentToolDockingWindow.hxx |1 
 sfx2/source/devtools/DevelopmentToolDockingWindow.cxx  |   17 -
 sfx2/uiconfig/ui/developmenttool.ui|   31 +
 3 files changed, 27 insertions(+), 22 deletions(-)

New commits:
commit 7cd99750a3174c7953d851eb9b5c4b5675aa0d0e
Author: Tomaž Vajngerl 
AuthorDate: Wed Mar 17 16:35:19 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Mar 21 02:35:10 2021 +0100

devtools: change "Current Selection" button to toolbar

Change "Current Selection" toggle button and add it to the toolbar
instead.

Change-Id: Id891c4a324832f23f52449328d0f7eda6a862993
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112639
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx 
b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
index 171ff96ad5fb..894772a3fd74 100644
--- a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
+++ b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
@@ -37,7 +37,6 @@ class SFX2_DLLPUBLIC DevelopmentToolDockingWindow final : 
public SfxDockingWindo
 private:
 std::unique_ptr mpObjectInspectorWidgets;
 std::unique_ptr mpDocumentModelTreeView;
-std::unique_ptr mpSelectionToggle;
 std::unique_ptr mpDomToolbar;
 
 // Reference to the root object for the current document
diff --git a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx 
b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
index 32ef347eded7..69711cc32b0c 100644
--- a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
+++ b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
@@ -29,7 +29,6 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
"sfx/ui/developmenttool.ui")
 , mpObjectInspectorWidgets(new ObjectInspectorWidgets(m_xBuilder))
 , 
mpDocumentModelTreeView(m_xBuilder->weld_tree_view("leftside_treeview_id"))
-, mpSelectionToggle(m_xBuilder->weld_toggle_button("dom_selection_toggle"))
 , mpDomToolbar(m_xBuilder->weld_toolbar("dom_toolbar"))
 , maDocumentModelTreeHandler(
   mpDocumentModelTreeView,
@@ -38,7 +37,6 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
 {
 mpDocumentModelTreeView->connect_changed(
 LINK(this, DevelopmentToolDockingWindow, 
DocumentModelTreeViewSelectionHandler));
-mpSelectionToggle->connect_toggled(LINK(this, 
DevelopmentToolDockingWindow, SelectionToggled));
 mpDomToolbar->connect_clicked(
 LINK(this, DevelopmentToolDockingWindow, DomToolbarButtonClicked));
 
@@ -58,7 +56,7 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
 IMPL_LINK(DevelopmentToolDockingWindow, DocumentModelTreeViewSelectionHandler, 
weld::TreeView&,
   rView, void)
 {
-if (mpSelectionToggle->get_state() == TRISTATE_TRUE)
+if (mpDomToolbar->get_item_active("dom_current_selection_toggle"))
 return;
 
 OUString sID = rView.get_selected_id();
@@ -78,6 +76,10 @@ IMPL_LINK(DevelopmentToolDockingWindow, 
DomToolbarButtonClicked, const OString&,
 {
 maDocumentModelTreeHandler.inspectDocument();
 }
+else if (rSelectionId == "dom_current_selection_toggle")
+{
+updateSelection();
+}
 }
 
 DevelopmentToolDockingWindow::~DevelopmentToolDockingWindow() { disposeOnce(); 
}
@@ -96,7 +98,6 @@ void DevelopmentToolDockingWindow::dispose()
 
 // dispose welded objects
 mpObjectInspectorWidgets.reset();
-mpSelectionToggle.reset();
 mpDomToolbar.reset();
 mpDocumentModelTreeView.reset();
 
@@ -105,8 +106,8 @@ void DevelopmentToolDockingWindow::dispose()
 
 void DevelopmentToolDockingWindow::updateSelection()
 {
-TriState eTriState = mpSelectionToggle->get_state();
-if (eTriState == TRISTATE_TRUE)
+bool bActive = 
mpDomToolbar->get_item_active("dom_current_selection_toggle");
+if (bActive)
 {
 maObjectInspectorTreeHandler.introspect(mxCurrentSelection);
 maDocumentModelTreeHandler.selectObject(mxCurrentSelection);
@@ -145,12 +146,12 @@ void 
DevelopmentToolDockingWindow::changeToCurrentSelection()
 if (xInterface.is())
 {
 maObjectInspectorTreeHandler.introspect(xInterface);
-mpSelectionToggle->set_state(TRISTATE_TRUE);
+mpDomToolbar->set_item_active("dom_current_selection_toggle", 
true);
 return;
 }
 }
 }
-mpSelectionToggle->set_state(TRISTATE_FALSE);
+mpDomToolbar->set_item_active("dom_current_selection_toggle", false);
 maObjectInspectorTreeHandler.introspect(mxRoot);
 }
 
diff --git a/sfx2/uiconfig/ui/developmenttool.ui 
b/sfx2/uiconfig/ui/developmenttool.ui
index 62df00e9d708..b73ad19bbe68 100644
--- a/sfx2/uiconfig/ui/developmenttool.ui
+++ b/sfx2/uiconfig/ui/developmenttool.ui
@@ 

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

2021-03-16 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/devtools/DevelopmentToolDockingWindow.hxx |2 
 include/sfx2/devtools/DocumentModelTreeHandler.hxx |3 +
 sfx2/source/devtools/DevelopmentToolDockingWindow.cxx  |   14 -
 sfx2/source/devtools/DocumentModelTreeHandler.cxx  |   14 +
 sfx2/uiconfig/ui/developmenttool.ui|   47 +++--
 5 files changed, 74 insertions(+), 6 deletions(-)

New commits:
commit a873ef61534353df3251dd879f8deabde9295145
Author: Tomaž Vajngerl 
AuthorDate: Tue Mar 16 23:12:51 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Mar 17 00:27:11 2021 +0100

devtools: add refresh button for the DocumentObjectTreeView

Change-Id: I4fea7dd2a12bc04649ff62e0d04e3058cf09c884
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112579
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx 
b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
index 1c4826f975f6..171ff96ad5fb 100644
--- a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
+++ b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
@@ -38,6 +38,7 @@ private:
 std::unique_ptr mpObjectInspectorWidgets;
 std::unique_ptr mpDocumentModelTreeView;
 std::unique_ptr mpSelectionToggle;
+std::unique_ptr mpDomToolbar;
 
 // Reference to the root object for the current document
 css::uno::Reference mxRoot;
@@ -53,6 +54,7 @@ private:
 
 DECL_LINK(DocumentModelTreeViewSelectionHandler, weld::TreeView&, void);
 DECL_LINK(SelectionToggled, weld::ToggleButton&, void);
+DECL_LINK(DomToolbarButtonClicked, const OString&, void);
 
 void updateSelection();
 
diff --git a/include/sfx2/devtools/DocumentModelTreeHandler.hxx 
b/include/sfx2/devtools/DocumentModelTreeHandler.hxx
index 17b853b36c6f..c63986ad1476 100644
--- a/include/sfx2/devtools/DocumentModelTreeHandler.hxx
+++ b/include/sfx2/devtools/DocumentModelTreeHandler.hxx
@@ -33,6 +33,9 @@ private:
 // identified by the input tree iter.
 void clearChildren(weld::TreeIter const& rParent);
 
+// Clear all tree view nodes.
+void clearAll();
+
 public:
 DocumentModelTreeHandler(std::unique_ptr& 
pDocumentModelTree,
  css::uno::Reference const& 
xDocument);
diff --git a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx 
b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
index 6fcbcc68812d..32ef347eded7 100644
--- a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
+++ b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
@@ -29,7 +29,8 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
"sfx/ui/developmenttool.ui")
 , mpObjectInspectorWidgets(new ObjectInspectorWidgets(m_xBuilder))
 , 
mpDocumentModelTreeView(m_xBuilder->weld_tree_view("leftside_treeview_id"))
-, mpSelectionToggle(m_xBuilder->weld_toggle_button("selection_toggle"))
+, mpSelectionToggle(m_xBuilder->weld_toggle_button("dom_selection_toggle"))
+, mpDomToolbar(m_xBuilder->weld_toolbar("dom_toolbar"))
 , maDocumentModelTreeHandler(
   mpDocumentModelTreeView,
   
pInputBindings->GetDispatcher()->GetFrame()->GetObjectShell()->GetBaseModel())
@@ -38,6 +39,8 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
 mpDocumentModelTreeView->connect_changed(
 LINK(this, DevelopmentToolDockingWindow, 
DocumentModelTreeViewSelectionHandler));
 mpSelectionToggle->connect_toggled(LINK(this, 
DevelopmentToolDockingWindow, SelectionToggled));
+mpDomToolbar->connect_clicked(
+LINK(this, DevelopmentToolDockingWindow, DomToolbarButtonClicked));
 
 auto* pViewFrame = pInputBindings->GetDispatcher()->GetFrame();
 
@@ -69,6 +72,14 @@ IMPL_LINK_NOARG(DevelopmentToolDockingWindow, 
SelectionToggled, weld::ToggleButt
 updateSelection();
 }
 
+IMPL_LINK(DevelopmentToolDockingWindow, DomToolbarButtonClicked, const 
OString&, rSelectionId, void)
+{
+if (rSelectionId == "dom_refresh_button")
+{
+maDocumentModelTreeHandler.inspectDocument();
+}
+}
+
 DevelopmentToolDockingWindow::~DevelopmentToolDockingWindow() { disposeOnce(); 
}
 
 void DevelopmentToolDockingWindow::dispose()
@@ -86,6 +97,7 @@ void DevelopmentToolDockingWindow::dispose()
 // dispose welded objects
 mpObjectInspectorWidgets.reset();
 mpSelectionToggle.reset();
+mpDomToolbar.reset();
 mpDocumentModelTreeView.reset();
 
 SfxDockingWindow::dispose();
diff --git a/sfx2/source/devtools/DocumentModelTreeHandler.cxx 
b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
index 047b1d97b19d..7645fc327686 100644
--- a/sfx2/source/devtools/DocumentModelTreeHandler.cxx
+++ b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
@@ -719,6 +719,18 @@ uno::Reference 
DocumentModelTreeHandler::getObjectByID(OUString
 return pEntry->getMainObject();
 }
 
+void DocumentModelTreeHandler::clearAll()
+{

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

2021-03-15 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/devtools/DevelopmentToolDockingWindow.hxx |4 
 include/sfx2/devtools/ObjectInspectorTreeHandler.hxx   |5 
 include/sfx2/devtools/ObjectInspectorWidgets.hxx   |6 
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx|   24 
 sfx2/uiconfig/ui/developmenttool.ui|  657 -
 5 files changed, 383 insertions(+), 313 deletions(-)

New commits:
commit 2b9cf977810193b642761328ec15ec78ce245016
Author: Tomaž Vajngerl 
AuthorDate: Mon Mar 15 16:16:05 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Mar 16 03:41:39 2021 +0100

devtools: add a text view to show the value of selected property

Sometimes the property value in textual form can take a lot of
space, which can't be shown completely in the tree view. To solve
this problem, this change adds a text view at the bottom of the
tree view, that shows the complete value of currently selected
property.

The text view can be expanded if necessary, but to not require
constant changing of the pane, the position of the text view is
always reset to 90% of the total height.

Change-Id: I209ee29c7b60ecaa15227cc4966f19a063a7dc0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112548
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx 
b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
index 656e46fedada..1c4826f975f6 100644
--- a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
+++ b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
@@ -62,9 +62,9 @@ public:
 
 virtual ~DevelopmentToolDockingWindow() override;
 
-virtual void dispose() override;
+void dispose() override;
 
-virtual void ToggleFloatingMode() override;
+void ToggleFloatingMode() override;
 
 // Inspect the input object in the object inspector
 void introspect(css::uno::Reference const& 
xInterface);
diff --git a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx 
b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
index 2cfb572eb3a2..4fd340887855 100644
--- a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
+++ b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
@@ -42,6 +42,9 @@ private:
 // just the current context
 css::uno::Reference mxContext;
 
+// should the paned size be reset to default on resize
+bool mbPanedResetSize;
+
 static void clearObjectInspectorChildren(std::unique_ptr& 
pTreeView,
  weld::TreeIter const& rParent);
 static void handleExpanding(std::unique_ptr& pTreeView,
@@ -85,6 +88,8 @@ public:
 DECL_LINK(NotebookEnterPage, const OString&, void);
 DECL_LINK(NotebookLeavePage, const OString&, bool);
 
+DECL_LINK(PanedSizeChange, const Size&, void);
+
 void introspect(css::uno::Reference const& 
xInterface);
 
 void dispose();
diff --git a/include/sfx2/devtools/ObjectInspectorWidgets.hxx 
b/include/sfx2/devtools/ObjectInspectorWidgets.hxx
index 6d7bf8cf9e9f..6481d786a222 100644
--- a/include/sfx2/devtools/ObjectInspectorWidgets.hxx
+++ b/include/sfx2/devtools/ObjectInspectorWidgets.hxx
@@ -22,6 +22,8 @@ struct ObjectInspectorWidgets
 , mpMethodsTreeView(rxBuilder->weld_tree_view("methods_treeview_id"))
 , mpToolbar(rxBuilder->weld_toolbar("object_inspector_toolbar"))
 , mpNotebook(rxBuilder->weld_notebook("object_inspector_notebookbar"))
+, mpTextView(rxBuilder->weld_text_view("object_inspector_text_view"))
+, mpPaned(rxBuilder->weld_paned("object_inspector_paned"))
 {
 }
 
@@ -35,6 +37,8 @@ struct ObjectInspectorWidgets
 mpMethodsTreeView.reset();
 mpToolbar.reset();
 mpNotebook.reset();
+mpTextView.reset();
+mpPaned.reset();
 }
 
 std::unique_ptr mpClassNameLabel;
@@ -44,6 +48,8 @@ struct ObjectInspectorWidgets
 std::unique_ptr mpMethodsTreeView;
 std::unique_ptr mpToolbar;
 std::unique_ptr mpNotebook;
+std::unique_ptr mpTextView;
+std::unique_ptr mpPaned;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index b7f1391ff17f..d5a9c9b990cf 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -780,6 +780,7 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
 std::unique_ptr& pObjectInspectorWidgets)
 : mpObjectInspectorWidgets(pObjectInspectorWidgets)
 , mxContext(comphelper::getProcessComponentContext())
+, mbPanedResetSize(true)
 {
 mpObjectInspectorWidgets->mpInterfacesTreeView->connect_expanding(
 LINK(this, ObjectInspectorTreeHandler, ExpandingHandlerInterfaces));
@@ -812,10 +813,15 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
 

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

2021-03-13 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/devtools/ObjectInspectorTreeHandler.hxx |5 +
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx  |   68 ++-
 sfx2/uiconfig/ui/developmenttool.ui  |1 
 3 files changed, 56 insertions(+), 18 deletions(-)

New commits:
commit 1beb97dfc2d8c8e9ee06001ac59a22a3208214d1
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 11 23:26:29 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sat Mar 13 12:47:54 2021 +0100

devtools: show superclass tree in interface and services tree view

Change-Id: I508b568bbb5b0559c265a3f058e689eeeb326b83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112372
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx 
b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
index 65a16be8c890..58b4c833961c 100644
--- a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
+++ b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
@@ -15,8 +15,9 @@
 #include 
 #include 
 
-#include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -34,6 +35,8 @@ private:
 
 std::deque maInspectionStack;
 
+css::uno::Reference mxContext;
+
 static void clearObjectInspectorChildren(std::unique_ptr& 
pTreeView,
  weld::TreeIter const& rParent);
 static void handleExpanding(std::unique_ptr& pTreeView,
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 33f2b5c90e85..553e7616308b 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -12,9 +12,6 @@
 
 #include 
 
-#include 
-#include 
-
 #include 
 #include 
 #include 
@@ -190,6 +187,14 @@ OUString getAnyType(const uno::Any& aValue)
 return aTypeName.replaceAll("com.sun.star", "css");
 }
 
+uno::Reference
+convertTypeToIdlClass(const uno::Type& rType,
+  const uno::Reference& xContext)
+{
+auto xReflection = reflection::theCoreReflection::get(xContext);
+return xReflection->forName(rType.getTypeName());
+}
+
 // Object inspector nodes
 
 class ObjectInspectorNodeInterface
@@ -346,6 +351,43 @@ public:
 }
 };
 
+class ClassNode : public ObjectInspectorNodeInterface
+{
+private:
+uno::Reference mxClass;
+
+static bool isXInterface(uno::Reference const& 
xClass)
+{
+return xClass->getName() == "com.sun.star.uno.XInterface";
+}
+
+public:
+ClassNode(uno::Reference const& xClass)
+: mxClass(xClass)
+{
+}
+
+bool shouldShowExpander() override
+{
+auto const& xSuperClasses = mxClass->getSuperclasses();
+return xSuperClasses.getLength() > 2
+   || (xSuperClasses.getLength() == 1 && 
!isXInterface(xSuperClasses[0]));
+}
+
+OUString getObjectName() override { return mxClass->getName(); }
+
+void fillChildren(std::unique_ptr& rTree,
+  const weld::TreeIter* pParent) override
+{
+auto const& xSuperClasses = mxClass->getSuperclasses();
+for (auto const& xSuper : xSuperClasses)
+{
+if (!isXInterface(xSuper))
+lclAppendNodeToParent(rTree, pParent, new ClassNode(xSuper));
+}
+}
+};
+
 class BasicValueNode : public SimpleStringNode
 {
 protected:
@@ -434,9 +476,7 @@ public:
  uno::Reference const& xContext)
 : BasicValueNode(rName, rAny, rInfo, xContext)
 {
-auto xReflection = reflection::theCoreReflection::get(mxContext);
-OUString aTypeName = maAny.getValueType().getTypeName();
-auto xClass = xReflection->forName(aTypeName);
+auto xClass = convertTypeToIdlClass(maAny.getValueType(), mxContext);
 mxIdlArray = xClass->getArray();
 }
 
@@ -717,6 +757,7 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
 , mpClassNameLabel(pClassNameLabel)
 , mpObjectInspectorToolbar(pObjectInspectorToolbar)
 , mpObjectInspectorNotebook(pObjectInspectorNotebook)
+, mxContext(comphelper::getProcessComponentContext())
 {
 mpInterfacesTreeView->connect_expanding(
 LINK(this, ObjectInspectorTreeHandler, ExpandingHandlerInterfaces));
@@ -965,14 +1006,15 @@ void 
ObjectInspectorTreeHandler::appendInterfaces(uno::Reference xTypeProvider(xInterface, 
uno::UNO_QUERY);
 if (xTypeProvider.is())
 {
 const auto xSequenceTypes = xTypeProvider->getTypes();
 for (auto const& xType : xSequenceTypes)
 {
-OUString aName = xType.getTypeName();
-lclAppendNode(mpInterfacesTreeView, new SimpleStringNode(aName));
+auto xClass = convertTypeToIdlClass(xType, mxContext);
+lclAppendNode(mpInterfacesTreeView, new ClassNode(xClass));
 }
 }
 }
@@ -994,8 +1036,7 @@ void 
ObjectInspectorTreeHandler::appendProperties(uno::Reference c
 if (!xInterface.is())
 

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

2021-02-27 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/devtools/DevelopmentToolDockingWindow.hxx |1 
 include/sfx2/devtools/ObjectInspectorTreeHandler.hxx   |6 -
 sfx2/source/devtools/DevelopmentToolDockingWindow.cxx  |4 
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx|   97 +
 sfx2/uiconfig/ui/developmenttool.ui|   10 -
 5 files changed, 90 insertions(+), 28 deletions(-)

New commits:
commit 129deefc1f4ab9b3bc5005d6646ed07064a6aec1
Author: Tomaž Vajngerl 
AuthorDate: Thu Feb 25 21:11:39 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Feb 28 01:13:47 2021 +0100

devtools: on demand create the content of tab pages

Until now all the tree views in each tab page were populated at
once when the object was inspected.
With this change, the tree views are filled on demand when the
user enters a tab page, and is cleaned when the user leaves a
tab page.

Change-Id: I7f2ff89ab4c09412563b71e6524d4529318dee85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111533
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx 
b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
index 97b0c8e06e68..f5c214949c6a 100644
--- a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
+++ b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
@@ -37,6 +37,7 @@ private:
 std::unique_ptr mpDocumentModelTreeView;
 std::unique_ptr mpSelectionToggle;
 std::unique_ptr mpObjectInspectorToolbar;
+std::unique_ptr mpObjectInspectorNotebook;
 
 css::uno::Reference mxRoot;
 css::uno::Reference mxCurrentSelection;
diff --git a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx 
b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
index c61da73aa6e4..65a16be8c890 100644
--- a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
+++ b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
@@ -30,6 +30,7 @@ private:
 std::unique_ptr& mpMethodsTreeView;
 std::unique_ptr& mpClassNameLabel;
 std::unique_ptr& mpObjectInspectorToolbar;
+std::unique_ptr& mpObjectInspectorNotebook;
 
 std::deque maInspectionStack;
 
@@ -58,7 +59,8 @@ public:
std::unique_ptr& 
pPropertiesTreeView,
std::unique_ptr& 
pMethodsTreeView,
std::unique_ptr& pClassNameLabel,
-   std::unique_ptr& 
pObjectInspectorToolbar);
+   std::unique_ptr& 
pObjectInspectorToolbar,
+   std::unique_ptr& 
pObjectInspectorNotebook);
 
 DECL_LINK(ExpandingHandlerInterfaces, const weld::TreeIter&, bool);
 DECL_LINK(ExpandingHandlerServices, const weld::TreeIter&, bool);
@@ -68,6 +70,8 @@ public:
 
 DECL_LINK(PopupMenuHandler, const CommandEvent&, bool);
 DECL_LINK(ToolbarButtonClicked, const OString&, void);
+DECL_LINK(NotebookEnterPage, const OString&, void);
+DECL_LINK(NotebookLeavePage, const OString&, bool);
 
 void introspect(css::uno::Reference const& 
xInterface);
 
diff --git a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx 
b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
index d7d02198d331..a6b34091fcca 100644
--- a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
+++ b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
@@ -35,11 +35,13 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
 , 
mpDocumentModelTreeView(m_xBuilder->weld_tree_view("leftside_treeview_id"))
 , mpSelectionToggle(m_xBuilder->weld_toggle_button("selection_toggle"))
 , 
mpObjectInspectorToolbar(m_xBuilder->weld_toolbar("object_inspector_toolbar"))
+, 
mpObjectInspectorNotebook(m_xBuilder->weld_notebook("object_inspector_notebookbar"))
 , maDocumentModelTreeHandler(
   mpDocumentModelTreeView,
   
pInputBindings->GetDispatcher()->GetFrame()->GetObjectShell()->GetBaseModel())
 , maObjectInspectorTreeHandler(mpInterfacesTreeView, mpServicesTreeView, 
mpPropertiesTreeView,
-   mpMethodsTreeView, mpClassNameLabel, 
mpObjectInspectorToolbar)
+   mpMethodsTreeView, mpClassNameLabel, 
mpObjectInspectorToolbar,
+   mpObjectInspectorNotebook)
 {
 mpDocumentModelTreeView->connect_changed(
 LINK(this, DevelopmentToolDockingWindow, 
DocumentModelTreeViewSelectionHandler));
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index c100ed5fff31..c00ddc645a10 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -629,13 +629,15 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
 std::unique_ptr& pPropertiesTreeView,
 std::unique_ptr& pMethodsTreeView,
 std::unique_ptr& 

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

2021-02-27 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/devtools/DevelopmentToolDockingWindow.hxx |1 
 include/sfx2/devtools/ObjectInspectorTreeHandler.hxx   |   21 ++
 sfx2/source/devtools/DevelopmentToolDockingWindow.cxx  |4 
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx|  152 ++---
 sfx2/uiconfig/ui/developmenttool.ui|  123 +
 5 files changed, 238 insertions(+), 63 deletions(-)

New commits:
commit eb3789bd35e9dc62e92008467bfaa0650cd8d6be
Author: Tomaž Vajngerl 
AuthorDate: Thu Feb 25 20:58:42 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun Feb 28 01:13:30 2021 +0100

devtools: object inspector toolbar and object stack

This change adds a toolbar to the object inspector with buttons
for inspect (which just links to the same action added to the
context menu) and back. Back uses the newly added object stack
to return to the previously inspected object. Only the objects
which we used the "inspect" command in the object inspector tree
are added to the object stack.

Change-Id: Icb5b6e841200d6e0e41e260092a195fc84729d0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111532
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx 
b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
index f3633189c9b6..97b0c8e06e68 100644
--- a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
+++ b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
@@ -36,6 +36,7 @@ private:
 std::unique_ptr mpMethodsTreeView;
 std::unique_ptr mpDocumentModelTreeView;
 std::unique_ptr mpSelectionToggle;
+std::unique_ptr mpObjectInspectorToolbar;
 
 css::uno::Reference mxRoot;
 css::uno::Reference mxCurrentSelection;
diff --git a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx 
b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
index 7008a398df5a..c61da73aa6e4 100644
--- a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
+++ b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
@@ -18,6 +18,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 class ObjectInspectorTreeHandler
 {
 private:
@@ -25,8 +28,10 @@ private:
 std::unique_ptr& mpServicesTreeView;
 std::unique_ptr& mpPropertiesTreeView;
 std::unique_ptr& mpMethodsTreeView;
-
 std::unique_ptr& mpClassNameLabel;
+std::unique_ptr& mpObjectInspectorToolbar;
+
+std::deque maInspectionStack;
 
 static void clearObjectInspectorChildren(std::unique_ptr& 
pTreeView,
  weld::TreeIter const& rParent);
@@ -39,18 +44,30 @@ private:
 void appendProperties(css::uno::Reference const& 
xInterface);
 void appendMethods(css::uno::Reference const& 
xInterface);
 
+void inspectObject(css::uno::Reference const& 
xInterface);
+
+void clearStack();
+void addToStack(css::uno::Any const& rAny);
+css::uno::Any popFromStack();
+
+void updateBackButtonState();
+
 public:
 ObjectInspectorTreeHandler(std::unique_ptr& 
pInterfacesTreeView,
std::unique_ptr& 
pServicesTreeView,
std::unique_ptr& 
pPropertiesTreeView,
std::unique_ptr& 
pMethodsTreeView,
-   std::unique_ptr& pClassNameLabel);
+   std::unique_ptr& pClassNameLabel,
+   std::unique_ptr& 
pObjectInspectorToolbar);
 
 DECL_LINK(ExpandingHandlerInterfaces, const weld::TreeIter&, bool);
 DECL_LINK(ExpandingHandlerServices, const weld::TreeIter&, bool);
 DECL_LINK(ExpandingHandlerProperties, const weld::TreeIter&, bool);
 DECL_LINK(ExpandingHandlerMethods, const weld::TreeIter&, bool);
+DECL_LINK(SelectionChanged, weld::TreeView&, void);
+
 DECL_LINK(PopupMenuHandler, const CommandEvent&, bool);
+DECL_LINK(ToolbarButtonClicked, const OString&, void);
 
 void introspect(css::uno::Reference const& 
xInterface);
 
diff --git a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx 
b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
index 6bd92f17256d..d7d02198d331 100644
--- a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
+++ b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
@@ -34,11 +34,12 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
 , mpMethodsTreeView(m_xBuilder->weld_tree_view("methods_treeview_id"))
 , 
mpDocumentModelTreeView(m_xBuilder->weld_tree_view("leftside_treeview_id"))
 , mpSelectionToggle(m_xBuilder->weld_toggle_button("selection_toggle"))
+, 
mpObjectInspectorToolbar(m_xBuilder->weld_toolbar("object_inspector_toolbar"))
 , maDocumentModelTreeHandler(
   mpDocumentModelTreeView,
   
pInputBindings->GetDispatcher()->GetFrame()->GetObjectShell()->GetBaseModel())
 , maObjectInspectorTreeHandler(mpInterfacesTreeView, mpServicesTreeView, 

[Libreoffice-commits] core.git: include/sfx2 sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

2021-02-25 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/devtools/ObjectInspectorTreeHandler.hxx |3 +
 sfx2/UIConfig_sfx.mk |1 
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx  |   42 +++
 sfx2/uiconfig/ui/devtoolsmenu.ui |   17 +++
 4 files changed, 63 insertions(+)

New commits:
commit c68631373e491936260f2e3b4abc9826d634e410
Author: Tomaž Vajngerl 
AuthorDate: Tue Feb 23 22:54:06 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 26 08:05:21 2021 +0100

devtools: add popup menu for properties to inspect objects

With this change it is possible to inspect an object that is
listed in the properties (instead of expanding the tree view
node).

Change-Id: I8b2229af650b46064c82bdd3fe93192d352d32e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111530
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx 
b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
index 9bb27e4a72cc..7008a398df5a 100644
--- a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
+++ b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
@@ -12,6 +12,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -48,6 +50,7 @@ public:
 DECL_LINK(ExpandingHandlerServices, const weld::TreeIter&, bool);
 DECL_LINK(ExpandingHandlerProperties, const weld::TreeIter&, bool);
 DECL_LINK(ExpandingHandlerMethods, const weld::TreeIter&, bool);
+DECL_LINK(PopupMenuHandler, const CommandEvent&, bool);
 
 void introspect(css::uno::Reference const& 
xInterface);
 
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index ac2a3f8c9010..7bdbd7a85a1e 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/decktitlebar \
sfx2/uiconfig/ui/descriptioninfopage \
sfx2/uiconfig/ui/developmenttool \
+   sfx2/uiconfig/ui/devtoolsmenu \
sfx2/uiconfig/ui/documentfontspage \
sfx2/uiconfig/ui/documentinfopage \
sfx2/uiconfig/ui/documentpropertiesdialog \
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 98ed6cd2bae4..52e6111a65f4 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -367,6 +367,8 @@ public:
 {
 }
 
+uno::Any getAny() { return maAny; }
+
 bool shouldShowExpander() override
 {
 if (maAny.hasValue())
@@ -607,6 +609,9 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
 LINK(this, ObjectInspectorTreeHandler, ExpandingHandlerProperties));
 mpMethodsTreeView->connect_expanding(
 LINK(this, ObjectInspectorTreeHandler, ExpandingHandlerMethods));
+
+mpPropertiesTreeView->connect_popup_menu(
+LINK(this, ObjectInspectorTreeHandler, PopupMenuHandler));
 }
 
 void 
ObjectInspectorTreeHandler::handleExpanding(std::unique_ptr& 
pTreeView,
@@ -648,6 +653,43 @@ IMPL_LINK(ObjectInspectorTreeHandler, 
ExpandingHandlerMethods, weld::TreeIter co
 return true;
 }
 
+IMPL_LINK(ObjectInspectorTreeHandler, PopupMenuHandler, const CommandEvent&, 
rCommandEvent, bool)
+{
+if (rCommandEvent.GetCommand() != CommandEventId::ContextMenu)
+return false;
+
+uno::Any aAny;
+OUString sID = mpPropertiesTreeView->get_selected_id();
+if (sID.isEmpty())
+return false;
+
+auto* pNode = 
reinterpret_cast(sID.toInt64());
+if (pNode)
+{
+auto* pBasicValueNode = dynamic_cast(pNode);
+if (pBasicValueNode)
+{
+aAny = pBasicValueNode->getAny();
+uno::Reference xInterface(aAny, uno::UNO_QUERY);
+if (xInterface.is())
+{
+std::unique_ptr 
xBuilder(Application::CreateBuilder(
+mpPropertiesTreeView.get(), "sfx/ui/devtoolsmenu.ui"));
+std::unique_ptr 
xMenu(xBuilder->weld_menu("inspect_menu"));
+
+OString sCommand(xMenu->popup_at_rect(
+mpPropertiesTreeView.get(),
+tools::Rectangle(rCommandEvent.GetMousePosPixel(), Size(1, 
1;
+if (sCommand == "inspect")
+{
+introspect(xInterface);
+}
+}
+}
+}
+return true;
+}
+
 void ObjectInspectorTreeHandler::clearObjectInspectorChildren(
 std::unique_ptr& pTreeView, weld::TreeIter const& rParent)
 {
diff --git a/sfx2/uiconfig/ui/devtoolsmenu.ui b/sfx2/uiconfig/ui/devtoolsmenu.ui
new file mode 100644
index ..608de5bd2639
--- /dev/null
+++ b/sfx2/uiconfig/ui/devtoolsmenu.ui
@@ -0,0 +1,17 @@
+
+
+
+  
+  
+True
+False
+
+  
+True
+False
+Inspect
+True
+  
+
+  
+
___

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

2021-02-21 Thread Tomaž Vajngerl (via logerrit)
 include/sfx2/devtools/DevelopmentToolDockingWindow.hxx |5 
 include/sfx2/devtools/ObjectInspectorTreeHandler.hxx   |   27 +
 sfx2/source/devtools/DevelopmentToolDockingWindow.cxx  |   13 
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx|  325 +++-
 sfx2/uiconfig/ui/developmenttool.ui|  338 +++--
 5 files changed, 502 insertions(+), 206 deletions(-)

New commits:
commit 28115cec387e4a548844a7402be798d6ff47f9ac
Author: Tomaž Vajngerl 
AuthorDate: Wed Feb 17 11:49:56 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Feb 22 06:28:00 2021 +0100

devtools: change the object inspector view to tabs

Until now we had only one tree view with top-level nodes for
services, interfaces, properties and methods. The problem with
this is that each one category has it's own distinct columns
(especially methods) so they can't fit well into just one tree
view. Services and interfaces categories are very simple so they
can be presented in a simpler way.

This change adds a tab-bar on top, for all the categories and each
one is now presented in its own tree view, which makes it possible
to modify the tree view to the specific category. Tree views are
currently copies, but they will be modified in the future into
what is more appropriate for the category.

Change-Id: Ib532df9bb7b9e0920fff57085d6ec4f1031b3ed8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111092
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx 
b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
index 987bc053a878..f3633189c9b6 100644
--- a/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
+++ b/include/sfx2/devtools/DevelopmentToolDockingWindow.hxx
@@ -30,7 +30,10 @@ class SFX2_DLLPUBLIC DevelopmentToolDockingWindow final : 
public SfxDockingWindo
 {
 private:
 std::unique_ptr mpClassNameLabel;
-std::unique_ptr mpClassListBox;
+std::unique_ptr mpInterfacesTreeView;
+std::unique_ptr mpServicesTreeView;
+std::unique_ptr mpPropertiesTreeView;
+std::unique_ptr mpMethodsTreeView;
 std::unique_ptr mpDocumentModelTreeView;
 std::unique_ptr mpSelectionToggle;
 
diff --git a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx 
b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
index 69769cc261d9..9bb27e4a72cc 100644
--- a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
+++ b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
@@ -19,16 +19,35 @@
 class ObjectInspectorTreeHandler
 {
 private:
-std::unique_ptr& mpObjectInspectorTree;
+std::unique_ptr& mpInterfacesTreeView;
+std::unique_ptr& mpServicesTreeView;
+std::unique_ptr& mpPropertiesTreeView;
+std::unique_ptr& mpMethodsTreeView;
+
 std::unique_ptr& mpClassNameLabel;
 
-void clearObjectInspectorChildren(weld::TreeIter const& rParent);
+static void clearObjectInspectorChildren(std::unique_ptr& 
pTreeView,
+ weld::TreeIter const& rParent);
+static void handleExpanding(std::unique_ptr& pTreeView,
+weld::TreeIter const& rParent);
+static void clearAll(std::unique_ptr& pTreeView);
+
+void appendInterfaces(css::uno::Reference const& 
xInterface);
+void appendServices(css::uno::Reference const& 
xInterface);
+void appendProperties(css::uno::Reference const& 
xInterface);
+void appendMethods(css::uno::Reference const& 
xInterface);
 
 public:
-ObjectInspectorTreeHandler(std::unique_ptr& 
pObjectInspectorTree,
+ObjectInspectorTreeHandler(std::unique_ptr& 
pInterfacesTreeView,
+   std::unique_ptr& 
pServicesTreeView,
+   std::unique_ptr& 
pPropertiesTreeView,
+   std::unique_ptr& 
pMethodsTreeView,
std::unique_ptr& pClassNameLabel);
 
-DECL_LINK(ExpandingHandler, const weld::TreeIter&, bool);
+DECL_LINK(ExpandingHandlerInterfaces, const weld::TreeIter&, bool);
+DECL_LINK(ExpandingHandlerServices, const weld::TreeIter&, bool);
+DECL_LINK(ExpandingHandlerProperties, const weld::TreeIter&, bool);
+DECL_LINK(ExpandingHandlerMethods, const weld::TreeIter&, bool);
 
 void introspect(css::uno::Reference const& 
xInterface);
 
diff --git a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx 
b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
index 5a5134548f11..6bd92f17256d 100644
--- a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
+++ b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
@@ -28,13 +28,17 @@ 
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBi
 : SfxDockingWindow(pInputBindings, pChildWindow, pParent, 
"DevelopmentTool",
"sfx/ui/developmenttool.ui")
 , 

[Libreoffice-commits] core.git: include/sfx2 sfx2/source sfx2/uiconfig solenv/sanitizers

2021-02-15 Thread Caolán McNamara (via logerrit)
 include/sfx2/strings.hrc  |3 ---
 sfx2/source/sidebar/DeckTitleBar.cxx  |   12 +---
 sfx2/source/sidebar/PanelTitleBar.cxx |2 --
 sfx2/uiconfig/ui/decktitlebar.ui  |9 -
 sfx2/uiconfig/ui/paneltitlebar.ui |9 -
 solenv/sanitizers/ui/sfx.suppr|2 --
 6 files changed, 17 insertions(+), 20 deletions(-)

New commits:
commit 2f80334f1d4fe0d486f858776687c1180077a5fa
Author: Caolán McNamara 
AuthorDate: Mon Feb 15 14:26:44 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 15 17:23:28 2021 +0100

Related: tdf#140387 give toolbuttons a11y names

Change-Id: I046957afaf89e3f88cde4c2a3cffa470af657175
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110939
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index ddf2745ebb05..0fc589d8d4a6 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -295,9 +295,6 @@
 
 #define STR_CLOSE_PANE  NC_("STR_CLOSE_PANE", "Close 
Pane")
 
-#define SFX_STR_SIDEBAR_MORE_OPTIONS
NC_("SFX_STR_SIDEBAR_MORE_OPTIONS", "More Options")
-#define SFX_STR_SIDEBAR_CLOSE_DECK  
NC_("SFX_STR_SIDEBAR_CLOSE_DECK", "Close Sidebar Deck")
-
 // Translators: default Impress template names
 #define STR_TEMPLATE_NAME1  NC_("STR_TEMPLATE_NAME1", "")
 #define STR_TEMPLATE_NAME2  NC_("STR_TEMPLATE_NAME2", 
"Beehive")
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx 
b/sfx2/source/sidebar/DeckTitleBar.cxx
index f7e0a8df7b7e..91d95d69f264 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -119,17 +119,7 @@ void DeckTitleBar::SetCloserVisible (const bool 
bIsCloserVisible)
 
 mbIsCloserVisible = bIsCloserVisible;
 
-if (mbIsCloserVisible)
-{
-mxToolBox->set_item_visible("button", true);
-mxToolBox->set_item_icon_name("button", "sfx2/res/closedoc.png");
-mxToolBox->set_item_tooltip_text("button",
-SfxResId(SFX_STR_SIDEBAR_CLOSE_DECK));
-}
-else
-{
-mxToolBox->set_item_visible("button", false);
-}
+mxToolBox->set_item_visible("button", mbIsCloserVisible);
 }
 
 void DeckTitleBar::HandleToolBoxItemClick()
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx 
b/sfx2/source/sidebar/PanelTitleBar.cxx
index a9ddbc79fcb5..7f2ff3214722 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -109,8 +109,6 @@ void PanelTitleBar::SetMoreOptionsCommand(const OUString& 
rsCommandName,
 *mxToolBox, *m_xBuilder, msMoreOptionsCommand, rxFrame, 
rxController, true);
 
 mxToolBox->set_item_visible(msIdent, true);
-mxToolBox->set_item_icon_name(msIdent, "sfx2/res/symphony/morebutton.png");
-mxToolBox->set_item_tooltip_text(msIdent, 
SfxResId(SFX_STR_SIDEBAR_MORE_OPTIONS));
 }
 
 void PanelTitleBar::HandleToolBoxItemClick()
diff --git a/sfx2/uiconfig/ui/decktitlebar.ui b/sfx2/uiconfig/ui/decktitlebar.ui
index 68ecdc6469be..bbfcba7bf69b 100644
--- a/sfx2/uiconfig/ui/decktitlebar.ui
+++ b/sfx2/uiconfig/ui/decktitlebar.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -61,7 +61,14 @@
   
 True
 False
+Close Sidebar Deck
 True
+sfx2/res/closedoc.png
+
+  
+Close Sidebar Deck
+  
+
   
   
 False
diff --git a/sfx2/uiconfig/ui/paneltitlebar.ui 
b/sfx2/uiconfig/ui/paneltitlebar.ui
index 6fd621856b82..2e352bf21a4f 100644
--- a/sfx2/uiconfig/ui/paneltitlebar.ui
+++ b/sfx2/uiconfig/ui/paneltitlebar.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -68,7 +68,14 @@
   
 True
 False
+More Options
 True
+sfx2/res/symphony/morebutton.png
+
+  
+More Options
+  
+
   
   
 False
diff --git a/solenv/sanitizers/ui/sfx.suppr b/solenv/sanitizers/ui/sfx.suppr
index 58a6dc14654f..31def4bb9fb1 100644
--- a/solenv/sanitizers/ui/sfx.suppr
+++ b/solenv/sanitizers/ui/sfx.suppr
@@ -12,7 +12,6 @@ sfx2/uiconfig/ui/custominfopage.ui://GtkLabel[@id='type'] 
orphan-label
 sfx2/uiconfig/ui/custominfopage.ui://GtkLabel[@id='value'] orphan-label
 sfx2/uiconfig/ui/decktitlebar.ui://GtkImage[@id='addonimage'] no-labelled-by
 sfx2/uiconfig/ui/decktitlebar.ui://GtkLabel[@id='label'] orphan-label
-sfx2/uiconfig/ui/decktitlebar.ui://GtkToolButton[@id='button'] button-no-label
 sfx2/uiconfig/ui/documentinfopage.ui://GtkLabel[@id='showcreate'] orphan-label
 sfx2/uiconfig/ui/documentinfopage.ui://GtkLabel[@id='showmodify'] orphan-label
 sfx2/uiconfig/ui/documentinfopage.ui://GtkLabel[@id='showsigned'] orphan-label
@@ -47,7 +46,6 @@ 
sfx2/uiconfig/ui/templatepanel.ui://GtkToggleToolButton[@id='6'] 

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

2020-10-14 Thread Heiko Tietze (via logerrit)
 include/sfx2/templatedlg.hxx|4 
 sfx2/source/doc/templatedlg.cxx |   40 +--
 sfx2/uiconfig/ui/templatedlg.ui |  211 +++-
 3 files changed, 114 insertions(+), 141 deletions(-)

New commits:
commit 9eaaf97ab32068a619b5c36772619b7e66268800
Author: Heiko Tietze 
AuthorDate: Wed Oct 14 15:12:36 2020 +0200
Commit: Heiko Tietze 
CommitDate: Wed Oct 14 16:52:33 2020 +0200

Resolves tdf#137477 - Access templates via tight extensions

UI modified and code added

Change-Id: I1231bb03bc96295b9a7e6cdb85162f7f8ea3add0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104285
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 

diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index b6e8bca39b84..9d2f637ad51c 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -84,7 +84,7 @@ protected:
 DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
 
 void OnTemplateImportCategory(const OUString& sCategory);
-static void OnTemplateLink ();
+//static void OnTemplateLink ();
 void OnTemplateOpen ();
 void OnTemplateExport ();
 
@@ -130,7 +130,7 @@ protected:
 std::unique_ptr mxMoveButton;
 std::unique_ptr mxExportButton;
 std::unique_ptr mxImportButton;
-std::unique_ptr mxLinkButton;
+std::unique_ptr mxMoreTemplatesButton;
 std::unique_ptr mxCBXHideDlg;
 std::unique_ptr mxActionBar;
 std::unique_ptr mxSearchView;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 9ee57afc..78910b8cf374 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -55,6 +55,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -162,7 +163,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(weld::Window 
*pParent)
 , mxMoveButton(m_xBuilder->weld_button("move_btn"))
 , mxExportButton(m_xBuilder->weld_button("export_btn"))
 , mxImportButton(m_xBuilder->weld_button("import_btn"))
-, mxLinkButton(m_xBuilder->weld_button("online_link"))
+, mxMoreTemplatesButton(m_xBuilder->weld_button("btnMoreTemplates"))
 , mxCBXHideDlg(m_xBuilder->weld_check_button("hidedialogcb"))
 , mxActionBar(m_xBuilder->weld_menu_button("action_menu"))
 , mxSearchView(new 
TemplateSearchView(m_xBuilder->weld_scrolled_window("scrollsearch", true),
@@ -214,7 +215,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(weld::Window 
*pParent)
 mxMoveButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, 
MoveClickHdl));
 mxExportButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, 
ExportClickHdl));
 mxImportButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, 
ImportClickHdl));
-mxLinkButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, 
LinkClickHdl));
+mxMoreTemplatesButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, 
LinkClickHdl));
 
 mxSearchFilter->connect_changed(LINK(this, SfxTemplateManagerDlg, 
SearchUpdateHdl));
 mxSearchFilter->connect_focus_in(LINK( this, SfxTemplateManagerDlg, 
GetFocusHdl ));
@@ -581,7 +582,10 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, ImportClickHdl, 
weld::Button&, void)
 
 IMPL_STATIC_LINK_NOARG(SfxTemplateManagerDlg, LinkClickHdl, weld::Button&, 
void)
 {
-OnTemplateLink();
+uno::Sequence aArgs(1);
+aArgs[0].Name = "AdditionsTag";
+aArgs[0].Value <<= OUString("Templates");
+comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs);
 }
 
 IMPL_LINK_NOARG(SfxTemplateManagerDlg, OpenRegionHdl, void*, void)
@@ -1027,34 +1031,6 @@ void SfxTemplateManagerDlg::OnTemplateExport()
 }
 }
 
-void SfxTemplateManagerDlg::OnTemplateLink ()
-{
-try
-{
-Reference xConfig = 
configuration::theDefaultProvider::get( 
comphelper::getProcessComponentContext() );
-uno::Sequence args(comphelper::InitAnyPropertySequence(
-{
-{"nodepath", 
uno::Any(OUString("/org.openoffice.Office.Common/Help/StartCenter"))}
-}));
-Reference 
xNameAccess(xConfig->createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess",
 args), UNO_QUERY);
-if( xNameAccess.is() )
-{
-OUString sURL;
-//throws css::container::NoSuchElementException, 
css::lang::WrappedTargetException
-Any value( xNameAccess->getByName("TemplateRepositoryURL") );
-sURL = value.get ();
-localizeWebserviceURI(sURL);
-
-Reference< css::system::XSystemShellExecute > xSystemShellExecute(
-
css::system::SystemShellExecute::create(comphelper::getProcessComponentContext()));
-xSystemShellExecute->execute( sURL, OUString(), 
css::system::SystemShellExecuteFlags::URIS_ONLY);
-}
-}
-catch (const Exception&)
-{
-}
-}
-
 void SfxTemplateManagerDlg::OnTemplateOpen ()
 {
 ThumbnailViewItem *pItem = 
const_cast(*maSelTemplates.begin());
@@ -1359,7 

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

2019-07-26 Thread Caolán McNamara (via logerrit)
 include/sfx2/printopt.hxx|   65 +++--
 sfx2/source/dialog/printopt.cxx  |  278 +++
 sfx2/uiconfig/ui/optprintpage.ui |   11 -
 3 files changed, 146 insertions(+), 208 deletions(-)

New commits:
commit caa14001431d9b2b50dae95c7539e1ec5d40c249
Author: Caolán McNamara 
AuthorDate: Fri Jul 26 15:50:41 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 26 21:38:23 2019 +0200

weld SfxCommonPrintOptionsTabPage

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

diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index 996a32e45c27..87a8638174d0 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -35,47 +35,41 @@ class SFX2_DLLPUBLIC SfxCommonPrintOptionsTabPage : public 
SfxTabPage
 {
 private:
 
-VclPtrm_pPrinterOutputRB;
-VclPtrm_pPrintFileOutputRB;
-
-VclPtr   m_pReduceTransparencyCB;
-VclPtrm_pReduceTransparencyAutoRB;
-VclPtrm_pReduceTransparencyNoneRB;
-
-VclPtr   m_pReduceGradientsCB;
-VclPtrm_pReduceGradientsStripesRB;
-VclPtrm_pReduceGradientsColorRB;
-VclPtr   m_pReduceGradientsStepCountNF;
-
-VclPtr   m_pReduceBitmapsCB;
-VclPtrm_pReduceBitmapsOptimalRB;
-VclPtrm_pReduceBitmapsNormalRB;
-VclPtrm_pReduceBitmapsResolutionRB;
-VclPtrm_pReduceBitmapsResolutionLB;
-VclPtr   m_pReduceBitmapsTransparencyCB;
-
-VclPtr   m_pConvertToGreyscalesCB;
-
-VclPtr   m_pPDFCB;
-
-VclPtr   m_pPaperSizeCB;
-VclPtr   m_pPaperOrientationCB;
-VclPtr   m_pTransparencyCB;
+std::unique_ptr m_xPrinterOutputRB;
+std::unique_ptr m_xPrintFileOutputRB;
+std::unique_ptr m_xReduceTransparencyCB;
+std::unique_ptr m_xReduceTransparencyAutoRB;
+std::unique_ptr m_xReduceTransparencyNoneRB;
+std::unique_ptr m_xReduceGradientsCB;
+std::unique_ptr m_xReduceGradientsStripesRB;
+std::unique_ptr m_xReduceGradientsColorRB;
+std::unique_ptr m_xReduceGradientsStepCountNF;
+std::unique_ptr m_xReduceBitmapsCB;
+std::unique_ptr m_xReduceBitmapsOptimalRB;
+std::unique_ptr m_xReduceBitmapsNormalRB;
+std::unique_ptr m_xReduceBitmapsResolutionRB;
+std::unique_ptr m_xReduceBitmapsResolutionLB;
+std::unique_ptr m_xReduceBitmapsTransparencyCB;
+std::unique_ptr m_xConvertToGreyscalesCB;
+std::unique_ptr m_xPDFCB;
+std::unique_ptr m_xPaperSizeCB;
+std::unique_ptr m_xPaperOrientationCB;
+std::unique_ptr m_xTransparencyCB;
 
 private:
 
 PrinterOptions  maPrinterOptions;
 PrinterOptions  maPrintFileOptions;
 
-DECL_DLLPRIVATE_LINK( ToggleOutputPrinterRBHdl, 
RadioButton&, void );
-DECL_DLLPRIVATE_LINK( ToggleOutputPrintFileRBHdl, 
RadioButton&, void);
+DECL_DLLPRIVATE_LINK( ToggleOutputPrinterRBHdl, 
weld::ToggleButton&, void );
+DECL_DLLPRIVATE_LINK( ToggleOutputPrintFileRBHdl, 
weld::ToggleButton&, void);
 
-DECL_DLLPRIVATE_LINK( ClickReduceTransparencyCBHdl, 
Button*, void );
-DECL_DLLPRIVATE_LINK( ClickReduceGradientsCBHdl, 
Button*, void );
-DECL_DLLPRIVATE_LINK( ClickReduceBitmapsCBHdl, 
Button*, void );
+DECL_DLLPRIVATE_LINK( ClickReduceTransparencyCBHdl, 
weld::Button&, void );
+DECL_DLLPRIVATE_LINK( ClickReduceGradientsCBHdl, 
weld::Button&, void );
+DECL_DLLPRIVATE_LINK( ClickReduceBitmapsCBHdl, 
weld::Button&, void );
 
-DECL_DLLPRIVATE_LINK( 
ToggleReduceGradientsStripesRBHdl, RadioButton&, void );
-DECL_DLLPRIVATE_LINK( 
ToggleReduceBitmapsResolutionRBHdl, RadioButton&, void );
+DECL_DLLPRIVATE_LINK( 
ToggleReduceGradientsStripesRBHdl, weld::ToggleButton&, void );
+DECL_DLLPRIVATE_LINK( 
ToggleReduceBitmapsResolutionRBHdl, weld::ToggleButton&, void );
 
 SAL_DLLPRIVATE void ImplUpdateControls( const PrinterOptions* 
pCurrentOptions );
 SAL_DLLPRIVATE void ImplSaveControls( PrinterOptions* pCurrentOptions );
@@ -87,13 +81,10 @@ protected:
 
 public:
 
-SfxCommonPrintOptionsTabPage( vcl::Window* pParent, 
const SfxItemSet& rSet );
+SfxCommonPrintOptionsTabPage(TabPageParent pParent, 
const SfxItemSet& rSet);
 virtual ~SfxCommonPrintOptionsTabPage() override;
-virtual voiddispose() override;
 virtual boolFillItemSet( SfxItemSet* rSet ) override;
 virtual voidReset( const SfxItemSet* rSet ) override;
-virtual vcl::Window* 

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

2018-09-20 Thread Libreoffice Gerrit user
 include/sfx2/basedlgs.hxx   |   33 +++
 sfx2/source/dialog/basedlgs.cxx |  108 
 sfx2/uiconfig/ui/singletabdialog.ui |   11 ++-
 sw/inc/swabstdlg.hxx|2 
 sw/source/ui/chrdlg/drpcps.cxx  |   11 ++-
 sw/source/ui/dialog/swdlgfact.cxx   |   39 -
 sw/source/ui/dialog/swdlgfact.hxx   |   16 +
 sw/source/uibase/inc/drpcps.hxx |4 -
 sw/source/uibase/shells/txtattr.cxx |2 
 9 files changed, 210 insertions(+), 16 deletions(-)

New commits:
commit 6b5b2bbdf88aec54fc648a019e544addabdece6b
Author: Caolán McNamara 
AuthorDate: Thu Sep 20 10:48:14 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Sep 20 13:58:04 2018 +0200

weld SwDropCapsDlg

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

diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 58657fc58e8b..39f74dc024e8 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class TabPage;
 class SfxTabPage;
@@ -189,6 +190,38 @@ private:
 std::unique_ptr   pImpl;
 };
 
+class SFX2_DLLPUBLIC SfxSingleTabDialogController : public 
weld::GenericDialogController
+{
+private:
+VclPtr  m_xSfxPage;
+std::unique_ptr m_xOutputSet;
+const SfxItemSet* m_pInputSet;
+
+public:
+SfxSingleTabDialogController(weld::Window *pParent, const SfxItemSet& 
rOptionsSet,
+const OUString& rUIXMLDescription = 
OUString("sfx/ui/singletabdialog.ui"),
+const OString& rID = OString("SingleTabDialog"));
+
+virtual weld::Container* get_content_area() { return m_xContainer.get(); }
+
+virtual ~SfxSingleTabDialogController() override;
+
+voidSetTabPage(SfxTabPage* pTabPage);
+SfxTabPage* GetTabPage() const { return m_xSfxPage; }
+weld::Button&   GetOKButton() const { return *m_xOKBtn; }
+
+const SfxItemSet*   GetOutputItemSet() const { return m_xOutputSet.get(); }
+const SfxItemSet*   GetInputItemSet() const { return m_pInputSet; }
+
+protected:
+std::unique_ptr m_xContainer;
+std::unique_ptr m_xOKBtn;
+std::unique_ptr m_xHelpBtn;
+
+voidCreateOutputItemSet(const SfxItemSet& rInput);
+DECL_DLLPRIVATE_LINK(OKHdl_Impl, weld::Button&, void);
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 0868350ec74e..bb944a05e89b 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -733,4 +733,112 @@ void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage)
 }
 }
 
+SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Window 
*pParent, const SfxItemSet& rSet,
+const OUString& rUIXMLDescription, const OString& rID)
+: GenericDialogController(pParent, rUIXMLDescription, rID)
+, m_pInputSet()
+, m_xContainer(m_xDialog->weld_content_area())
+, m_xOKBtn(m_xBuilder->weld_button("ok"))
+, m_xHelpBtn(m_xBuilder->weld_button("help"))
+{
+m_xOKBtn->connect_clicked(LINK(this, SfxSingleTabDialogController, 
OKHdl_Impl));
+}
+
+SfxSingleTabDialogController::~SfxSingleTabDialogController()
+{
+m_xSfxPage.disposeAndClear();
+}
+
+/*  [Description]
+
+Insert a (new) TabPage; an existing page is deleted.
+The passed on page is initialized with the initially given Itemset
+through calling Reset().
+*/
+void SfxSingleTabDialogController::SetTabPage(SfxTabPage* pTabPage)
+{
+m_xSfxPage.disposeAndClear();
+m_xSfxPage = pTabPage;
+
+if (m_xSfxPage)
+{
+// First obtain the user data, only then Reset()
+OUString sConfigId = OStringToOUString(m_xSfxPage->GetConfigId(), 
RTL_TEXTENCODING_UTF8);
+SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
+Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME );
+OUString sUserData;
+aUserItem >>= sUserData;
+m_xSfxPage->SetUserData(sUserData);
+m_xSfxPage->Reset(GetInputItemSet());
+//TODOm_xSfxPage->Show();
+
+m_xHelpBtn->show(Help::IsContextHelpEnabled());
+
+// Set TabPage text in the Dialog if there is any
+OUString sTitle(m_xSfxPage->GetText());
+if (!sTitle.isEmpty())
+m_xDialog->set_title(sTitle);
+
+// Dialog receives the HelpId of TabPage if there is any
+OString sHelpId(m_xSfxPage->GetHelpId());
+if (!sHelpId.isEmpty())
+m_xDialog->set_help_id(sHelpId);
+}
+}
+
+/*  [Description]
+
+Ok_Handler; FillItemSet() is called for setting of Page.
+*/
+IMPL_LINK_NOARG(SfxSingleTabDialogController, OKHdl_Impl, weld::Button&, void)
+{
+const SfxItemSet* pInputSet = GetInputItemSet();
+if (!pInputSet)
+{
+  

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

2016-06-06 Thread Akshay Deep
 include/sfx2/saveastemplatedlg.hxx|2 ++
 sfx2/source/doc/saveastemplatedlg.cxx |   33 -
 sfx2/uiconfig/ui/saveastemplatedlg.ui |   18 --
 3 files changed, 50 insertions(+), 3 deletions(-)

New commits:
commit f944195baabfda068cc37bd4e8ddf60e6cc990b7
Author: Akshay Deep 
Date:   Sun Jun 5 07:53:03 2016 +0530

tdf#94131 Easier access to set a default template when saving a template

Change-Id: I2a3732a178f47ce49c77089a6e0865b609efd499
Reviewed-on: https://gerrit.libreoffice.org/25916
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/include/sfx2/saveastemplatedlg.hxx 
b/include/sfx2/saveastemplatedlg.hxx
index 691d4f0..bc3eade 100644
--- a/include/sfx2/saveastemplatedlg.hxx
+++ b/include/sfx2/saveastemplatedlg.hxx
@@ -18,6 +18,7 @@
 
 class Edit;
 class ListBox;
+class CheckBox;
 class SfxDocumentTemplates;
 
 //  class SfxSaveAsTemplateDialog 
---
@@ -27,6 +28,7 @@ class SFX2_DLLPUBLIC SfxSaveAsTemplateDialog : public 
ModalDialog
 
 private:
 VclPtr mpLBCategory;
+VclPtrmpCBXDefault;
 VclPtrmpTemplateNameEdit;
 VclPtr  mpOKButton;
 
diff --git a/sfx2/source/doc/saveastemplatedlg.cxx 
b/sfx2/source/doc/saveastemplatedlg.cxx
index 28025e1..3042b4b 100644
--- a/sfx2/source/doc/saveastemplatedlg.cxx
+++ b/sfx2/source/doc/saveastemplatedlg.cxx
@@ -11,13 +11,20 @@
 
 #include 
 #include 
+#include 
 #include 
+#include 
+#include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
+#include 
 
 #include "doc.hrc"
 
@@ -34,6 +41,7 @@ SfxSaveAsTemplateDialog::SfxSaveAsTemplateDialog( 
vcl::Window* pParent):
 mpDocTemplates(new SfxDocumentTemplates)
 {
 get(mpLBCategory, "categorylb");
+get(mpCBXDefault, "defaultcb");
 get(mpTemplateNameEdit, "name_entry");
 get(mpOKButton, "ok");
 
@@ -158,10 +166,33 @@ bool SfxSaveAsTemplateDialog::SaveTemplate()
 
 sal_uInt16 nDocId = mpDocTemplates->GetCount(mnRegionPos);
 OUString sURL = 
mpDocTemplates->GetTemplateTargetURLFromComponent(msSelectedCategory, 
msTemplateName);
+bool bIsSaved = mpDocTemplates->InsertTemplate( mnRegionPos, nDocId, 
msTemplateName, sURL);
 
-if(!mpDocTemplates->InsertTemplate( mnRegionPos, nDocId, msTemplateName, 
sURL))
+if (!bIsSaved)
 return false;
 
+if ( !sURL.isEmpty() && mpCBXDefault->IsChecked() )
+{
+OUString aServiceName;
+try
+{
+uno::Reference< embed::XStorage > xStorage =
+comphelper::OStorageHelper::GetStorageFromURL( sURL, 
embed::ElementModes::READ );
+
+SotClipboardFormatId nFormat = SotStorage::GetFormatID( xStorage );
+
+std::shared_ptr pFilter = 
SfxGetpApp()->GetFilterMatcher().GetFilter4ClipBoardId( nFormat );
+
+if ( pFilter )
+aServiceName = pFilter->GetServiceName();
+}
+catch( uno::Exception& )
+{}
+
+if(!aServiceName.isEmpty())
+SfxObjectFactory::SetStandardTemplate(aServiceName, sURL);
+}
+
 mpDocTemplates->Update();
 return true;
 }
diff --git a/sfx2/uiconfig/ui/saveastemplatedlg.ui 
b/sfx2/uiconfig/ui/saveastemplatedlg.ui
index da673a3..d8ff31c 100644
--- a/sfx2/uiconfig/ui/saveastemplatedlg.ui
+++ b/sfx2/uiconfig/ui/saveastemplatedlg.ui
@@ -113,9 +113,9 @@
 
 
   
+300
 True
 True
-300
   
   
 False
@@ -153,8 +153,8 @@
 
 
   
-150
 300
+150
 True
 False
 2
@@ -175,6 +175,20 @@
 1
   
 
+
+  
+Set as Default 
Template
+True
+True
+False
+0
+True
+  
+  
+0
+2
+  
+
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-03 Thread Akshay Deep
 include/sfx2/templatedlg.hxx|1 
 sfx2/source/doc/templatedlg.cxx |   48 ++--
 sfx2/uiconfig/ui/templatedlg.ui |   60 +++-
 3 files changed, 38 insertions(+), 71 deletions(-)

New commits:
commit f402a06a6abd011b2be024ce3b847edfbcb82908
Author: Akshay Deep 
Date:   Thu Jun 2 20:37:42 2016 +0530

Reduce duplicate code in Template Manager

Remove ViewBar and put contents in ActionBar

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

diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index e404e88..d9730d1 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -148,7 +148,6 @@ protected:
 VclPtr mpExportButton;
 VclPtr mpImportButton;
 VclPtr mpLinkButton;
-VclPtr mpViewBar;
 VclPtr mpActionBar;
 VclPtr mpSearchView;
 VclPtr mpCurView;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 907e4c8..a05a304 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -67,7 +67,7 @@ const char TM_SETTING_LASTAPPLICATION[] = "LastApplication";
 
 const char SERVICENAME_CFGREADACCESS[] = 
"com.sun.star.configuration.ConfigurationAccess";
 
-const char VIEWBAR_REPOSITORY[] = "repository";
+const char ACTIONBAR_REPOSITORY[] = "repository";
 const char ACTIONBAR_ACTION[] = "action_menu";
 
 #define MNI_ACTION_NEW_FOLDER 1
@@ -170,7 +170,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window 
*parent)
 get(mpSearchFilter, "search_filter");
 get(mpCBApp, "filter_application");
 get(mpCBFolder, "filter_folder");
-get(mpViewBar, "action_view");
 get(mpActionBar, "action_action");
 get(mpLocalView, "template_view");
 get(mpSearchView, "search_view");
@@ -205,14 +204,13 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window 
*parent)
 mpActionMenu->SetPopupMenu(MNI_ACTION_DEFAULT,mpTemplateDefaultMenu);
 
 // Set toolbox styles
-mpViewBar->SetButtonType(ButtonType::SYMBOLTEXT);
+mpActionBar->SetButtonType(ButtonType::SYMBOLTEXT);
 
 // Set toolbox button bits
-mpViewBar->SetItemBits(mpViewBar->GetItemId(VIEWBAR_REPOSITORY), 
ToolBoxItemBits::DROPDOWNONLY);
+mpActionBar->SetItemBits(mpActionBar->GetItemId(ACTIONBAR_REPOSITORY), 
ToolBoxItemBits::DROPDOWNONLY);
 mpActionBar->SetItemBits(mpActionBar->GetItemId(ACTIONBAR_ACTION), 
ToolBoxItemBits::DROPDOWNONLY);
 
 // Set toolbox handlers
-
mpViewBar->SetDropdownClickHdl(LINK(this,SfxTemplateManagerDlg,TBXDropdownHdl));
 
mpActionBar->SetDropdownClickHdl(LINK(this,SfxTemplateManagerDlg,TBXDropdownHdl));
 
 mpLocalView->SetStyle(mpLocalView->GetStyle() | WB_VSCROLL);
@@ -267,11 +265,10 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window 
*parent)
 SvtMiscOptions aMiscOptions;
 if ( !aMiscOptions.IsExperimentalMode() )
 {
-sal_uInt16 nPos = 
mpViewBar->GetItemPos(mpViewBar->GetItemId(VIEWBAR_REPOSITORY));
-mpViewBar->RemoveItem(nPos);
+sal_uInt16 nPos = 
mpActionBar->GetItemPos(mpActionBar->GetItemId(ACTIONBAR_REPOSITORY));
+mpActionBar->RemoveItem(nPos);
 }
 
-mpViewBar->Show();
 mpActionBar->Show();
 
 switchMainView(true);
@@ -331,7 +328,6 @@ void SfxTemplateManagerDlg::dispose()
 mpSearchFilter.clear();
 mpCBApp.clear();
 mpCBFolder.clear();
-mpViewBar.clear();
 mpActionBar.clear();
 mpSearchView.clear();
 mpCurView.clear();
@@ -527,30 +523,19 @@ IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, 
SelectRegionHdl, ListBox&, void)
 SearchUpdateHdl(*mpSearchFilter);
 }
 
-IMPL_LINK_TYPED(SfxTemplateManagerDlg, TBXDropdownHdl, ToolBox*, pBox, void)
+IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, TBXDropdownHdl, ToolBox*, void)
 {
-const sal_uInt16 nCurItemId = pBox->GetCurItemId();
+const sal_uInt16 nCurItemId = mpActionBar->GetCurItemId();
+mpActionBar->SetItemDown( nCurItemId, true );
 
-if (pBox == mpActionBar && nCurItemId == 
mpActionBar->GetItemId(ACTIONBAR_ACTION))
-{
-pBox->SetItemDown( nCurItemId, true );
-
-mpActionMenu->Execute(pBox, pBox->GetItemRect(nCurItemId), 
PopupMenuFlags::ExecuteDown);
-
-pBox->SetItemDown( nCurItemId, false );
-pBox->EndSelection();
-pBox->Invalidate();
-}
-else if (pBox == mpViewBar && nCurItemId == 
mpViewBar->GetItemId(VIEWBAR_REPOSITORY))
-{
-pBox->SetItemDown( nCurItemId, true );
+if (nCurItemId == mpActionBar->GetItemId(ACTIONBAR_ACTION))
+mpActionMenu->Execute(mpActionBar, 
mpActionBar->GetItemRect(nCurItemId), PopupMenuFlags::ExecuteDown);
+else if (nCurItemId == mpActionBar->GetItemId(ACTIONBAR_REPOSITORY))
+

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

2016-03-28 Thread Akshay Deep
 include/sfx2/templatedlg.hxx|3 ++
 sfx2/source/doc/templatedlg.cxx |   36 ++
 sfx2/uiconfig/ui/templatedlg.ui |   47 ++--
 3 files changed, 79 insertions(+), 7 deletions(-)

New commits:
commit 529848375abbe5b11e06e7ce37fca1feb20630a8
Author: Akshay Deep 
Date:   Sun Mar 27 17:33:53 2016 +0530

tdf#59698 Template Manager: 'OK' and 'Help' buttons added

Change-Id: I0ec224eb5c6b11a8d589def477f3cf8429195f2c
Reviewed-on: https://gerrit.libreoffice.org/23552
Tested-by: Jenkins 
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index 796647f..ba3dbbf 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -70,6 +70,8 @@ private:
 DECL_LINK_TYPED(TBXTemplateHdl, ToolBox*, void);
 DECL_LINK_TYPED(TBXDropdownHdl, ToolBox*, void);
 
+DECL_LINK_TYPED(OkClickHdl, Button*, void);
+
 DECL_LINK_TYPED(TVItemStateHdl, const ThumbnailViewItem*, void);
 
 DECL_LINK_TYPED(MenuSelectHdl, Menu*, bool);
@@ -146,6 +148,7 @@ private:
 VclPtr mpTabControl;
 
 VclPtr mpSearchEdit;
+VclPtr mpOKButton;
 VclPtr mpViewBar;
 VclPtr mpActionBar;
 VclPtr mpTemplateBar;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 5e05de6..e008e95 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -191,6 +191,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window 
*parent)
 get(mpLocalView, "template_view");
 get(mpSearchView, "search_view");
 get(mpRemoteView, "remote_view");
+get(mpOKButton, "ok");
 
 TabPage *pTabPage = 
mpTabControl->GetTabPage(mpTabControl->GetPageId("filter_docs"));
 pTabPage->Show();
@@ -271,6 +272,8 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window 
*parent)
 
 mpTabControl->SetActivatePageHdl(LINK(this, SfxTemplateManagerDlg, 
ActivatePageHdl));
 
+mpOKButton->SetClickHdl(LINK(this, SfxTemplateManagerDlg, OkClickHdl));
+
 SvtMiscOptions aMiscOptions;
 if ( !aMiscOptions.IsExperimentalMode() )
 {
@@ -281,6 +284,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window 
*parent)
 mpViewBar->Show();
 mpActionBar->Show();
 
+
 switchMainView(true);
 
 loadRepositories();
@@ -288,11 +292,19 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window 
*parent)
 createRepositoryMenu();
 createDefaultTemplateMenu();
 
+//setSaveMode(); //Uncomment this line to put template manager into Save 
As mode
+
 mpLocalView->Populate();
 mpCurView->filterItems(ViewFilter_Application(FILTER_APPLICATION::WRITER));
 
 readSettings();
 
+if(!mbIsSaveMode)
+mpOKButton->Disable();
+
+if(mbIsSaveMode)
+mpOKButton->SetText( SfxResId(STR_SAVEDOC).toString() );
+
 mpLocalView->Show();
 }
 
@@ -663,6 +675,17 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, 
DefaultTemplateMenuSelectHdl, Menu*, pMen
 return false;
 }
 
+IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, OkClickHdl, Button*, void)
+{
+   if(!mbIsSaveMode)
+   {
+   OnTemplateOpen();
+   EndDialog(RET_OK);
+   }
+   else
+   OnTemplateSaveAs();
+}
+
 IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, OpenRegionHdl, void*, void)
 {
 maSelFolders.clear();
@@ -671,7 +694,10 @@ IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, 
OpenRegionHdl, void*, void)
 mpViewBar->ShowItem(VIEWBAR_NEW_FOLDER, 
mpCurView->isNestedRegionAllowed());
 
 if (!mbIsSaveMode)
+{
 mpViewBar->ShowItem(VIEWBAR_IMPORT, mpCurView->isImportAllowed());
+mpOKButton->Disable();
+}
 
 mpTemplateBar->Hide();
 mpViewBar->Show();
@@ -766,6 +792,8 @@ void SfxTemplateManagerDlg::OnRegionState (const 
ThumbnailViewItem *pItem)
 }
 
 maSelFolders.insert(pItem);
+if(mbIsSaveMode)
+mpOKButton->Enable();
 }
 else
 {
@@ -777,6 +805,8 @@ void SfxTemplateManagerDlg::OnRegionState (const 
ThumbnailViewItem *pItem)
 mpViewBar->HideItem(VIEWBAR_DELETE);
 mpViewBar->ShowItem(VIEWBAR_NEW_FOLDER);
 }
+if(!mbIsSaveMode)
+mpOKButton->Disable();
 }
 }
 
@@ -790,6 +820,7 @@ void SfxTemplateManagerDlg::OnTemplateState (const 
ThumbnailViewItem *pItem)
 {
 mpViewBar->Show(false);
 mpTemplateBar->Show();
+mpOKButton->Enable();
 }
 else if (maSelTemplates.size() != 1 || !bInSelection)
 {
@@ -806,6 +837,8 @@ void SfxTemplateManagerDlg::OnTemplateState (const 
ThumbnailViewItem *pItem)
 mpTemplateBar->HideItem(TEMPLATEBAR_PROPERTIES);
 mpTemplateBar->HideItem(TEMPLATEBAR_DEFAULT);
 }
+if( !mbIsSaveMode )
+mpOKButton->Disable();
 }
 

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

2015-11-10 Thread bureken
 include/sfx2/dinfdlg.hxx |7 +-
 include/sfx2/objsh.hxx   |2 +
 include/sfx2/sfx.hrc |1 
 sfx2/source/dialog/dinfdlg.cxx   |   40 ++-
 sfx2/source/doc/objcont.cxx  |   12 ++
 sfx2/source/doc/objserv.cxx  |6 +++--
 sfx2/source/doc/objstor.cxx  |2 -
 sfx2/source/inc/objshimp.hxx |1 
 sfx2/uiconfig/ui/documentinfopage.ui |   19 
 9 files changed, 85 insertions(+), 5 deletions(-)

New commits:
commit d7ca71d4b1ac085c575fdc24f37940100ab38961
Author: bureken 
Date:   Mon Oct 26 03:39:00 2015 +0300

tdf#87995 - settings : missing a checkbox in order to avoid thumbnail saving

Change-Id: I9822c930bb7e133306a3e90fd80f29648877d5f9
Reviewed-on: https://gerrit.libreoffice.org/19596
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 1d3ef7a..faf6494 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -81,6 +81,7 @@ private:
 bool m_bHasTemplate;
 bool m_bDeleteUserData;
 bool m_bUseUserData;
+bool m_bUseThumbnailSave;
 std::vector< CustomProperty* >m_aCustomProperties;
 css::uno::Sequence< css::document::CmisProperty > m_aCmisProperties;
 
@@ -90,7 +91,7 @@ public:
 SfxDocumentInfoItem( const OUString ,
 const css::uno::Reference< css::document::XDocumentProperties> & 
i_xDocProps,
 const css::uno::Sequence< css::document::CmisProperty> & i_cmisProps,
-bool bUseUserData );
+bool bUseUserData, bool bUseThumbnailSave );
 SfxDocumentInfoItem( const SfxDocumentInfoItem& );
 virtual ~SfxDocumentInfoItem();
 
@@ -153,8 +154,11 @@ public:
 boolHasTemplate() const { return m_bHasTemplate; }
 voidSetDeleteUserData( bool bSet );
 voidSetUseUserData( bool bSet );
+voidSetUseThumbnailSave( bool bSet );
 boolIsDeleteUserData() const { return m_bDeleteUserData;}
 boolIsUseUserData() const { return m_bUseUserData;}
+boolIsUseThumbnailSave() const { return m_bUseThumbnailSave;}
+
 
 std::vector< CustomProperty* >  GetCustomProperties() const;
 voidClearCustomProperties();
@@ -194,6 +198,7 @@ private:
 
 VclPtr  m_pUseUserDataCB;
 VclPtrm_pDeleteBtn;
+VclPtr  m_pUseThumbnailSaveCB;
 
 VclPtr m_pTemplFt;
 VclPtr   m_pTemplValFt;
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 70da010..fed9399 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -422,10 +422,12 @@ public:
 
 boolIsQueryLoadTemplate() const;
 boolIsUseUserData() const;
+boolIsUseThumbnailSave() const;
 boolIsLoadReadonly() const;
 boolIsSaveVersionOnClose() const;
 voidSetQueryLoadTemplate( bool b );
 voidSetUseUserData( bool bNew );
+voidSetUseThumbnailSave( bool _bNew );
 voidSetLoadReadonly( bool _bReadonly );
 voidSetSaveVersionOnClose( bool bSet );
 voidResetFromTemplate( const OUString& 
rTemplateName, const OUString& rFileName );
diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc
index 4f63e526..582ad1e 100644
--- a/include/sfx2/sfx.hrc
+++ b/include/sfx2/sfx.hrc
@@ -228,6 +228,7 @@
 #define MID_DOCINFO_DEFAULTTARGET0x30
 #define MID_DOCINFO_USEUSERDATA  0x31
 #define MID_DOCINFO_DELETEUSERDATA   0x32
+#define MID_DOCINFO_USETHUMBNAILSAVE 0x33
 
 // only for FastPropertySet
 #define MID_TYPE 0x38
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index ecd40c9..1bd60c6 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -214,13 +214,14 @@ SfxDocumentInfoItem::SfxDocumentInfoItem()
 , m_bHasTemplate( true )
 , m_bDeleteUserData( false )
 , m_bUseUserData( true )
+, m_bUseThumbnailSave( true )
 {
 }
 
 SfxDocumentInfoItem::SfxDocumentInfoItem( const OUString& rFile,
 const uno::Reference& i_xDocProps,
 const uno::Sequence& i_cmisProps,
-bool bIs )
+bool bIs, bool _bIs )
 : SfxStringItem( SID_DOCINFO, rFile )
 , m_AutoloadDelay( i_xDocProps->getAutoloadSecs() )
 , m_AutoloadURL( i_xDocProps->getAutoloadURL() )
@@ -243,6 +244,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const OUString& 
rFile,
 , m_bHasTemplate( true )
 , m_bDeleteUserData( false )
 , 

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

2015-04-09 Thread Heena Gupta
 include/sfx2/mgetempl.hxx   |2 ++
 sfx2/source/dialog/mgetempl.cxx |   10 ++
 sfx2/uiconfig/ui/managestylepage.ui |   11 +++
 3 files changed, 23 insertions(+)

New commits:
commit 0242f4a41e40ab5a458b51657319b95ef19b05e1
Author: Heena Gupta heena.h.gu...@ericsson.com
Date:   Wed Jan 7 12:25:26 2015 +0530

Related: tdf#87675 Edit Button for linked style in edit paragraph style

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

diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index fc6aefc8b..818243b 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -47,6 +47,7 @@ class SfxManageStyleSheetPage : public SfxTabPage
 
 FixedText* m_pBaseFt;
 ListBox* m_pBaseLb;
+PushButton* m_pEditLinkStyleBtn;
 
 FixedText* m_pFilterFt;
 ListBox* m_pFilterLb;
@@ -72,6 +73,7 @@ friend class SfxStyleDialog;
 DECL_LINK( LoseFocusHdl, Edit * );
 DECL_LINK( EditStyleSelectHdl_Impl, void * );
 DECL_LINK( EditStyleHdl_Impl, void * );
+DECL_LINK( EditLinkStyleHdl_Impl, void * );
 
 voidUpdateName_Impl(ListBox *, const OUString rNew);
 voidSetDescriptionText_Impl();
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 06e531a..fdd626d 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -69,6 +69,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* 
pParent, const Sfx
 get(m_pEditStyleBtn, editstyle);
 get(m_pBaseFt, linkedwithft);
 get(m_pBaseLb, linkedwith);
+get(m_pEditLinkStyleBtn, editlinkstyle);
 m_pBaseLb-SetStyle(m_pBaseLb-GetStyle() | WB_SORT);
 m_pBaseLb-setMaxWidthChars(nMaxWidth);
 get(m_pFilterFt, categoryft);
@@ -235,6 +236,7 @@ 
SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
 m_pAutoCB-Show();
 m_pFollowLb-SetSelectHdl( LINK( this, SfxManageStyleSheetPage, 
EditStyleSelectHdl_Impl ) );
 m_pEditStyleBtn-SetClickHdl( LINK( this, SfxManageStyleSheetPage, 
EditStyleHdl_Impl ) );
+m_pEditLinkStyleBtn-SetClickHdl( LINK( this, SfxManageStyleSheetPage, 
EditLinkStyleHdl_Impl ) );
 }
 
 
@@ -344,6 +346,14 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, 
EditStyleHdl_Impl )
 
 }
 
+IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl )
+{
+OUString aTemplName(m_pBaseLb-GetSelectEntry());
+if (aTemplName != SfxResId(STR_NONE))
+Execute_Impl( SID_STYLE_EDIT, aTemplName, 
OUString(),(sal_uInt16)pStyle-GetFamily(), 0 );
+return 0;
+}
+
 // Internal: Perform functions through the Dispatcher
 bool SfxManageStyleSheetPage::Execute_Impl(
 sal_uInt16 nId, const OUString rStr, const OUString rRefStr, sal_uInt16 
nFamily,
diff --git a/sfx2/uiconfig/ui/managestylepage.ui 
b/sfx2/uiconfig/ui/managestylepage.ui
index 0569c5f..ec7b026 100644
--- a/sfx2/uiconfig/ui/managestylepage.ui
+++ b/sfx2/uiconfig/ui/managestylepage.ui
@@ -122,6 +122,17 @@
   /packing
 /child
 child
+  object class=GtkButton id=editlinkstyle
+property name=label translatable=yesEdit 
Style/property
+property name=visibleTrue/property
+property name=can_focusFalse/property
+  /object
+  packing
+property name=left_attach2/property
+property name=top_attach3/property
+  /packing
+/child
+child
   object class=GtkComboBoxText id=category
 property name=visibleTrue/property
 property name=can_focusFalse/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-04-03 Thread Caolán McNamara
 include/sfx2/dinfdlg.hxx |2 +-
 sfx2/source/dialog/dinfdlg.cxx   |6 +++---
 sfx2/uiconfig/ui/documentinfopage.ui |9 +++--
 3 files changed, 7 insertions(+), 10 deletions(-)

New commits:
commit c8e39299ac4ced2dc72f373526089b9574a14a8a
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Apr 3 11:50:52 2015 +0100

Resolves: tdf#89885 use a readonly GtkEntry for location

Change-Id: I324d5e0776da942eae62984b96951d9947702b49

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 1e5490d..9179c69 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -185,7 +185,7 @@ private:
 PushButton* m_pChangePassBtn;
 
 SelectableFixedText*m_pShowTypeFT;
-FixedText*  m_pFileValFt;
+Edit*   m_pFileValEd;
 SelectableFixedText*m_pShowSizeFT;
 
 SelectableFixedText*m_pCreateValFt;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 1237d4c..4317295 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -754,7 +754,7 @@ SfxDocumentPage::SfxDocumentPage(vcl::Window* pParent, 
const SfxItemSet rItemSe
 get(m_pChangePassBtn, changepass);
 
 get(m_pShowTypeFT, showtype);
-get(m_pFileValFt, showlocation);
+get(m_pFileValEd, showlocation);
 get(m_pShowSizeFT, showsize);
 m_aUnknownSize = m_pShowSizeFT-GetText();
 m_pShowSizeFT-SetText(OUString());
@@ -1028,10 +1028,10 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
 // we know it's a folder - don't need the final slash, but it's 
better for WB_PATHELLIPSIS
 aPath.removeFinalSlash();
 OUString aText( aPath.PathToFileName() ); //! (pb) MaxLen?
-m_pFileValFt-SetText( aText );
+m_pFileValEd-SetText( aText );
 }
 else if ( aURL.GetProtocol() != INetProtocol::PrivSoffice )
-m_pFileValFt-SetText( aURL.GetPartBeforeLastName() );
+m_pFileValEd-SetText( aURL.GetPartBeforeLastName() );
 
 // handle access data
 bool m_bUseUserData = rInfoItem.IsUseUserData();
diff --git a/sfx2/uiconfig/ui/documentinfopage.ui 
b/sfx2/uiconfig/ui/documentinfopage.ui
index 46e1c28..7d75d8a 100644
--- a/sfx2/uiconfig/ui/documentinfopage.ui
+++ b/sfx2/uiconfig/ui/documentinfopage.ui
@@ -297,13 +297,10 @@
   /packing
 /child
 child
-  object class=GtkLabel id=showlocation
+  object class=GtkEntry id=showlocation
 property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=hexpandTrue/property
-property name=xalign0/property
-property name=wrapTrue/property
-property name=max_width_chars56/property
+property name=can_focusTrue/property
+property name=editableFalse/property
   /object
   packing
 property name=left_attach1/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-02-06 Thread Heena Gupta
 include/sfx2/mgetempl.hxx   |5 +++
 sfx2/source/dialog/mgetempl.cxx |   53 +++-
 sfx2/uiconfig/ui/managestylepage.ui |   15 ++
 3 files changed, 72 insertions(+), 1 deletion(-)

New commits:
commit de896f74c805e77706cce10f4d79117af1811ee9
Author: Heena Gupta heena.h.gu...@ericsson.com
Date:   Wed Dec 24 15:55:37 2014 +0530

fdo#87675-Edit Button for next style in edit paragraph style

Change-Id: I1a4888b869df7f242244bed2fef36996450eec23
Reviewed-on: https://gerrit.libreoffice.org/13639
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 06deead..12fafb4 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -43,6 +43,7 @@ class SfxManageStyleSheetPage : public SfxTabPage
 
 FixedText* m_pFollowFt;
 ListBox* m_pFollowLb;
+PushButton* m_pEditStyleBtn;
 
 FixedText* m_pBaseFt;
 ListBox* m_pBaseLb;
@@ -69,6 +70,7 @@ friend class SfxStyleDialog;
 
 DECL_LINK( GetFocusHdl, Edit * );
 DECL_LINK( LoseFocusHdl, Edit * );
+DECL_LINK( EditStyleHdl_Impl, void * );
 
 voidUpdateName_Impl(ListBox *, const OUString rNew);
 voidSetDescriptionText_Impl();
@@ -82,6 +84,9 @@ protected:
 virtual boolFillItemSet(SfxItemSet *) SAL_OVERRIDE;
 virtual voidReset(const SfxItemSet *) SAL_OVERRIDE;
 
+boolExecute_Impl( sal_uInt16 nId, const OUString rStr, const 
OUString rRefStr,
+  sal_uInt16 nFamily, sal_uInt16 nMask = 0,
+  const sal_uInt16* pModifier = NULL );
 using TabPage::ActivatePage;
 virtual voidActivatePage(const SfxItemSet ) SAL_OVERRIDE;
 using TabPage::DeactivatePage;
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index c7a70ca..c9c8370 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -34,10 +34,14 @@
 #include sfx2/sfxresid.hxx
 #include sfx2/module.hxx
 
+#include sfx2/templdlg.hxx
+#include templdgi.hxx
 #include sfx2/sfx.hrc
 #include dialog.hrc
 
 #include svl/style.hrc
+#include svl/stritem.hxx
+#include sfx2/dispatch.hxx
 
 /*  SfxManageStyleSheetPage Constructor
  *
@@ -62,6 +66,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* 
pParent, const Sfx
 m_pFollowLb-SetStyle(m_pFollowLb-GetStyle() | WB_SORT);
 const sal_Int32 nMaxWidth(62);
 m_pFollowLb-setMaxWidthChars(nMaxWidth);
+get(m_pEditStyleBtn, editstyle);
 get(m_pBaseFt, linkedwithft);
 get(m_pBaseLb, linkedwith);
 m_pBaseLb-SetStyle(m_pBaseLb-GetStyle() | WB_SORT);
@@ -223,6 +228,7 @@ 
SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
 // It is a style with auto update? (SW only)
 if(SfxItemState::SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE))
 m_pAutoCB-Show();
+m_pEditStyleBtn-SetClickHdl( LINK( this, SfxManageStyleSheetPage, 
EditStyleHdl_Impl ) );
 }
 
 
@@ -309,7 +315,53 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl()
 m_pDescFt-SetText( pStyle-GetDescription( eUnit ) );
 }
 
+IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl )
+{
+
+OUString aTemplName(m_pFollowLb-GetSelectEntry());
+if (Execute_Impl( SID_STYLE_EDIT, aTemplName, 
OUString(),(sal_uInt16)pStyle-GetFamily(), 0 ))
+{
+}
 
+return 0;
+
+}
+
+// Internal: Perform functions through the Dispatcher
+bool SfxManageStyleSheetPage::Execute_Impl(
+sal_uInt16 nId, const OUString rStr, const OUString rRefStr, sal_uInt16 
nFamily,
+sal_uInt16 nMask, const sal_uInt16* pModifier)
+{
+
+SfxDispatcher rDispatcher = *SfxGetpApp()-GetDispatcher_Impl();
+SfxStringItem aItem(nId, rStr);
+SfxUInt16Item aFamily(SID_STYLE_FAMILY, nFamily);
+SfxUInt16Item aMask( SID_STYLE_MASK, nMask );
+SfxStringItem aUpdName(SID_STYLE_UPD_BY_EX_NAME, rStr);
+SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr );
+const SfxPoolItem* pItems[ 6 ];
+sal_uInt16 nCount = 0;
+if( !rStr.isEmpty() )
+pItems[ nCount++ ] = aItem;
+pItems[ nCount++ ] = aFamily;
+if( nMask )
+pItems[ nCount++ ] = aMask;
+if ( !rRefStr.isEmpty() )
+pItems[ nCount++ ] = aRefName;
+
+pItems[ nCount++ ] = 0;
+
+sal_uInt16 nModi = pModifier ? *pModifier : 0;
+const SfxPoolItem* mpItem = rDispatcher.Execute(
+nId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL,
+pItems, nModi );
+
+if ( !mpItem )
+return false;
+
+return true;
+
+}
 
 IMPL_LINK_INLINE_START( SfxManageStyleSheetPage, GetFocusHdl, Edit *, pEdit )
 
@@ -325,7 +377,6 @@ IMPL_LINK_INLINE_START( SfxManageStyleSheetPage, 
GetFocusHdl, Edit *, pEdit )
 IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, GetFocusHdl, Edit *, pEdit )
 
 
-
 IMPL_LINK_INLINE_START( SfxManageStyleSheetPage, 

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

2015-02-06 Thread Heena Gupta
 include/sfx2/mgetempl.hxx   |1 +
 sfx2/source/dialog/mgetempl.cxx |   17 +
 sfx2/uiconfig/ui/managestylepage.ui |6 +-
 3 files changed, 19 insertions(+), 5 deletions(-)

New commits:
commit 4be6e7becec9413cfd22c06376031b02486145b2
Author: Heena Gupta heena.h.gu...@ericsson.com
Date:   Thu Jan 8 17:53:28 2015 +0530

fdo#87675: Disable 'edit' when next style is same as current one.

Change-Id: Ifd149890460c44dc3eececc06a36f1b76d46929b
Reviewed-on: https://gerrit.libreoffice.org/13811
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com

diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 12fafb4..fc6aefc8b 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -70,6 +70,7 @@ friend class SfxStyleDialog;
 
 DECL_LINK( GetFocusHdl, Edit * );
 DECL_LINK( LoseFocusHdl, Edit * );
+DECL_LINK( EditStyleSelectHdl_Impl, void * );
 DECL_LINK( EditStyleHdl_Impl, void * );
 
 voidUpdateName_Impl(ListBox *, const OUString rNew);
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index c9c8370..06e531a 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -82,6 +82,11 @@ 
SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
 // this Page needs ExchangeSupport
 SetExchangeSupport();
 
+if ( aFollow == aName )
+m_pEditStyleBtn-Disable();
+else
+m_pEditStyleBtn-Enable();
+
 ResMgr* pResMgr = SfxGetpApp()-GetModule_Impl()-GetResMgr();
 OSL_ENSURE( pResMgr, No ResMgr in Module );
 pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, *pResMgr ) );
@@ -228,6 +233,7 @@ 
SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
 // It is a style with auto update? (SW only)
 if(SfxItemState::SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE))
 m_pAutoCB-Show();
+m_pFollowLb-SetSelectHdl( LINK( this, SfxManageStyleSheetPage, 
EditStyleSelectHdl_Impl ) );
 m_pEditStyleBtn-SetClickHdl( LINK( this, SfxManageStyleSheetPage, 
EditStyleHdl_Impl ) );
 }
 
@@ -315,6 +321,17 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl()
 m_pDescFt-SetText( pStyle-GetDescription( eUnit ) );
 }
 
+IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleSelectHdl_Impl )
+{
+OUString aTemplName(m_pFollowLb-GetSelectEntry());
+OUString aEditTemplName(m_pNameRo-GetText());
+if (!( aTemplName == aEditTemplName))
+m_pEditStyleBtn-Enable();
+else
+m_pEditStyleBtn-Disable();
+return 0;
+}
+
 IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl )
 {
 
diff --git a/sfx2/uiconfig/ui/managestylepage.ui 
b/sfx2/uiconfig/ui/managestylepage.ui
index 396fd39..0569c5f 100644
--- a/sfx2/uiconfig/ui/managestylepage.ui
+++ b/sfx2/uiconfig/ui/managestylepage.ui
@@ -102,11 +102,7 @@
   object class=GtkButton id=editstyle
 property name=label translatable=yesEdit 
Style/property
 property name=visibleTrue/property
-property name=can_focusTrue/property
-property name=can_defaultTrue/property
-property name=has_defaultTrue/property
-property name=receives_defaultTrue/property
-property name=use_underlineTrue/property
+property name=can_focusFalse/property
   /object
   packing
 property name=left_attach2/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-14 Thread Caolán McNamara
 include/sfx2/templatedlg.hxx|2 +-
 sfx2/source/doc/templatedlg.cxx |2 +-
 sfx2/uiconfig/ui/templatedlg.ui |3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 60126254eba8a6a6b94c60b2101ee90986161e24
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Oct 14 17:16:34 2014 +0100

Resolves: fdo#72587 make template dialog Modal

Change-Id: Iefb63bc7cdbff2217f16c1a72fc271361227588b

diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index 984b06a..b9597cb 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -48,7 +48,7 @@ class SFX2_DLLPUBLIC SfxTemplateManagerDlg : public 
ModelessDialog
 
 public:
 
-SfxTemplateManagerDlg (vcl::Window *parent = DIALOG_NO_PARENT);
+SfxTemplateManagerDlg(vcl::Window *parent = NULL);
 
 virtual ~SfxTemplateManagerDlg ();
 
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index fd3fa77..bdd2b27 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -175,7 +175,7 @@ static bool cmpSelectionItems (const ThumbnailViewItem 
*pItem1, const ThumbnailV
 }
 
 SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window *parent)
-: ModelessDialog(parent, TemplateDialog, sfx/ui/templatedlg.ui),
+: ModalDialog(parent, TemplateDialog, sfx/ui/templatedlg.ui),
   maSelTemplates(cmpSelectionItems),
   maSelFolders(cmpSelectionItems),
   mbIsSaveMode(false),
diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui
index 945fca2..0c7eec7 100644
--- a/sfx2/uiconfig/ui/templatedlg.ui
+++ b/sfx2/uiconfig/ui/templatedlg.ui
@@ -7,6 +7,7 @@
 property name=width_request800/property
 property name=height_request560/property
 property name=can_focusFalse/property
+property name=modalTrue/property
 property name=title translatable=yesTemplate Manager/property
 child
   object class=GtkBox id=box1
@@ -327,6 +328,7 @@
   object class=sfxlo-TemplateSearchView id=search_view
 property name=can_focusTrue/property
 property name=no_show_allTrue/property
+property name=margin0/property
 property name=hexpandTrue/property
 property name=vexpandTrue/property
   /object
@@ -340,6 +342,7 @@
   object class=sfxlo-TemplateRemoteView id=remote_view
 property name=can_focusTrue/property
 property name=no_show_allTrue/property
+property name=margin0/property
 property name=hexpandTrue/property
 property name=vexpandTrue/property
   /object
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sfx2 sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

2013-11-12 Thread Manal Alhassoun
 include/sfx2/newstyle.hxx   |8 +-
 sfx2/UIConfig_sfx.mk|1 
 sfx2/source/dialog/newstyle.cxx |   24 +++-
 sfx2/source/dialog/newstyle.hrc |4 -
 sfx2/source/dialog/newstyle.src |   36 
 sfx2/uiconfig/ui/newstyle.ui|  120 
 6 files changed, 135 insertions(+), 58 deletions(-)

New commits:
commit eb505c259d0d7bd05d1bb5be5a14ad8613c2a9c7
Author: Manal Alhassoun malhass...@kacst.edu.sa
Date:   Thu Nov 7 15:12:10 2013 +0300

Convert New Style dialog to widget UI

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

diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx
index 9584396..368d154 100644
--- a/include/sfx2/newstyle.hxx
+++ b/include/sfx2/newstyle.hxx
@@ -33,10 +33,8 @@ class SfxStyleSheetBasePool;
 class SFX2_DLLPUBLIC SfxNewStyleDlg : public ModalDialog
 {
 private:
-FixedLine   aColFL;
-ComboBoxaColBox;
-OKButtonaOKBtn;
-CancelButtonaCancelBtn;
+ComboBox* m_pColBox;
+OKButton* m_pOKBtn;
 
 QueryBoxaQueryOverwriteBox;
 SfxStyleSheetBasePool  rPool;
@@ -48,7 +46,7 @@ public:
 SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool );
 ~SfxNewStyleDlg();
 
-OUStringGetName() const { return 
comphelper::string::stripStart(aColBox.GetText(), ' '); }
+OUStringGetName() const { return 
comphelper::string::stripStart(m_pColBox-GetText(), ' '); }
 };
 
 #endif
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index a2629d2..1ae9091 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/errorfindemaildialog \
sfx2/uiconfig/ui/licensedialog \
sfx2/uiconfig/ui/managestylepage \
+   sfx2/uiconfig/ui/newstyle \
sfx2/uiconfig/ui/optprintpage \
sfx2/uiconfig/ui/password \
sfx2/uiconfig/ui/printeroptionsdialog \
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 2995a71..5f8e24e 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -31,7 +31,7 @@
 IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
 {
 (void)pControl; //unused
-const OUString aName( aColBox.GetText() );
+const OUString aName( m_pColBox-GetText() );
 SfxStyleSheetBase* pStyle = rPool.Find( aName, rPool.GetSearchFamily(), 
SFXSTYLEBIT_ALL );
 if ( pStyle )
 {
@@ -54,7 +54,7 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
 
 IMPL_LINK_INLINE_START( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
 {
-aOKBtn.Enable( !comphelper::string::remove(pBox-GetText(), ' ').isEmpty() 
);
+m_pOKBtn-Enable( !comphelper::string::remove(pBox-GetText(), ' 
').isEmpty() );
 return 0;
 }
 IMPL_LINK_INLINE_END( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
@@ -63,28 +63,26 @@ IMPL_LINK_INLINE_END( SfxNewStyleDlg, ModifyHdl, ComboBox 
*, pBox )
 
 SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool 
rInPool ) :
 
-ModalDialog( pParent, SfxResId( DLG_NEW_STYLE_BY_EXAMPLE ) ),
+ModalDialog( pParent, CreateStyleDialog, sfx/ui/newstyle.ui ),
 
-aColFL  ( this, SfxResId( FL_COL ) ),
-aColBox ( this, SfxResId( LB_COL ) ),
-aOKBtn  ( this, SfxResId( BT_OK ) ),
-aCancelBtn  ( this, SfxResId( BT_CANCEL ) ),
 aQueryOverwriteBox  ( this, SfxResId( MSG_OVERWRITE ) ),
 
 rPool( rInPool )
 
 {
-FreeResource();
+get(m_pColBox, stylename);
+m_pColBox-set_width_request(m_pColBox-approximate_char_width() * 25);
+m_pColBox-set_height_request(m_pColBox-GetTextHeight() * 10);
+get(m_pOKBtn, ok);
 
-aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
-aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
-aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
-//aColBox.SetAccessibleName(SfxResId(FL_COL).toString());
+m_pOKBtn-SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
+m_pColBox-SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
+m_pColBox-SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
 
 SfxStyleSheetBase *pStyle = rPool.First();
 while ( pStyle )
 {
-aColBox.InsertEntry(pStyle-GetName());
+m_pColBox-InsertEntry(pStyle-GetName());
 pStyle = rPool.Next();
 }
 }
diff --git a/sfx2/source/dialog/newstyle.hrc b/sfx2/source/dialog/newstyle.hrc
index 0262c89..4725dbd 100644
--- a/sfx2/source/dialog/newstyle.hrc
+++ b/sfx2/source/dialog/newstyle.hrc
@@ -17,10 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#define BT_OK   100
-#define BT_CANCEL   101
-#define LB_COL  1