summaryrefslogtreecommitdiff
path: root/sw/source/ui/index
diff options
context:
space:
mode:
authoros <os@openoffice.org>2010-11-01 10:25:54 +0100
committeros <os@openoffice.org>2010-11-01 10:25:54 +0100
commit78025b3f492e6d3b7afdf261728d74e7c00ce2d5 (patch)
tree9b655ec2c0bdb052bf12e48a6a4618e438e98afc /sw/source/ui/index
parent8409cfd0c4842fae1e087f8c932748f9305871a8 (diff)
parent3d5ad5eea711f9f4c70f537be81218c3d3729cd8 (diff)
rebase to m91
Diffstat (limited to 'sw/source/ui/index')
-rw-r--r--sw/source/ui/index/cnttab.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index a8a01a4f8222..1ca094786a93 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1523,6 +1523,18 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox)
//aAddStylesPB.SetPosPixel(aPos);
//}
//else if( nType & TO_ILLUSTRATION )//<-removed end.
+ // initialize button positions
+
+ //#i111993# add styles button has two different positions
+ if( !aAddStylesPosDef.X() )
+ {
+ aAddStylesPosDef = ( aAddStylesPB.GetPosPixel() );
+ // move left!
+ Point aPos(aAddStylesPosDef);
+ aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width();
+ aAddStylesPosUser = aPos;
+ }
+
if( nType & TO_ILLUSTRATION ) //add by zhaojianwei
aCaptionSequenceLB.SelectEntry( SwStyleNameMapper::GetUIName(
RES_POOLCOLL_LABEL_ABB, aEmptyStr ));
@@ -1532,11 +1544,11 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox)
else if( nType & TO_USER )
{
aAddStylesCB.SetText(sAddStyleUser);
- // move left!
- Point aPos(aAddStylesPB.GetPosPixel());
- // aPos.X() = aChapterDlgPB.GetPosPixel().X();
- aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width();
- aAddStylesPB.SetPosPixel(aPos);
+ aAddStylesPB.SetPosPixel(aAddStylesPosUser);
+ }
+ else if( nType & TO_CONTENT )
+ {
+ aAddStylesPB.SetPosPixel(aAddStylesPosDef);
}
aCollectSameCB.Show( 0 != (nType & TO_INDEX) );