ooo-build r12818 - in trunk: . patches/dev300



Author: jannieuw
Date: Thu Jun  5 18:09:02 2008
New Revision: 12818
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12818&view=rev

Log:
2008-06-05  Jan Nieuwenhuizen  <janneke gnu org>

	* patches/dev300/layout-tab-sfx2.diff:
	* patches/dev300/layout-tab-toolkit.diff: Create layout::TabPage
	delayed, fixes mousing of embedded layout sort-options tab.


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/layout-tab-sfx2.diff
   trunk/patches/dev300/layout-tab-toolkit.diff

Modified: trunk/patches/dev300/layout-tab-sfx2.diff
==============================================================================
--- trunk/patches/dev300/layout-tab-sfx2.diff	(original)
+++ trunk/patches/dev300/layout-tab-sfx2.diff	Thu Jun  5 18:09:02 2008
@@ -21,7 +21,7 @@
  	DECL_DLLPRIVATE_LINK( EventHdl_Impl, SfxMacroInfo*);
  //#endif
 diff --git a/inc/sfx2/tabdlg.hxx b/inc/sfx2/tabdlg.hxx
-index d5b930e..4846f0b 100644
+index d5b930e..6d417c8 100644
 --- sfx2/inc/sfx2/tabdlg.hxx
 +++ sfx2/inc/sfx2/tabdlg.hxx
 @@ -43,6 +43,9 @@
@@ -34,23 +34,39 @@
  class SfxPoolItem;
  class SfxTabDialog;
  class SfxViewFrame;
-@@ -98,6 +101,7 @@ friend class SfxTabDialogController;
+@@ -52,6 +55,11 @@ class SfxBindings;
+ // typedefs --------------------------------------------------------------
+ 
+ typedef SfxTabPage* (*CreateTabPage)(Window *pParent, const SfxItemSet &rAttrSet);
++namespace layout
++{
++class TabPage;
++typedef TabPage* (*CreateTabPage)(::Window *pParent, ::SfxItemSet const& set );
++}
+ typedef USHORT*		(*GetTabPageRanges)(); // liefert internationale Which-Wert
+ 
+ struct TabDlg_Impl;
+@@ -98,6 +106,9 @@ friend class SfxTabDialogController;
  	USHORT				nAppPageId;
  	BOOL				bItemsReset;
  	BOOL				bFmt;
 +    std::map<int, layout::TabPage*> layoutPages;
++    std::map<int, layout::CreateTabPage> layoutPageFuncs;
++    std::map<int, layout::CreateTabPage*> layoutPageFuncPtrs;
  
  //#if 0 // _SOLAR__PRIVATE
  	DECL_DLLPRIVATE_LINK( ActivatePageHdl, TabControl * );
-@@ -168,6 +172,7 @@ public:
+@@ -168,6 +179,9 @@ public:
  									BOOL bItemsOnDemand = FALSE,
  									USHORT nPos = TAB_APPEND);
  
 +    void AddTabPage( int id, layout::TabPage* page );
++    void AddTabPage( int id, layout::CreateTabPage func );
++    void AddTabPage( int id, layout::CreateTabPage* func );
  	void				RemoveTabPage( USHORT nId );
  
  	void				SetCurPageId( USHORT nId ) { nAppPageId = nId; }
-@@ -181,7 +186,7 @@ public:
+@@ -181,7 +195,7 @@ public:
  	const SfxItemSet*	GetOutputItemSet() const { return pOutSet; }
  	const SfxItemSet*	GetOutputItemSet( USHORT nId ) const;
  	int					FillOutputItemSet();
@@ -82,7 +98,7 @@
  	sal_uInt16 nCount = pImp->aArr.Count();
  	for (sal_uInt16 i=0; i<nCount; i++)
 diff --git a/source/dialog/tabdlg.cxx b/source/dialog/tabdlg.cxx
-index 57a8e89..7bcca09 100644
+index 57a8e89..297694f 100644
 --- sfx2/source/dialog/tabdlg.cxx
 +++ sfx2/source/dialog/tabdlg.cxx
 @@ -56,6 +56,7 @@
@@ -106,7 +122,7 @@
              SfxTabPage* pTabPage = (SfxTabPage*) pDialog->aTabCtrl.GetTabPage( nPageId );
              if ( pTabPage )
              {
-@@ -922,6 +929,11 @@ void SfxTabDialog::AddTabPage
+@@ -922,6 +929,25 @@ void SfxTabDialog::AddTabPage
  }
  #endif
  
@@ -115,14 +131,47 @@
 +    layoutPages[id] = page;
 +}
 +
++void SfxTabDialog::AddTabPage( int id, layout::CreateTabPage* func )
++{
++    OSL_TRACE ("%s: page: %d", __FUNCTION__, id );
++    layoutPageFuncs[id] = *func;
++    layoutPageFuncPtrs[id] = func;
++}
++
++void SfxTabDialog::AddTabPage( int id, layout::CreateTabPage func )
++{
++    OSL_TRACE ("%s: page: %d", __FUNCTION__, id );
++    layoutPageFuncs[id] = func;
++    layoutPageFuncPtrs[id] = &func;
++}
++
  // -----------------------------------------------------------------------
  
  void SfxTabDialog::RemoveTabPage( USHORT nId )
-@@ -1379,6 +1391,24 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
+@@ -1365,6 +1391,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
+ 
+ // -----------------------------------------------------------------------
+ 
++
+ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
+ 
+ /*  [Beschreibung]
+@@ -1379,6 +1406,36 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
  */
  
  {
 +    int newId = pTabCtrl->GetCurPageId();
++    OSL_TRACE ("%s: page: %d", __FUNCTION__, newId );
++    layout::CreateTabPage func = layoutPageFuncs[newId];
++    layout::CreateTabPage *pfunc = layoutPageFuncPtrs[newId];
++    //if ( layout::CreateTabPage *func = layoutPageFuncPtrs[newId] )
++        //layout::CreateTabPage *func = layoutPageFuncs[newId];
++    if (func)
++    {
++        layout::TabPage::global_parent = pTabCtrl;
++        layout::TabPage* page = (func) (pTabCtrl, *pSet);
++        AddTabPage( newId, page );
++    }
 +    if ( layout::TabPage* page = layoutPages[newId] )
 +    {
 +        TabPage *vclPage = page->GetTabPage();
@@ -136,14 +185,15 @@
 +        OSL_TRACE ("%s: tabSize: %d, %d", __FUNCTION__, tabSize.Width(), tabSize.Height() );
 +        OSL_TRACE ("%s: dialogSize: %d, %d", __FUNCTION__, dialogSize.Width(), dialogSize.Height() );
 +
-+        dialog->SetTabPageSizePixel( tabSize );
++        //dialog->SetTabPageSizePixel( tabSize );
++        dialog->SetTabPageSizePixel( dialogSize );
 +        return 0;
 +    }
 +    
  	DBG_ASSERT( pImpl->pData->Count(), "keine Pages angemeldet" );
  	const USHORT nId = pTabCtrl->GetCurPageId();
  	SFX_APP();
-@@ -1455,6 +1485,9 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
+@@ -1455,6 +1512,9 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
  */
  
  {

Modified: trunk/patches/dev300/layout-tab-toolkit.diff
==============================================================================
--- trunk/patches/dev300/layout-tab-toolkit.diff	(original)
+++ trunk/patches/dev300/layout-tab-toolkit.diff	Thu Jun  5 18:09:02 2008
@@ -416,10 +416,10 @@
  {
 diff --git a/source/awt/vclxtabpage.cxx b/source/awt/vclxtabpage.cxx
 new file mode 100644
-index 0000000..24b1e99
+index 0000000..e0b9e2e
 --- /dev/null
 +++ toolkit/source/awt/vclxtabpage.cxx
-@@ -0,0 +1,160 @@
+@@ -0,0 +1,167 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -529,11 +529,18 @@
 +    awt::Size reqSize = getMinimumSize();
 +    reqSize.Height = getHeightForWidth( area.Width );
 +
++#if 0 // huh?
 +    if ( curSize.Width && reqSize.Width > curSize.Width )
 +        reqSize.Width = curSize.Width;
 +    if ( curSize.Height && reqSize.Height > curSize.Height )
 +        reqSize.Height = curSize.Height;
-+    
++#else
++    if ( reqSize.Width < curSize.Width )
++        reqSize.Width = curSize.Width;
++    if ( reqSize.Height < curSize.Height )
++        reqSize.Height = curSize.Height;
++#endif
++
 +    OSL_TRACE ("%s: ismousetransparent, %d", __FUNCTION__, GetWindow()->IsMouseTransparent() );
 +    Size window = GetWindow()->GetSizePixel();
 +    Size parent = GetWindow()->GetParent()->GetSizePixel();
@@ -2209,16 +2216,20 @@
 +  && ../../${INPATH}/bin/test "$@"
 diff --git a/workben/layout/sort-options.xml b/workben/layout/sort-options.xml
 new file mode 100644
-index 0000000..50184c1
+index 0000000..e2e01f0
 --- /dev/null
 +++ toolkit/workben/layout/sort-options.xml
-@@ -0,0 +1,36 @@
+@@ -0,0 +1,40 @@
 +<?xml version="1.0" encoding="UTF-8"?>
 +<!-- This is a template.  i18n translation is not performed in-place;
 +     i18n translated XML files are generated from this template by
 +     transex3/layout/tralay.  !-->
 +
-+<tabpage help-id="HID_SCPAGE_SORT_OPTIONS" hide="true" id="RID_SCPAGE_SORT_OPTIONS" sv-look="true" xmlns="http://openoffice.org/2007/layout"; xmlns:cnt="http://openoffice.org/2007/layout/container";>
++<tabpage help-id="HID_SCPAGE_SORT_OPTIONS"
++	 id="RID_SCPAGE_SORT_OPTIONS"
++	 sv-look="true" xmlns="http://openoffice.org/2007/layout"; xmlns:cnt="http://openoffice.org/2007/layout/container";
++	 optimumsize="true"
++         sizeable="true" moveable="true">
 +    <vbox spacing="4" border="5">
 +	<string id="STR_COL_LABEL" _text="Range contains column la~bels"/>
 +	<string id="STR_ROW_LABEL" _text="Range contains ~row labels"/>
@@ -2251,10 +2262,10 @@
 +</tabpage>
 diff --git a/workben/layout/sortdlg.cxx b/workben/layout/sortdlg.cxx
 new file mode 100644
-index 0000000..90b89fa
+index 0000000..3170050
 --- /dev/null
 +++ toolkit/workben/layout/sortdlg.cxx
-@@ -0,0 +1,70 @@
+@@ -0,0 +1,71 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2315,8 +2326,9 @@
 +#if !ENABLE_LAYOUT
 +	AddTabPage( TP_OPTIONS,	ScTabPageSortOptions::Create,  0 );
 +#else /* ENABLE_LAYOUT */
-+    layout::TabPage::global_parent = this;
-+	AddTabPage( TP_OPTIONS, new ScTabPageSortOptions( this, *pArgSet ) );
++    layout::TabPage::global_parent = pParent;
++	//AddTabPage( TP_OPTIONS, new ScTabPageSortOptions( this, *pArgSet ) );
++	AddTabPage( TP_OPTIONS, &ScTabPageSortOptions::Create );
 +#endif /* ENABLE_LAYOUT */
 +	FreeResource();
 +}
@@ -4137,10 +4149,10 @@
 +
 diff --git a/workben/layout/tpsort.hxx b/workben/layout/tpsort.hxx
 new file mode 100644
-index 0000000..8673ab6
+index 0000000..ed6bdc8
 --- /dev/null
 +++ toolkit/workben/layout/tpsort.hxx
-@@ -0,0 +1,222 @@
+@@ -0,0 +1,226 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4285,8 +4297,12 @@
 +									  const SfxItemSet&	 rArgSet );
 +				~ScTabPageSortOptions();
 +
++#if !ENABLE_LAYOUT
 +	static	SfxTabPage*	Create		( Window*				pParent,
 +									  const SfxItemSet& 	rArgSet );
++#else /* ENABLE_LAYOUT */
++    static TabPage*	Create ( Window* parent, SfxItemSet const& set );
++#endif /* ENABLE_LAYOUT */
 +	static	USHORT*		GetRanges	();
 +	virtual	BOOL		FillItemSet	( SfxItemSet& rArgSet );
 +	virtual	void		Reset		( const SfxItemSet& rArgSet );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]