diff options
author | Susobhan Ghosh <susobhang70@gmail.com> | 2016-08-12 16:22:30 +0530 |
---|---|---|
committer | Yousuf Philips <philipz85@hotmail.com> | 2016-08-13 09:24:24 +0000 |
commit | 6f9f401c94f7381880659a7641396c8173fcce6f (patch) | |
tree | a8e49724310f85dc35e2bfad28f19cddec3add52 | |
parent | 5d7a9281270120a1f34dc0c11ecad2019362f0fd (diff) |
tdf#83830: Tweaks to page header and footer panels
Change-Id: I79b92b39ec1448a662463fb2dcf68fc71509edfb
Reviewed-on: https://gerrit.libreoffice.org/28076
Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
Tested-by: Yousuf Philips <philipz85@hotmail.com>
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 20 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/pageheaderpanel.ui | 73 |
2 files changed, 42 insertions, 51 deletions
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 4ec653074d3b..9eafba95cd2b 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -1028,8 +1028,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const SfxInt16Item& aLayoutItem = static_cast<const SfxInt16Item&>(pReqArgs->Get(SID_ATTR_PAGE_HEADER_LAYOUT)); sal_uInt16 nLayout = aLayoutItem.GetValue(); SwPageDesc aDesc(rDesc); - aDesc.ChgHeaderShare((nLayout>>1) == 1); - aDesc.ChgFirstShare((nLayout % 2) == 1); // FIXME control changes for both header footer - tdf#100287 + aDesc.ChgHeaderShare((nLayout>>1) == 0); + aDesc.ChgFirstShare((nLayout % 2) == 0); // FIXME control changes for both header footer - tdf#100287 rSh.ChgPageDesc(rSh.GetCurPageDesc(), aDesc); } } @@ -1081,8 +1081,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) const SfxInt16Item& aLayoutItem = static_cast<const SfxInt16Item&>(pReqArgs->Get(SID_ATTR_PAGE_FOOTER_LAYOUT)); sal_uInt16 nLayout = aLayoutItem.GetValue(); SwPageDesc aDesc(rDesc); - aDesc.ChgFooterShare((nLayout>>1) == 1); - aDesc.ChgFirstShare((nLayout % 2) == 1); // FIXME control changes for both header footer - tdf#100287 + aDesc.ChgFooterShare((nLayout>>1) == 0); + aDesc.ChgFirstShare((nLayout % 2) == 0); // FIXME control changes for both header footer - tdf#100287 rSh.ChgPageDesc(rSh.GetCurPageDesc(), aDesc); } } @@ -2234,9 +2234,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) SvxLongULSpaceItem aUL( rUL->GetUpper(), rUL->GetLower(), SID_ATTR_PAGE_HEADER_SPACING); rSet.Put(aUL); - bool rShared = rDesc.IsHeaderShared(); - bool rFirst = rDesc.IsFirstShared(); // FIXME control changes for both header footer - tdf#100287 - sal_uInt16 nLayout = ((int)rShared<<1) + (int)rFirst; + bool bShared = !rDesc.IsHeaderShared(); + bool bFirst = !rDesc.IsFirstShared(); // FIXME control changes for both header footer - tdf#100287 + sal_uInt16 nLayout = ((int)bShared<<1) + (int)bFirst; SfxInt16Item aLayoutItem(SID_ATTR_PAGE_HEADER_LAYOUT, nLayout); rSet.Put(aLayoutItem); } @@ -2259,9 +2259,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) SvxLongULSpaceItem aUL( rUL->GetUpper(), rUL->GetLower(), SID_ATTR_PAGE_FOOTER_SPACING); rSet.Put(aUL); - bool rShared = rDesc.IsFooterShared(); - bool rFirst = rDesc.IsFirstShared(); // FIXME control changes for both header footer - tdf#100287 - sal_uInt16 nLayout = ((int)rShared<<1) + (int)rFirst; + bool bShared = !rDesc.IsFooterShared(); + bool bFirst = !rDesc.IsFirstShared(); // FIXME control changes for both header footer - tdf#100287 + sal_uInt16 nLayout = ((int)bShared<<1) + (int)bFirst; SfxInt16Item aLayoutItem(SID_ATTR_PAGE_FOOTER_LAYOUT, nLayout); rSet.Put(aLayoutItem); } diff --git a/sw/uiconfig/swriter/ui/pageheaderpanel.ui b/sw/uiconfig/swriter/ui/pageheaderpanel.ui index cd4d1203acde..90bfb4fb405a 100644 --- a/sw/uiconfig/swriter/ui/pageheaderpanel.ui +++ b/sw/uiconfig/swriter/ui/pageheaderpanel.ui @@ -77,10 +77,12 @@ </packing> </child> <child> - <object class="GtkLabel" id="samecontent"> + <object class="GtkLabel" id="margins"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Same Content:</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes">Margins:</property> </object> <packing> <property name="expand">False</property> @@ -92,95 +94,84 @@ <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> - <object class="GtkLabel" id="margins"> - <property name="visible">True</property> + <object class="GtkLabel" id="customlabel"> <property name="can_focus">False</property> - <property name="label" translatable="yes">Margins:</property> + <property name="label" translatable="yes">Custom</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="left_attach">1</property> + <property name="top_attach">3</property> </packing> </child> <child> <object class="GtkLabel" id="spacing"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">end</property> <property name="label" translatable="yes">Spacing:</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> + <property name="top_attach">1</property> </packing> </child> <child> - <object class="GtkComboBox" id="spacingpreset"> + <object class="GtkLabel" id="samecontent"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="tooltip_markup" translatable="yes">Set the amount of space between the image and surrounding text</property> - <property name="tooltip_text" translatable="yes">Set the amount of space between the image and surrounding text</property> - <property name="model">spacinglist</property> + <property name="halign">end</property> + <property name="label" translatable="yes">Same Content:</property> </object> <packing> - <property name="left_attach">1</property> + <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> - <object class="GtkComboBoxText" id="samecontentLB"> + <object class="GtkComboBox" id="headermarginpreset"> + <property name="width_request">150</property> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="hexpand">True</property> - <items> - <item translatable="yes">First & Left/Right</item> - <item translatable="yes">Left/Right</item> - <item translatable="yes">First Page</item> - <item translatable="yes">All Pages</item> - </items> + <property name="halign">end</property> + <property name="model">spacinglist</property> </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> <child> - <object class="GtkComboBox" id="headermarginpreset"> + <object class="GtkComboBox" id="spacingpreset"> + <property name="width_request">150</property> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="tooltip_markup" translatable="yes">Set the amount of space between the image and surrounding text</property> - <property name="tooltip_text" translatable="yes">Set the amount of space between the image and surrounding text</property> + <property name="halign">end</property> <property name="model">spacinglist</property> </object> <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> <child> - <object class="GtkLabel" id="customlabel"> + <object class="GtkComboBoxText" id="samecontentLB"> + <property name="width_request">150</property> + <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Custom</property> + <property name="halign">end</property> + <items> + <item translatable="yes">All Pages</item> + <item translatable="yes">First Page</item> + <item translatable="yes">Left and Right Pages</item> + <item translatable="yes">First, Left and Right Pages</item> + </items> </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="top_attach">2</property> </packing> </child> <child> |