diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-04-18 11:20:07 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-04-18 11:20:07 +0000 |
commit | 3eebf511979a76364dd7a5d987e202560db2cb1d (patch) | |
tree | 207e7b3d31bacb9788ac004962c36198d73ca66d /sfx2/source/appl/childwin.cxx | |
parent | e3762a0e59a6bda7993b6d3dae1bd1d3268fad70 (diff) |
INTEGRATION: CWS fwkfinal8 (1.19.4); FILE MERGED
2005/04/05 10:41:17 cd 1.19.4.1: #i46609# Save split size additionally to fix docking problem
Diffstat (limited to 'sfx2/source/appl/childwin.cxx')
-rw-r--r-- | sfx2/source/appl/childwin.cxx | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index a9491e53e000..41f93eeb7979 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -2,17 +2,9 @@ * * $RCSfile: childwin.cxx,v $ * -<<<<<<< childwin.cxx - * $Revision: 1.19 $ -======= - * $Revision: 1.19 $ ->>>>>>> 1.13.142.2 + * $Revision: 1.20 $ * -<<<<<<< childwin.cxx - * last change: $Author: vg $ $Date: 2005-03-23 16:23:13 $ -======= - * last change: $Author: vg $ $Date: 2005-03-23 16:23:13 $ ->>>>>>> 1.13.142.2 + * last change: $Author: obo $ $Date: 2005-04-18 12:20:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -188,6 +180,30 @@ sal_Bool GetPosSizeFromString( const String& rStr, Point& rPos, Size& rSize ) return sal_True; } +sal_Bool GetSplitSizeFromString( const String& rStr, Size& rSize ) +{ + sal_Int32 nIndex = rStr.Search( ',' ); + if (( nIndex >= 0 ) && ( nIndex < rStr.Len())) + { + String aStr = rStr.Copy( nIndex+1 ); + + sal_Int32 nCount = aStr.GetTokenCount(';'); + if ( nCount != 2 ) + return sal_False; + + rSize.Width() = aStr.GetToken(0, ';' ).ToInt32(); + rSize.Height() = aStr.GetToken(1, ';' ).ToInt32(); + + // negative sizes are invalid + if ( rSize.Width() < 0 || rSize.Height() < 0 ) + return sal_False; + + return sal_True; + } + + return sal_False; +} + //========================================================================= SfxChildWindow::SfxChildWindow(Window *pParentWindow, sal_uInt16 nId) : pParent(pParentWindow) |