[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Jan 18 20:44:46 PST 2012


 sc/source/ui/optdlg/tpdefaults.cxx |   11 +++++++++++
 sc/source/ui/src/optdlg.src        |    4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 1817746ceb22329f0291acc5f6bb9c2a7d7a7fe4
Author: Andras Timar <atimar at suse.com>
Date:   Wed Jan 18 23:48:43 2012 +0100

    fdo#44896 accomodate localized text expansion
    
    Signed-off-by: Kohei Yoshida <kohei.yoshida at suse.com>

diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index bd1cc68..afced22 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -50,6 +50,17 @@ ScTpDefaultsOptions::ScTpDefaultsOptions(Window *pParent, const SfxItemSet &rCor
         rCoreAttrs.Get(GetWhich(SID_SCDOCOPTIONS)));
     mpLocalOptions.reset(new ScDocOptions(rItem.GetDocOptions()));
 
+    long nTxtW = aFtNSheets.GetCtrlTextWidth( aFtNSheets.GetText() );
+    long nCtrlW = aFtNSheets.GetSizePixel().Width();
+    if ( nTxtW >= nCtrlW )
+    {
+        Size aNewSize = aFtNSheets.GetSizePixel();
+        aNewSize.Width() += ( nTxtW - nCtrlW );
+        aFtNSheets.SetSizePixel( aNewSize );
+        Point aNewPoint = aEdNSheets.GetPosPixel();
+        aNewPoint.X() += ( nTxtW - nCtrlW );
+        aEdNSheets.SetPosPixel( aNewPoint );
+    }
     aEdNSheets.SetModifyHdl( LINK(this, ScTpDefaultsOptions, NumModifiedHdl) );
 }
 
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index a8f82a5..8012628 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -926,14 +926,14 @@ TabPage RID_SCPAGE_DEFAULTS
     FixedText FT_NSHEETS
     {
         Pos = MAP_APPFONT ( 12 , 16 ) ;
-        Size = MAP_APPFONT ( 120 , 8 ) ;
+        Size = MAP_APPFONT ( 110 , 8 ) ;
         Text [ en-US ] = "Number of worksheets in new document";
     };
     NumericField ED_NSHEETS
     {
         HelpID = "sc:NumericField:RID_SCPAGE_CALC:ED_NSHEETS";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 150 , 14 ) ;
+        Pos = MAP_APPFONT ( 130 , 14 ) ;
         Size = MAP_APPFONT ( 25 , 12 ) ;
         Minimum = 1 ;
         Maximum = 32000 ;


More information about the Libreoffice-commits mailing list