diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-05-23 11:29:43 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2017-06-01 08:10:18 +0200 |
commit | eb4f3c80ed695a7f0452b3c5c313750c51c962a5 (patch) | |
tree | 58c9bef9f1b9adab63e25d3b1803699b5943ed27 | |
parent | 489597d339af14a6403ee079bea35908112720ec (diff) |
Watermark: remove enable checkbox
Change-Id: Ic18b85070bf6c5c3e9678859a87cb9f44411533b
-rw-r--r-- | sw/source/uibase/dialog/watermarkdialog.cxx | 23 | ||||
-rw-r--r-- | sw/source/uibase/inc/watermarkdialog.hxx | 4 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/watermarkdialog.ui | 21 |
3 files changed, 4 insertions, 44 deletions
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> |