diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-10 11:31:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-10 16:16:11 +0000 |
commit | 735f3a94b92ac93d11f66c3a86edc42e1915b337 (patch) | |
tree | 32f255b658d2785d8c1edc4c67f38aea86a762fa | |
parent | 7546afda22e2af40e45b533f17bd8aeaacaa100a (diff) |
Related: fdo#85111 put a box around xml filter settings control
and writer->insert->table->autoformat
and calc->data->consolidate
and calc->insert->sheet
Change-Id: I7c89d9f01747a00b906afe3c762b747df6872869
-rw-r--r-- | filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 39 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltersettingsdialog.hxx | 12 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/consolidatedialog.ui | 42 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/insertsheet.ui | 23 | ||||
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 14 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/autoformattable.ui | 2 |
6 files changed, 104 insertions, 28 deletions
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 4c715e589b33..e3deef39b010 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1337,23 +1337,36 @@ OUString getApplicationUIName( const OUString& rServiceName ) } SvxPathControl::SvxPathControl(vcl::Window* pParent) - : VclVBox(pParent) + : Window(pParent, WB_HIDE | WB_CLIPCHILDREN | WB_TABSTOP | WB_DIALOGCONTROL | WB_BORDER) , bHasBeenShown(false) { - m_pHeaderBar = new HeaderBar(this, WB_BOTTOMBORDER); + m_pVBox = new VclVBox(this); + + m_pHeaderBar = new HeaderBar(m_pVBox, WB_BOTTOMBORDER); m_pHeaderBar->set_height_request(GetTextHeight() + 6); - m_pFocusCtrl = new XMLFilterListBox(this); + m_pFocusCtrl = new XMLFilterListBox(m_pVBox, this); m_pFocusCtrl->set_fill(true); m_pFocusCtrl->set_expand(true); + + m_pVBox->set_hexpand(true); + m_pVBox->set_vexpand(true); + m_pVBox->set_expand(true); + m_pVBox->set_fill(true); + m_pVBox->Show(); } #define ITEMID_NAME 1 #define ITEMID_TYPE 2 -void SvxPathControl::setAllocation(const Size &rAllocation) +void SvxPathControl::Resize() { - VclVBox::setAllocation(rAllocation); + Window::Resize(); + + if (!m_pVBox) + return; + + m_pVBox->SetSizePixel(GetSizePixel()); if (!bHasBeenShown) bHasBeenShown = IsReallyShown(); @@ -1362,6 +1375,11 @@ void SvxPathControl::setAllocation(const Size &rAllocation) { std::vector<long> aWidths; m_pFocusCtrl->getPreferredDimensions(aWidths); + if (aWidths.empty()) + { + bHasBeenShown = false; + return; + } long nFirstColumnWidth = aWidths[1]; m_pHeaderBar->SetItemSize(ITEMID_NAME, nFirstColumnWidth); m_pHeaderBar->SetItemSize(ITEMID_TYPE, 0xFFFF); @@ -1370,6 +1388,11 @@ void SvxPathControl::setAllocation(const Size &rAllocation) } } +Size SvxPathControl::GetOptimalSize() const +{ + return m_pVBox->GetOptimalSize(); +} + SvxPathControl::~SvxPathControl() { delete m_pFocusCtrl; @@ -1383,7 +1406,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxPathControl(vcl::Wi bool SvxPathControl::Notify(NotifyEvent& rNEvt) { - bool nRet = VclVBox::Notify(rNEvt); + bool nRet = Window::Notify(rNEvt); if ( m_pFocusCtrl && rNEvt.GetWindow() != m_pFocusCtrl && rNEvt.GetType() == EVENT_GETFOCUS ) m_pFocusCtrl->GrabFocus(); @@ -1391,10 +1414,10 @@ bool SvxPathControl::Notify(NotifyEvent& rNEvt) return nRet; } -XMLFilterListBox::XMLFilterListBox(SvxPathControl* pParent) +XMLFilterListBox::XMLFilterListBox(Window* pParent, SvxPathControl* pPathControl) : SvTabListBox(pParent, WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP) , mbFirstPaint(true) - , m_pHeaderBar(pParent->getHeaderBar()) + , m_pHeaderBar(pPathControl->getHeaderBar()) { Size aBoxSize( pParent->GetOutputSizePixel() ); diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx index 6ed617fd40de..cfa47e8d0671 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx @@ -32,19 +32,19 @@ #include "xmlfiltercommon.hxx" - - class HeaderBar; class XMLFilterListBox; -class SvxPathControl : public VclVBox +class SvxPathControl : public vcl::Window { private: bool bHasBeenShown; + VclVBox* m_pVBox; HeaderBar* m_pHeaderBar; XMLFilterListBox* m_pFocusCtrl; protected: - virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE; + virtual void Resize() SAL_OVERRIDE; + virtual Size GetOptimalSize() const SAL_OVERRIDE; public: SvxPathControl(vcl::Window* pParent); HeaderBar* getHeaderBar() { return m_pHeaderBar; } @@ -54,8 +54,6 @@ public: virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; }; - - class HeaderBar; class XMLFilterListBox : public SvTabListBox @@ -70,7 +68,7 @@ private: OUString getEntryString( const filter_info_impl* pInfo ) const; public: - XMLFilterListBox(SvxPathControl* pParent); + XMLFilterListBox(Window* pParent, SvxPathControl* pPathControl); /** adds a new filter info entry to the ui filter list */ void addFilterEntry( const filter_info_impl* pInfo ); diff --git a/sc/uiconfig/scalc/ui/consolidatedialog.ui b/sc/uiconfig/scalc/ui/consolidatedialog.ui index 920edb860b88..deec922eaf27 100644 --- a/sc/uiconfig/scalc/ui/consolidatedialog.ui +++ b/sc/uiconfig/scalc/ui/consolidatedialog.ui @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.16.1 --> <interface> <requires lib="gtk+" version="3.0"/> - <requires lib="LibreOffice" version="1.0"/> + <!-- interface-requires LibreOffice 1.0 --> <object class="GtkDialog" id="ConsolidateDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> @@ -95,6 +95,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -105,11 +107,13 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Consolidation ranges:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">consareas</property> + <property name="mnemonic_widget">consareas:border</property> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -134,10 +138,12 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> - <object class="GtkTreeView" id="consareas"> + <object class="GtkTreeView" id="consareas:border"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> @@ -151,6 +157,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> @@ -181,6 +189,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -194,6 +204,8 @@ <packing> <property name="left_attach">1</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -208,12 +220,16 @@ <packing> <property name="left_attach">2</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -232,6 +248,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -245,6 +263,8 @@ <packing> <property name="left_attach">1</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -259,12 +279,16 @@ <packing> <property name="left_attach">2</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -308,6 +332,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">4</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -322,6 +348,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -336,6 +364,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> @@ -396,6 +426,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -412,6 +444,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> diff --git a/sc/uiconfig/scalc/ui/insertsheet.ui b/sc/uiconfig/scalc/ui/insertsheet.ui index a156e9ef1475..453cd579c27e 100644 --- a/sc/uiconfig/scalc/ui/insertsheet.ui +++ b/sc/uiconfig/scalc/ui/insertsheet.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.16.1 --> <interface> <requires lib="gtk+" version="3.0"/> <object class="GtkAdjustment" id="adjustment1"> @@ -231,6 +231,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -245,6 +247,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -258,6 +262,8 @@ <packing> <property name="left_attach">1</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -272,6 +278,8 @@ <packing> <property name="left_attach">1</property> <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> @@ -338,6 +346,7 @@ <property name="left_attach">0</property> <property name="top_attach">1</property> <property name="width">2</property> + <property name="height">1</property> </packing> </child> <child> @@ -348,7 +357,7 @@ <property name="vexpand">True</property> <property name="shadow_type">in</property> <child> - <object class="GtkTreeView" id="tables"> + <object class="GtkTreeView" id="tables:border"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> @@ -359,7 +368,7 @@ </object> </child> <child internal-child="accessible"> - <object class="AtkObject" id="tables-atkobject"> + <object class="AtkObject" id="tables:border-atkobject"> <property name="AtkObject::accessible-name" translatable="yes">Tables in file</property> </object> </child> @@ -369,6 +378,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -387,6 +398,8 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> <child> @@ -404,12 +417,16 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> <packing> <property name="left_attach">1</property> <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> </packing> </child> </object> diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index fc85c65822b4..0c1a1a1d17bf 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -47,7 +47,7 @@ using namespace com::sun::star; class AutoFmtPreview : public vcl::Window { public: - AutoFmtPreview(vcl::Window* pParent); + AutoFmtPreview(vcl::Window* pParent, WinBits nStyle); virtual ~AutoFmtPreview(); void NotifyChange( const SwTableAutoFmt& rNewData ); @@ -486,8 +486,8 @@ IMPL_LINK_NOARG_INLINE_START(SwAutoFormatDlg, OkHdl) } IMPL_LINK_NOARG_INLINE_END(SwAutoFormatDlg, OkHdl) -AutoFmtPreview::AutoFmtPreview(vcl::Window* pParent) : - Window ( pParent ), +AutoFmtPreview::AutoFmtPreview(vcl::Window* pParent, WinBits nStyle) : + Window ( pParent, nStyle ), aCurData ( OUString() ), aVD ( *this ), aScriptedText ( aVD ), @@ -508,9 +508,13 @@ AutoFmtPreview::AutoFmtPreview(vcl::Window* pParent) : Init(); } -extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeAutoFmtPreview(vcl::Window *pParent, VclBuilder::stringmap &) +extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeAutoFmtPreview(vcl::Window *pParent, VclBuilder::stringmap &rMap) { - return new AutoFmtPreview(pParent); + WinBits nWinStyle = 0; + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinStyle |= WB_BORDER; + return new AutoFmtPreview(pParent, nWinStyle); } void AutoFmtPreview::Resize() diff --git a/sw/uiconfig/swriter/ui/autoformattable.ui b/sw/uiconfig/swriter/ui/autoformattable.ui index dcfc1bd6cbbe..9855f081e9be 100644 --- a/sw/uiconfig/swriter/ui/autoformattable.ui +++ b/sw/uiconfig/swriter/ui/autoformattable.ui @@ -158,7 +158,7 @@ <property name="can_focus">True</property> <property name="shadow_type">in</property> <child> - <object class="GtkTreeView" id="formatlb"> + <object class="GtkTreeView" id="formatlb:border"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="vexpand">True</property> |