sw/source/uibase/dialog/watermarkdialog.cxx | 23 ---------------------- sw/source/uibase/inc/watermarkdialog.hxx | 4 --- sw/uiconfig/swriter/menubar/menubar.xml | 1 sw/uiconfig/swriter/toolbar/classificationbar.xml | 1 sw/uiconfig/swriter/ui/watermarkdialog.ui | 21 ++------------------ 5 files changed, 5 insertions(+), 45 deletions(-)
New commits: commit 6ee2c4fbbdfebf93f37ba3289f4e0631fee5eab3 Author: Szymon KÅos <szymon.k...@collabora.com> Date: Tue May 23 11:35:30 2017 +0200 Watermark: move to the insert menu Change-Id: I6058236434de00cddec1340613e83c10acc4df2a Reviewed-on: https://gerrit.libreoffice.org/37943 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Szymon KÅos <szymon.k...@collabora.com> diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml index b91b0eebaefd..269956673465 100644 --- a/sw/uiconfig/swriter/menubar/menubar.xml +++ b/sw/uiconfig/swriter/menubar/menubar.xml @@ -268,6 +268,7 @@ </menu:menupopup> </menu:menu> <menu:menuitem menu:id=".uno:FontworkGalleryFloater"/> + <menu:menuitem menu:id=".uno:Watermark"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:DrawText"/> <menu:menuitem menu:id=".uno:InsertAnnotation"/> diff --git a/sw/uiconfig/swriter/toolbar/classificationbar.xml b/sw/uiconfig/swriter/toolbar/classificationbar.xml index 01981333a46e..3ee34071e040 100644 --- a/sw/uiconfig/swriter/toolbar/classificationbar.xml +++ b/sw/uiconfig/swriter/toolbar/classificationbar.xml @@ -9,5 +9,4 @@ --> <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> <toolbar:toolbaritem xlink:href=".uno:ClassificationApply"/> - <toolbar:toolbaritem xlink:href=".uno:Watermark"/> </toolbar:toolbar> commit f6ea62d6c793abc9fc848b9ba2697299b90eb147 Author: Szymon KÅos <szymon.k...@collabora.com> Date: Tue May 23 11:29:43 2017 +0200 Watermark: remove enable checkbox Change-Id: Ic18b85070bf6c5c3e9678859a87cb9f44411533b Reviewed-on: https://gerrit.libreoffice.org/37944 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Szymon KÅos <szymon.k...@collabora.com> diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx b/sw/source/uibase/dialog/watermarkdialog.cxx index 1246eabce4cc..6b993d22caf1 100644 --- a/sw/source/uibase/dialog/watermarkdialog.cxx +++ b/sw/source/uibase/dialog/watermarkdialog.cxx @@ -23,8 +23,6 @@ SwWatermarkDialog::SwWatermarkDialog( vcl::Window* pParent, SfxBindings& rBindin : ModelessDialog( pParent, "WatermarkDialog", "modules/swriter/ui/watermarkdialog.ui" ) , m_rBindings( rBindings ) { - get( m_pTextGrid, "TextGrid" ); - get( m_pEnableWatermarkCB, "EnableWatermarkCB" ); get( m_pTextInput, "TextInput" ); get( m_pOKButton, "ok" ); get( m_pFont, "FontBox" ); @@ -47,8 +45,6 @@ void SwWatermarkDialog::dispose() m_pAngle.clear(); m_pTransparency.clear(); m_pColor.clear(); - m_pTextGrid.clear(); - m_pEnableWatermarkCB.clear(); m_pTextInput.clear(); m_pOKButton.clear(); @@ -70,7 +66,6 @@ void SwWatermarkDialog::InitFields() m_pFont->Fill( pFontList ); - m_pEnableWatermarkCB->SetClickHdl( LINK( this, SwWatermarkDialog, CheckBoxHdl ) ); m_pOKButton->SetClickHdl( LINK( this, SwWatermarkDialog, OKButtonHdl ) ); // Get watermark properties @@ -81,7 +76,6 @@ void SwWatermarkDialog::InitFields() { const SfxWatermarkItem* pWatermark = static_cast<const SfxWatermarkItem*>( pItem ); OUString sText = pWatermark->GetText(); - m_pEnableWatermarkCB->Check( !sText.isEmpty() ); m_pTextInput->SetText( sText ); m_pFont->SelectEntryPos( m_pFont->GetEntryPos( pWatermark->GetFont() ) ); m_pAngle->SetValue( pWatermark->GetAngle() ); @@ -90,24 +84,9 @@ void SwWatermarkDialog::InitFields() } } -void SwWatermarkDialog::Update() -{ - if( m_pEnableWatermarkCB->IsChecked() ) - m_pTextGrid->Enable(); - else - m_pTextGrid->Disable(); -} - -IMPL_LINK_NOARG( SwWatermarkDialog, CheckBoxHdl, Button*, void ) -{ - Update(); -} - IMPL_LINK_NOARG( SwWatermarkDialog, OKButtonHdl, Button*, void ) { - OUString sText = ""; - if( m_pEnableWatermarkCB->IsChecked() ) - sText = m_pTextInput->GetText(); + OUString sText = m_pTextInput->GetText(); css::uno::Sequence<css::beans::PropertyValue> aPropertyValues( comphelper::InitPropertySequence( { diff --git a/sw/source/uibase/inc/watermarkdialog.hxx b/sw/source/uibase/inc/watermarkdialog.hxx index 7f59fe0a2bb7..b443fbce797d 100644 --- a/sw/source/uibase/inc/watermarkdialog.hxx +++ b/sw/source/uibase/inc/watermarkdialog.hxx @@ -23,16 +23,12 @@ public: virtual void dispose() override; void InitFields(); - void Update(); private: - DECL_LINK( CheckBoxHdl, Button*, void ); DECL_LINK( OKButtonHdl, Button*, void ); SfxBindings& m_rBindings; - VclPtr<VclGrid> m_pTextGrid; - VclPtr<CheckBox> m_pEnableWatermarkCB; VclPtr<Edit> m_pTextInput; VclPtr<PushButton> m_pOKButton; VclPtr<FontNameBox> m_pFont; diff --git a/sw/uiconfig/swriter/ui/watermarkdialog.ui b/sw/uiconfig/swriter/ui/watermarkdialog.ui index 316cd0c5d8bc..2edb38bf7f3a 100644 --- a/sw/uiconfig/swriter/ui/watermarkdialog.ui +++ b/sw/uiconfig/swriter/ui/watermarkdialog.ui @@ -62,7 +62,7 @@ <property name="expand">False</property> <property name="fill">True</property> <property name="pack_type">end</property> - <property name="position">0</property> + <property name="position">1</property> </packing> </child> <child> @@ -72,21 +72,6 @@ <property name="orientation">vertical</property> <property name="spacing">6</property> <child> - <object class="GtkCheckButton" id="EnableWatermarkCB"> - <property name="label" translatable="yes">Insert watermark</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> <object class="GtkGrid" id="TextGrid"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -210,14 +195,14 @@ <packing> <property name="expand">True</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">0</property> </packing> </child> </object> <packing> <property name="expand">True</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">0</property> </packing> </child> </object>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits