summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-10-05 16:33:45 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-10-05 17:20:01 +0200
commit751dacec8e0947c2d85187342995822e6dc62912 (patch)
tree343ef6f7b479f88d621759a938d2510991cbd196 /svx
parentf3905ac09a6f37615d1335c7d2d50bd00c07b920 (diff)
SvxHFPage: add UI for style::PageProperties::FirstIsShared
Change-Id: I76828a865751a8f29aeff40ccf7feb400692c43b
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/hdft.hxx1
-rw-r--r--svx/source/dialog/hdft.cxx24
-rw-r--r--svx/source/dialog/hdft.hrc1
-rw-r--r--svx/source/dialog/hdft.src58
4 files changed, 61 insertions, 23 deletions
diff --git a/svx/inc/svx/hdft.hxx b/svx/inc/svx/hdft.hxx
index 312f06e5ed6f..76fc43b27d6e 100644
--- a/svx/inc/svx/hdft.hxx
+++ b/svx/inc/svx/hdft.hxx
@@ -72,6 +72,7 @@ protected:
FixedLine aFrm;
CheckBox aTurnOnBox;
CheckBox aCntSharedBox;
+ CheckBox aCntSharedFirstBox;
FixedText aLMLbl;
MetricField aLMEdit;
FixedText aRMLbl;
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 50c92c7fc5bd..3dad1aef8ab0 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -171,6 +171,7 @@ SvxHFPage::SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rAtt
aFrm ( this, SVX_RES( FL_FRAME ) ),
aTurnOnBox ( this, SVX_RES( CB_TURNON ) ),
aCntSharedBox ( this, SVX_RES( CB_SHARED ) ),
+ aCntSharedFirstBox ( this, SVX_RES( CB_SHARED_FIRST ) ),
aLMLbl ( this, SVX_RES( FT_LMARGIN ) ),
aLMEdit ( this, SVX_RES( ED_LMARGIN ) ),
aRMLbl ( this, SVX_RES( FT_RMARGIN ) ),
@@ -207,6 +208,7 @@ SvxHFPage::SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rAtt
aTurnOnBox.SetAccessibleRelationMemberOf( &aFrm );
aCntSharedBox.SetAccessibleRelationMemberOf( &aFrm );
+ aCntSharedFirstBox.SetAccessibleRelationMemberOf( &aFrm );
aLMLbl.SetAccessibleRelationMemberOf( &aFrm );
aLMEdit.SetAccessibleRelationMemberOf( &aFrm );
aRMLbl.SetAccessibleRelationMemberOf( &aFrm );
@@ -267,7 +269,7 @@ sal_Bool SvxHFPage::FillItemSet( SfxItemSet& rSet )
aSet.Put( SfxBoolItem( nWOn, aTurnOnBox.IsChecked() ) );
aSet.Put( SfxBoolItem( nWDynamic, aHeightDynBtn.IsChecked() ) );
aSet.Put( SfxBoolItem( nWShared, aCntSharedBox.IsChecked() ) );
- aSet.Put( SfxBoolItem( nWSharedFirst, sal_True) );
+ aSet.Put( SfxBoolItem( nWSharedFirst, aCntSharedFirstBox.IsChecked() ) );
if(aDynSpacingCB.IsVisible() && SFX_WHICH_MAX > nWDynSpacing)
{
SfxBoolItem* pBoolItem = (SfxBoolItem*)pPool->GetDefaultItem(nWDynSpacing).Clone();
@@ -359,6 +361,9 @@ void SvxHFPage::Reset( const SfxItemSet& rSet )
(const SfxBoolItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_DYNAMIC ) );
const SfxBoolItem& rShared =
(const SfxBoolItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SHARED ) );
+ const SfxBoolItem* pSharedFirst = 0;
+ if (rHeaderSet.HasItem(GetWhich(SID_ATTR_PAGE_SHARED_FIRST)))
+ pSharedFirst = (const SfxBoolItem*)&rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SHARED_FIRST ) );
const SvxSizeItem& rSize =
(const SvxSizeItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) );
const SvxULSpaceItem& rUL =
@@ -388,6 +393,10 @@ void SvxHFPage::Reset( const SfxItemSet& rSet )
SetMetricValue( aLMEdit, rLR.GetLeft(), eUnit );
SetMetricValue( aRMEdit, rLR.GetRight(), eUnit );
aCntSharedBox.Check(rShared.GetValue());
+ if (pSharedFirst)
+ aCntSharedFirstBox.Check(pSharedFirst->GetValue());
+ else
+ aCntSharedFirstBox.Hide();
}
else
pSetItem = 0;
@@ -411,6 +420,7 @@ void SvxHFPage::Reset( const SfxItemSet& rSet )
aTurnOnBox.Check( sal_False );
aHeightDynBtn.Check( sal_True );
aCntSharedBox.Check( sal_True );
+ aCntSharedFirstBox.Check( sal_True );
}
TurnOnHdl(0);
@@ -477,7 +487,10 @@ IMPL_LINK( SvxHFPage, TurnOnHdl, CheckBox *, pBox )
if( nUsage == SVX_PAGE_RIGHT || nUsage == SVX_PAGE_LEFT )
aCntSharedBox.Disable();
else
+ {
aCntSharedBox.Enable();
+ aCntSharedFirstBox.Enable();
+ }
aBackgroundBtn.Enable();
}
else
@@ -747,7 +760,10 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
if ( SVX_PAGE_RIGHT == nUsage || SVX_PAGE_LEFT == nUsage )
aCntSharedBox.Disable();
else
+ {
aCntSharedBox.Enable();
+ aCntSharedFirstBox.Enable();
+ }
pItem = GetItem( rSet, SID_ATTR_PAGE_SIZE );
if ( pItem )
@@ -794,7 +810,10 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
aBspWin.SetHeader( sal_False );
if ( SID_ATTR_PAGE_HEADERSET == nId )
+ {
aCntSharedBox.Disable();
+ aCntSharedFirstBox.Disable();
+ }
}
pSetItem = 0;
@@ -831,7 +850,10 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
aBspWin.SetFooter( sal_False );
if ( SID_ATTR_PAGE_FOOTERSET == nId )
+ {
aCntSharedBox.Disable();
+ aCntSharedFirstBox.Disable();
+ }
}
pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 );
diff --git a/svx/source/dialog/hdft.hrc b/svx/source/dialog/hdft.hrc
index 572c60fb2fd5..7bed549b2dec 100644
--- a/svx/source/dialog/hdft.hrc
+++ b/svx/source/dialog/hdft.hrc
@@ -33,6 +33,7 @@
#define CB_SHARED 20
#define FL_FRAME 21
#define CB_DYNSPACING 22
+#define CB_SHARED_FIRST 23
#define WN_BSP 30
diff --git a/svx/source/dialog/hdft.src b/svx/source/dialog/hdft.src
index 4a9f90bbc94e..3658febc0c6f 100644
--- a/svx/source/dialog/hdft.src
+++ b/svx/source/dialog/hdft.src
@@ -57,9 +57,16 @@ TabPage RID_SVXPAGE_HEADER
Size = MAP_APPFONT ( 152 , 10 ) ;
Text [ en-US ] = "Same ~content left/right" ;
};
+ CheckBox CB_SHARED_FIRST
+ {
+ HelpID = "svx:CheckBox:RID_SVXPAGE_HEADER:CB_SHARED_FIRST";
+ Pos = MAP_APPFONT ( 12 , 46 ) ;
+ Size = MAP_APPFONT ( 152 , 10 ) ;
+ Text [ en-US ] = "Same content on first page" ;
+ };
FixedText FT_LMARGIN
{
- Pos = MAP_APPFONT ( 12 , 48 ) ;
+ Pos = MAP_APPFONT ( 12 , 64 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
_TEXT_FT_LMARGIN
Left = TRUE ;
@@ -68,7 +75,7 @@ TabPage RID_SVXPAGE_HEADER
{
HelpID = "svx:MetricField:RID_SVXPAGE_HEADER:ED_LMARGIN";
Border = TRUE ;
- Pos = MAP_APPFONT ( 124 , 46 ) ;
+ Pos = MAP_APPFONT ( 124 , 62 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
@@ -82,7 +89,7 @@ TabPage RID_SVXPAGE_HEADER
};
FixedText FT_RMARGIN
{
- Pos = MAP_APPFONT ( 12 , 64 ) ;
+ Pos = MAP_APPFONT ( 12 , 80 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
_TEXT_FT_RMARGIN
Left = TRUE ;
@@ -91,7 +98,7 @@ TabPage RID_SVXPAGE_HEADER
{
HelpID = "svx:MetricField:RID_SVXPAGE_HEADER:ED_RMARGIN";
Border = TRUE ;
- Pos = MAP_APPFONT ( 124 , 62 ) ;
+ Pos = MAP_APPFONT ( 124 , 78 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
@@ -106,7 +113,7 @@ TabPage RID_SVXPAGE_HEADER
FixedText FT_DIST
{
- Pos = MAP_APPFONT ( 12 , 82 ) ;
+ Pos = MAP_APPFONT ( 12 , 98 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
Text [ en-US ] = "~Spacing" ;
};
@@ -115,7 +122,7 @@ TabPage RID_SVXPAGE_HEADER
HelpID = "svx:MetricField:RID_SVXPAGE_HEADER:ED_DIST";
Disable = TRUE ;
Border = TRUE ;
- Pos = MAP_APPFONT ( 124 , 80 ) ;
+ Pos = MAP_APPFONT ( 124 , 96 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
@@ -129,14 +136,14 @@ TabPage RID_SVXPAGE_HEADER
CheckBox CB_DYNSPACING
{
HelpID = "svx:CheckBox:RID_SVXPAGE_HEADER:CB_DYNSPACING";
- Pos = MAP_APPFONT ( 12 , 96 ) ;
+ Pos = MAP_APPFONT ( 12 , 112 ) ;
Size = MAP_APPFONT ( 152 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "Use d~ynamic spacing" ;
};
FixedText FT_HEIGHT
{
- Pos = MAP_APPFONT ( 12 , 98 ) ;
+ Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
Text [ en-US ] = "~Height" ;
};
@@ -145,7 +152,7 @@ TabPage RID_SVXPAGE_HEADER
HelpID = "svx:MetricField:RID_SVXPAGE_HEADER:ED_HEIGHT";
Disable = TRUE ;
Border = TRUE ;
- Pos = MAP_APPFONT ( 124 , 96 ) ;
+ Pos = MAP_APPFONT ( 124 , 112 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
@@ -161,7 +168,7 @@ TabPage RID_SVXPAGE_HEADER
CheckBox CB_HEIGHT_DYN
{
HelpID = "svx:CheckBox:RID_SVXPAGE_HEADER:CB_HEIGHT_DYN";
- Pos = MAP_APPFONT ( 12 , 112 ) ;
+ Pos = MAP_APPFONT ( 12 , 128 ) ;
Size = MAP_APPFONT ( 152 , 10 ) ;
Text [ en-US ] = "~AutoFit height" ;
};
@@ -179,7 +186,7 @@ TabPage RID_SVXPAGE_HEADER
PushButton BTN_EXTRAS
{
HelpID = "svx:PushButton:RID_SVXPAGE_HEADER:BTN_EXTRAS";
- Pos = MAP_APPFONT ( 12 , 130 ) ;
+ Pos = MAP_APPFONT ( 12 , 146 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~More..." ;
};
@@ -205,9 +212,16 @@ TabPage RID_SVXPAGE_FOOTER
Size = MAP_APPFONT ( 152 , 10 ) ;
Text [ en-US ] = "Same ~content left/right" ;
};
+ CheckBox CB_SHARED_FIRST
+ {
+ HelpID = "svx:CheckBox:RID_SVXPAGE_FOOTER:CB_SHARED_FIRST";
+ Pos = MAP_APPFONT ( 12 , 46 ) ;
+ Size = MAP_APPFONT ( 152 , 10 ) ;
+ Text [ en-US ] = "Same content on first page" ;
+ };
FixedText FT_LMARGIN
{
- Pos = MAP_APPFONT ( 12 , 48 ) ;
+ Pos = MAP_APPFONT ( 12 , 64 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
Left = TRUE ;
_TEXT_FT_LMARGIN
@@ -216,7 +230,7 @@ TabPage RID_SVXPAGE_FOOTER
{
HelpID = "svx:MetricField:RID_SVXPAGE_FOOTER:ED_LMARGIN";
Border = TRUE ;
- Pos = MAP_APPFONT ( 124 , 46 ) ;
+ Pos = MAP_APPFONT ( 124 , 62 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
@@ -230,7 +244,7 @@ TabPage RID_SVXPAGE_FOOTER
};
FixedText FT_RMARGIN
{
- Pos = MAP_APPFONT ( 12 , 64 ) ;
+ Pos = MAP_APPFONT ( 12 , 80 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
_TEXT_FT_RMARGIN
Left = TRUE ;
@@ -239,7 +253,7 @@ TabPage RID_SVXPAGE_FOOTER
{
HelpID = "svx:MetricField:RID_SVXPAGE_FOOTER:ED_RMARGIN";
Border = TRUE ;
- Pos = MAP_APPFONT ( 124 , 62 ) ;
+ Pos = MAP_APPFONT ( 124 , 78 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
@@ -253,7 +267,7 @@ TabPage RID_SVXPAGE_FOOTER
};
FixedText FT_DIST
{
- Pos = MAP_APPFONT ( 12 , 82 ) ;
+ Pos = MAP_APPFONT ( 12 , 98 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
Text [ en-US ] = "~Spacing" ;
};
@@ -262,7 +276,7 @@ TabPage RID_SVXPAGE_FOOTER
HelpID = "svx:MetricField:RID_SVXPAGE_FOOTER:ED_DIST";
Disable = TRUE ;
Border = TRUE ;
- Pos = MAP_APPFONT ( 124 , 80 ) ;
+ Pos = MAP_APPFONT ( 124 , 96 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
@@ -276,14 +290,14 @@ TabPage RID_SVXPAGE_FOOTER
CheckBox CB_DYNSPACING
{
HelpID = "svx:CheckBox:RID_SVXPAGE_FOOTER:CB_DYNSPACING";
- Pos = MAP_APPFONT ( 12 , 96 ) ;
+ Pos = MAP_APPFONT ( 12 , 112 ) ;
Size = MAP_APPFONT ( 152 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "Use d~ynamic spacing" ;
};
FixedText FT_HEIGHT
{
- Pos = MAP_APPFONT ( 12 , 98 ) ;
+ Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
Disable = TRUE ;
Text [ en-US ] = "~Height" ;
@@ -293,7 +307,7 @@ TabPage RID_SVXPAGE_FOOTER
HelpID = "svx:MetricField:RID_SVXPAGE_FOOTER:ED_HEIGHT";
Disable = TRUE ;
Border = TRUE ;
- Pos = MAP_APPFONT ( 124 , 96 ) ;
+ Pos = MAP_APPFONT ( 124 , 112 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
@@ -309,7 +323,7 @@ TabPage RID_SVXPAGE_FOOTER
CheckBox CB_HEIGHT_DYN
{
HelpID = "svx:CheckBox:RID_SVXPAGE_FOOTER:CB_HEIGHT_DYN";
- Pos = MAP_APPFONT ( 12 , 112 ) ;
+ Pos = MAP_APPFONT ( 12 , 128 ) ;
Size = MAP_APPFONT ( 152 , 10 ) ;
Text [ en-US ] = "~AutoFit height" ;
};
@@ -328,7 +342,7 @@ TabPage RID_SVXPAGE_FOOTER
PushButton BTN_EXTRAS
{
HelpID = "svx:PushButton:RID_SVXPAGE_FOOTER:BTN_EXTRAS";
- Pos = MAP_APPFONT ( 12 , 130 ) ;
+ Pos = MAP_APPFONT ( 12 , 146 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~More..." ;
};