summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRishabh Kumar <kris.kr296@gmail.com>2016-08-05 17:57:49 +0530
committerRishabh Kumar <kris.kr296@yahoo.in>2016-08-05 18:19:40 +0000
commit5693ee7a41fbe4de337cef3b10294edd670be804 (patch)
tree67822b5ba4f5403d7824f2d86581b38203fe1ea6
parentecba128020572966a161899083b7147e2adc5766 (diff)
[GSoC] Add Transparency tab to background dialog
Change-Id: I33dffe2435c44116842240e4b481947415317b5b Reviewed-on: https://gerrit.libreoffice.org/27906 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> Reviewed-by: Rishabh Kumar <kris.kr296@yahoo.in>
-rw-r--r--sd/source/ui/dlg/dlgpage.cxx10
-rw-r--r--sd/source/ui/inc/dlgpage.hxx2
-rw-r--r--sd/uiconfig/sdraw/ui/drawpagedialog.ui15
3 files changed, 26 insertions, 1 deletions
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx
index bba44fd63aed..e23b8328b49b 100644
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -62,9 +62,13 @@ SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SfxIte
mnPage = AddTabPage( "RID_SVXPAGE_PAGE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), nullptr );
mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr );
+ mnTransparence = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), nullptr );
if(!bAreaPage) // I have to add the page before I remove it !
+ {
RemoveTabPage( "RID_SVXPAGE_AREA" );
+ RemoveTabPage( "RID_SVXPAGE_TRANSPARENCE" );
+ }
}
void SdPageDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
@@ -89,6 +93,12 @@ void SdPageDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0));
rPage.PageCreated(aSet);
}
+ else if (nId == mnTransparence)
+ {
+ aSet.Put(SfxUInt16Item(SID_PAGE_TYPE,0));
+ aSet.Put(SfxUInt16Item(SID_DLG_TYPE,1));
+ rPage.PageCreated(aSet);
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/dlgpage.hxx b/sd/source/ui/inc/dlgpage.hxx
index c624ecb5ea87..4818c66ce19a 100644
--- a/sd/source/ui/inc/dlgpage.hxx
+++ b/sd/source/ui/inc/dlgpage.hxx
@@ -40,7 +40,7 @@ private:
XPatternListRef mpPatternList;
sal_uInt16 mnArea;
sal_uInt16 mnPage;
-
+ sal_uInt16 mnTransparence;
public:
SdPageDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage = true );
diff --git a/sd/uiconfig/sdraw/ui/drawpagedialog.ui b/sd/uiconfig/sdraw/ui/drawpagedialog.ui
index f43e40656cb3..087cc4b63c44 100644
--- a/sd/uiconfig/sdraw/ui/drawpagedialog.ui
+++ b/sd/uiconfig/sdraw/ui/drawpagedialog.ui
@@ -99,6 +99,7 @@
<property name="label" translatable="yes">Page</property>
</object>
<packing>
+ <property name="position">0</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -116,6 +117,20 @@
<property name="tab_fill">False</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="RID_SVXPAGE_TRANSPARENCE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Transparency</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>