View | Details | Raw Unified | Return to issue 63848
Collapse All | Expand All

(-)inc/sfx2/basedlgs.hxx (+7 lines)
Lines 116-121 Link Here
116
	Size					aSize;
116
	Size					aSize;
117
    SfxModelessDialog_Impl* pImp;
117
    SfxModelessDialog_Impl* pImp;
118
118
119
119
    SAL_DLLPRIVATE SfxModelessDialog(SfxModelessDialog &); // not defined
120
    SAL_DLLPRIVATE SfxModelessDialog(SfxModelessDialog &); // not defined
120
    SAL_DLLPRIVATE void operator =(SfxModelessDialog &); // not defined
121
    SAL_DLLPRIVATE void operator =(SfxModelessDialog &); // not defined
121
122
Lines 136-141 Link Here
136
	virtual long			Notify( NotifyEvent& rNEvt );
137
	virtual long			Notify( NotifyEvent& rNEvt );
137
    SfxBindings&            GetBindings()
138
    SfxBindings&            GetBindings()
138
                            { return *pBindings; }
139
                            { return *pBindings; }
140
    
141
    DECL_LINK( TimerHdl, Timer* );
142
139
};
143
};
140
144
141
// class SfxFloatingWindow --------------------------------------------------
145
// class SfxFloatingWindow --------------------------------------------------
Lines 171-176 Link Here
171
public:
175
public:
172
	virtual void        	FillInfo(SfxChildWinInfo&) const;
176
	virtual void        	FillInfo(SfxChildWinInfo&) const;
173
	void					Initialize (SfxChildWinInfo* pInfo);
177
	void					Initialize (SfxChildWinInfo* pInfo);
178
    
179
    DECL_LINK( TimerHdl, Timer* );
180
174
};
181
};
175
182
176
// class SfxSingleTabDialog --------------------------------------------------
183
// class SfxSingleTabDialog --------------------------------------------------
(-)source/dialog/basedlgs.cxx (-14 / +57 lines)
Lines 73-83 Link Here
73
73
74
class SfxModelessDialog_Impl : public SfxListener
74
class SfxModelessDialog_Impl : public SfxListener
75
{
75
{
76
76
public:
77
public:
77
    ByteString      aWinState;
78
    ByteString      aWinState;
78
    SfxChildWindow* pMgr;
79
    SfxChildWindow* pMgr;
79
    BOOL            bConstructed;
80
    BOOL            bConstructed;
80
    void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
81
    void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
82
83
    Timer           aMoveTimer;
84
    
81
};
85
};
82
86
83
void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
87
void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
Lines 100-105 Link Here
100
    SfxChildWindow* pMgr;
104
    SfxChildWindow* pMgr;
101
	BOOL				bConstructed;
105
	BOOL				bConstructed;
102
    void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
106
    void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
107
108
    Timer           aMoveTimer;
109
103
};
110
};
104
111
105
void SfxFloatingWindow_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
112
void SfxFloatingWindow_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
Lines 315-327 Link Here
315
	ModelessDialog::Resize();
322
	ModelessDialog::Resize();
316
    if ( pImp->bConstructed && pImp->pMgr )
323
    if ( pImp->bConstructed && pImp->pMgr )
317
    {
324
    {
318
        if ( !IsRollUp() )
325
        // start timer for saving window status information
319
            aSize = GetSizePixel();
326
        pImp->aMoveTimer.Start();
320
        ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
321
        if ( GetStyle() & WB_SIZEABLE )
322
            nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
323
        pImp->aWinState = GetWindowState( nMask );
324
        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
325
    }
327
    }
326
}
328
}
327
329
Lines 330-343 Link Here
330
    ModelessDialog::Move();
332
    ModelessDialog::Move();
331
    if ( pImp->bConstructed && pImp->pMgr && IsReallyVisible() )
333
    if ( pImp->bConstructed && pImp->pMgr && IsReallyVisible() )
332
    {
334
    {
335
        // start timer for saving window status information
336
        pImp->aMoveTimer.Start();
337
    }
338
}
339
340
IMPL_LINK( SfxModelessDialog, TimerHdl, Timer*, EMPTYARG)
341
/*	
342
    Implements a timer event that is triggered by a move or resize of the window
343
    This will save config information to Views.xcu with a small delay
344
*/
345
{
346
    pImp->aMoveTimer.Stop();
347
    if ( pImp->bConstructed && pImp->pMgr )
348
    {
349
        if ( !IsRollUp() )
350
            aSize = GetSizePixel();
333
        ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
351
        ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
334
        if ( GetStyle() & WB_SIZEABLE )
352
        if ( GetStyle() & WB_SIZEABLE )
335
            nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
353
            nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
336
        pImp->aWinState = GetWindowState( nMask );
354
        pImp->aWinState = GetWindowState( nMask );
337
        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
355
        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
338
    }
356
    }
357
    return 0;
339
}
358
}
340
359
360
341
// -----------------------------------------------------------------------
361
// -----------------------------------------------------------------------
342
362
343
SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx,
363
SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx,
Lines 354-359 Link Here
354
	SetUniqueId( nId );
374
	SetUniqueId( nId );
355
    if ( pBindinx )
375
    if ( pBindinx )
356
        pImp->StartListening( *pBindinx );
376
        pImp->StartListening( *pBindinx );
377
    pImp->aMoveTimer.SetTimeout(50);
378
    pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxModelessDialog,TimerHdl));
357
}
379
}
358
380
359
// -----------------------------------------------------------------------
381
// -----------------------------------------------------------------------
Lines 372-377 Link Here
372
	SetUniqueId( nId );
394
	SetUniqueId( nId );
373
    if ( pBindinx )
395
    if ( pBindinx )
374
        pImp->StartListening( *pBindinx );
396
        pImp->StartListening( *pBindinx );
397
    pImp->aMoveTimer.SetTimeout(50);
398
    pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxModelessDialog,TimerHdl));
375
}
399
}
376
400
377
// -----------------------------------------------------------------------
401
// -----------------------------------------------------------------------
Lines 538-543 Link Here
538
	SetUniqueId( nId );
562
	SetUniqueId( nId );
539
    if ( pBindinx )
563
    if ( pBindinx )
540
        pImp->StartListening( *pBindinx );
564
        pImp->StartListening( *pBindinx );
565
    pImp->aMoveTimer.SetTimeout(50);
566
    pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
567
541
}
568
}
542
569
543
// -----------------------------------------------------------------------
570
// -----------------------------------------------------------------------
Lines 557-562 Link Here
557
	SetUniqueId( nId );
584
	SetUniqueId( nId );
558
    if ( pBindinx )
585
    if ( pBindinx )
559
        pImp->StartListening( *pBindinx );
586
        pImp->StartListening( *pBindinx );
587
    pImp->aMoveTimer.SetTimeout(50);
588
    pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxFloatingWindow,TimerHdl));
589
560
}
590
}
561
591
562
//-------------------------------------------------------------------------
592
//-------------------------------------------------------------------------
Lines 614-626 Link Here
614
	FloatingWindow::Resize();
644
	FloatingWindow::Resize();
615
    if ( pImp->bConstructed && pImp->pMgr )
645
    if ( pImp->bConstructed && pImp->pMgr )
616
    {
646
    {
617
        if ( !IsRollUp() )
647
        // start timer for saving window status information
618
            aSize = GetSizePixel();
648
        pImp->aMoveTimer.Start();
619
        ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
620
        if ( GetStyle() & WB_SIZEABLE )
621
            nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
622
        pImp->aWinState = GetWindowState( nMask );
623
        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
624
    }
649
    }
625
}
650
}
626
651
Lines 629-642 Link Here
629
    FloatingWindow::Move();
654
    FloatingWindow::Move();
630
    if ( pImp->bConstructed && pImp->pMgr )
655
    if ( pImp->bConstructed && pImp->pMgr )
631
    {
656
    {
657
        // start timer for saving window status information
658
        pImp->aMoveTimer.Start();
659
    }
660
}
661
662
IMPL_LINK( SfxFloatingWindow, TimerHdl, Timer*, EMPTYARG)
663
/*	
664
    Implements a timer event that is triggered by a move or resize of the window
665
    This will save config information to Views.xcu with a small delay
666
*/
667
{
668
    pImp->aMoveTimer.Stop();
669
    if ( pImp->bConstructed && pImp->pMgr )
670
    {
671
        if ( !IsRollUp() )
672
            aSize = GetSizePixel();
632
        ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
673
        ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
633
        if ( GetStyle() & WB_SIZEABLE )
674
        if ( GetStyle() & WB_SIZEABLE )
634
            nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
675
            nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
635
        pImp->aWinState = GetWindowState( nMask );
676
        pImp->aWinState = GetWindowState( nMask );
636
        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
677
        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
637
    }
678
    }
679
    return 0;
638
}
680
}
639
681
682
640
//-------------------------------------------------------------------------
683
//-------------------------------------------------------------------------
641
void SfxFloatingWindow::StateChanged( StateChangedType nStateChange )
684
void SfxFloatingWindow::StateChanged( StateChangedType nStateChange )
642
{
685
{
(-)source/dialog/dockwin.cxx (-11 / +10 lines)
Lines 1-4 Link Here
1
/*************************************************************************
1
/*************************************************************************
2
 *
2
 *
3
 *  OpenOffice.org - a multi-platform office productivity suite
3
 *  OpenOffice.org - a multi-platform office productivity suite
4
 *
4
 *
Lines 117-130 Link Here
117
    {
117
    {
118
        if ( IsFloatingMode() )
118
        if ( IsFloatingMode() )
119
        {
119
        {
120
            if( !GetFloatingWindow()->IsRollUp() )
120
            // start timer for saving window status information
121
                SetFloatingSize( GetOutputSizePixel() );
121
            pImp->aMoveTimer.Start();
122
            pImp->aWinState = GetFloatingWindow()->GetWindowState();
123
            SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
124
            SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
125
            if ( pImp->bSplitable )
126
                eIdent = SFX_CHILDWIN_SPLITWINDOW;
127
            pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() );
128
        }
122
        }
129
		else
123
		else
130
		{
124
		{
Lines 512-518 Link Here
512
	}
506
	}
513
507
514
	SetAlignment( IsFloatingMode() ? SFX_ALIGN_NOALIGNMENT : pImp->GetDockAlignment() );
508
	SetAlignment( IsFloatingMode() ? SFX_ALIGN_NOALIGNMENT : pImp->GetDockAlignment() );
515
	pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() );
516
}
509
}
517
510
518
//-------------------------------------------------------------------------
511
//-------------------------------------------------------------------------
Lines 1606-1615 Link Here
1606
}
1599
}
1607
1600
1608
IMPL_LINK( SfxDockingWindow, TimerHdl, Timer*, EMPTYARG)
1601
IMPL_LINK( SfxDockingWindow, TimerHdl, Timer*, EMPTYARG)
1602
/*	
1603
    Implements a timer event that is triggered by a move or resize of the window
1604
    This will save config information to Views.xcu with a small delay
1605
*/
1609
{
1606
{
1610
    pImp->aMoveTimer.Stop();
1607
    pImp->aMoveTimer.Stop();
1611
	if ( IsReallyVisible() && IsFloatingMode() )
1608
	if ( IsReallyVisible() && IsFloatingMode() )
1612
	{
1609
	{
1610
        if( !GetFloatingWindow()->IsRollUp() )
1611
            SetFloatingSize( GetOutputSizePixel() );
1612
        pImp->aWinState = GetFloatingWindow()->GetWindowState();
1613
		SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
1613
		SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
1614
		if ( pImp->bSplitable )
1614
		if ( pImp->bSplitable )
1615
			eIdent = SFX_CHILDWIN_SPLITWINDOW;
1615
			eIdent = SFX_CHILDWIN_SPLITWINDOW;
Lines 1618-1621 Link Here
1618
	}
1618
	}
1619
	return 0;
1619
	return 0;
1620
}
1620
}
1621

Return to issue 63848