Kaydet (Commit) 6f9f401c authored tarafından Susobhan Ghosh's avatar Susobhan Ghosh Kaydeden (comit) Yousuf Philips

tdf#83830: Tweaks to page header and footer panels

Change-Id: I79b92b39ec1448a662463fb2dcf68fc71509edfb
Reviewed-on: https://gerrit.libreoffice.org/28076Reviewed-by: 's avatarYousuf Philips <philipz85@hotmail.com>
Tested-by: 's avatarYousuf Philips <philipz85@hotmail.com>
üst 5d7a9281
...@@ -1028,8 +1028,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) ...@@ -1028,8 +1028,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SfxInt16Item& aLayoutItem = static_cast<const SfxInt16Item&>(pReqArgs->Get(SID_ATTR_PAGE_HEADER_LAYOUT)); const SfxInt16Item& aLayoutItem = static_cast<const SfxInt16Item&>(pReqArgs->Get(SID_ATTR_PAGE_HEADER_LAYOUT));
sal_uInt16 nLayout = aLayoutItem.GetValue(); sal_uInt16 nLayout = aLayoutItem.GetValue();
SwPageDesc aDesc(rDesc); SwPageDesc aDesc(rDesc);
aDesc.ChgHeaderShare((nLayout>>1) == 1); aDesc.ChgHeaderShare((nLayout>>1) == 0);
aDesc.ChgFirstShare((nLayout % 2) == 1); // FIXME control changes for both header footer - tdf#100287 aDesc.ChgFirstShare((nLayout % 2) == 0); // FIXME control changes for both header footer - tdf#100287
rSh.ChgPageDesc(rSh.GetCurPageDesc(), aDesc); rSh.ChgPageDesc(rSh.GetCurPageDesc(), aDesc);
} }
} }
...@@ -1081,8 +1081,8 @@ void SwView::ExecTabWin( SfxRequest& rReq ) ...@@ -1081,8 +1081,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SfxInt16Item& aLayoutItem = static_cast<const SfxInt16Item&>(pReqArgs->Get(SID_ATTR_PAGE_FOOTER_LAYOUT)); const SfxInt16Item& aLayoutItem = static_cast<const SfxInt16Item&>(pReqArgs->Get(SID_ATTR_PAGE_FOOTER_LAYOUT));
sal_uInt16 nLayout = aLayoutItem.GetValue(); sal_uInt16 nLayout = aLayoutItem.GetValue();
SwPageDesc aDesc(rDesc); SwPageDesc aDesc(rDesc);
aDesc.ChgFooterShare((nLayout>>1) == 1); aDesc.ChgFooterShare((nLayout>>1) == 0);
aDesc.ChgFirstShare((nLayout % 2) == 1); // FIXME control changes for both header footer - tdf#100287 aDesc.ChgFirstShare((nLayout % 2) == 0); // FIXME control changes for both header footer - tdf#100287
rSh.ChgPageDesc(rSh.GetCurPageDesc(), aDesc); rSh.ChgPageDesc(rSh.GetCurPageDesc(), aDesc);
} }
} }
...@@ -2234,9 +2234,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) ...@@ -2234,9 +2234,9 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxLongULSpaceItem aUL( rUL->GetUpper(), rUL->GetLower(), SID_ATTR_PAGE_HEADER_SPACING); SvxLongULSpaceItem aUL( rUL->GetUpper(), rUL->GetLower(), SID_ATTR_PAGE_HEADER_SPACING);
rSet.Put(aUL); rSet.Put(aUL);
bool rShared = rDesc.IsHeaderShared(); bool bShared = !rDesc.IsHeaderShared();
bool rFirst = rDesc.IsFirstShared(); // FIXME control changes for both header footer - tdf#100287 bool bFirst = !rDesc.IsFirstShared(); // FIXME control changes for both header footer - tdf#100287
sal_uInt16 nLayout = ((int)rShared<<1) + (int)rFirst; sal_uInt16 nLayout = ((int)bShared<<1) + (int)bFirst;
SfxInt16Item aLayoutItem(SID_ATTR_PAGE_HEADER_LAYOUT, nLayout); SfxInt16Item aLayoutItem(SID_ATTR_PAGE_HEADER_LAYOUT, nLayout);
rSet.Put(aLayoutItem); rSet.Put(aLayoutItem);
} }
...@@ -2259,9 +2259,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) ...@@ -2259,9 +2259,9 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxLongULSpaceItem aUL( rUL->GetUpper(), rUL->GetLower(), SID_ATTR_PAGE_FOOTER_SPACING); SvxLongULSpaceItem aUL( rUL->GetUpper(), rUL->GetLower(), SID_ATTR_PAGE_FOOTER_SPACING);
rSet.Put(aUL); rSet.Put(aUL);
bool rShared = rDesc.IsFooterShared(); bool bShared = !rDesc.IsFooterShared();
bool rFirst = rDesc.IsFirstShared(); // FIXME control changes for both header footer - tdf#100287 bool bFirst = !rDesc.IsFirstShared(); // FIXME control changes for both header footer - tdf#100287
sal_uInt16 nLayout = ((int)rShared<<1) + (int)rFirst; sal_uInt16 nLayout = ((int)bShared<<1) + (int)bFirst;
SfxInt16Item aLayoutItem(SID_ATTR_PAGE_FOOTER_LAYOUT, nLayout); SfxInt16Item aLayoutItem(SID_ATTR_PAGE_FOOTER_LAYOUT, nLayout);
rSet.Put(aLayoutItem); rSet.Put(aLayoutItem);
} }
......
...@@ -77,10 +77,12 @@ ...@@ -77,10 +77,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="samecontent"> <object class="GtkLabel" id="margins">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</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> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -92,95 +94,84 @@ ...@@ -92,95 +94,84 @@
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="margins"> <object class="GtkLabel" id="customlabel">
<property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Margins:</property> <property name="label" translatable="yes">Custom</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">1</property>
<property name="top_attach">1</property> <property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="spacing"> <object class="GtkLabel" id="spacing">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Spacing:</property> <property name="label" translatable="yes">Spacing:</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">2</property> <property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox" id="spacingpreset"> <object class="GtkLabel" id="samecontent">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</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="halign">end</property>
<property name="tooltip_text" translatable="yes">Set the amount of space between the image and surrounding text</property> <property name="label" translatable="yes">Same Content:</property>
<property name="model">spacinglist</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">0</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<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="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property> <property name="halign">end</property>
<items> <property name="model">spacinglist</property>
<item translatable="yes">First &amp; Left/Right</item>
<item translatable="yes">Left/Right</item>
<item translatable="yes">First Page</item>
<item translatable="yes">All Pages</item>
</items>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<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="visible">True</property>
<property name="can_focus">False</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="halign">end</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="model">spacinglist</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<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="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> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">3</property> <property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment