summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-02-21 17:17:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-02-23 14:28:42 +0000
commit8655095a4910ca795dfd182e6796d9375727a694 (patch)
tree3472e1c3cea9539fc2785c8db99a421a10e93694
parent3c5c43cf2aa354a98f28a466647f4d463cdfdc85 (diff)
try and beat this weird SvxAcceptChgCtr into something sanish
a) convert to .ui b) The accept/reject changes dialogs now have a "close" button and the accept/reject etc buttons are relocated into the main dialog button area rather than as direct children of the view page. They now get disabled on switching to the non-view page. c) Merges the sc redline changes dialog, the sw redline changes dialog and the sw autocorrect changes dialog Change-Id: If0ba376c3f2d36709aeeed995fa9901741434c40
-rw-r--r--sc/inc/globstr.hrc19
-rw-r--r--sc/source/ui/inc/acredlin.hrc31
-rw-r--r--sc/source/ui/inc/acredlin.hxx4
-rw-r--r--sc/source/ui/inc/highred.hrc8
-rw-r--r--sc/source/ui/inc/optdlg.hrc1
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx75
-rw-r--r--sc/source/ui/miscdlgs/acredlin.src195
-rw-r--r--svx/UI_svx.mk2
-rw-r--r--svx/inc/svx/ctredlin.hxx22
-rw-r--r--svx/source/dialog/ctredlin.cxx120
-rw-r--r--svx/uiconfig/ui/acceptrejectchangesdialog.ui126
-rw-r--r--svx/uiconfig/ui/redlinecontrol.ui8
-rw-r--r--svx/uiconfig/ui/redlineviewpage.ui180
-rw-r--r--sw/UI_swriter.mk1
-rw-r--r--sw/inc/helpid.h2
-rw-r--r--sw/inc/swabstdlg.hxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx17
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx2
-rw-r--r--sw/source/ui/inc/misc.hrc3
-rw-r--r--sw/source/ui/inc/redlndlg.hxx4
-rw-r--r--sw/source/ui/inc/swmodalredlineacceptdlg.hxx2
-rw-r--r--sw/source/ui/misc/redlndlg.cxx45
-rw-r--r--sw/source/ui/misc/redlndlg.hrc4
-rw-r--r--sw/source/ui/misc/redlndlg.src33
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx14
-rw-r--r--sw/source/ui/shells/textsh1.cxx2
-rw-r--r--sw/uiconfig/swriter/ui/acceptrejectchanges.ui75
27 files changed, 353 insertions, 644 deletions
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 7709579ebb01..66da26179d5b 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -636,6 +636,23 @@
#define STR_NO_INSERT_DELETE_OVER_PIVOT_TABLE 509
-#define STR_COUNT 510
+#define STR_CHG_INSERT_COLS 510
+#define STR_CHG_INSERT_ROWS 511
+#define STR_CHG_INSERT_TABS 512
+#define STR_CHG_DELETE_COLS 513
+#define STR_CHG_DELETE_ROWS 514
+#define STR_CHG_DELETE_TABS 515
+#define STR_CHG_MOVE 516
+#define STR_CHG_CONTENT 517
+#define STR_CHG_REJECT 518
+#define STR_CHG_ACCEPTED 519
+#define STR_CHG_REJECTED 520
+#define STR_CHG_NO_ENTRY 521
+#define STR_CHG_CONTENT_WITH_CHILD 522
+#define STR_CHG_CHILD_CONTENT 523
+#define STR_CHG_CHILD_ORGCONTENT 524
+#define STR_CHG_EMPTY 525
+
+#define STR_COUNT 526
#endif
diff --git a/sc/source/ui/inc/acredlin.hrc b/sc/source/ui/inc/acredlin.hrc
index dfa474434447..1468c3f4f6c1 100644
--- a/sc/source/ui/inc/acredlin.hrc
+++ b/sc/source/ui/inc/acredlin.hrc
@@ -22,37 +22,6 @@
#define BTN_CANCEL 2
#define BTN_HELP 5
-#define CTR_REDLINING 10
-#define TP_FILTER 11
-#define TP_VIEW 12
-
-#define FT_ASSIGN 14
-#define ED_ASSIGN 15
-#define RB_ASSIGN 16
-
-#define STR_INSERT_COLS 20
-#define STR_INSERT_ROWS 21
-#define STR_INSERT_TABS 22
-#define STR_DELETE_COLS 23
-#define STR_DELETE_ROWS 24
-#define STR_DELETE_TABS 25
-#define STR_MOVE 26
-#define STR_CONTENT 27
-#define STR_REJECT 28
-#define STR_ACCEPTED 29
-#define STR_REJECTED 30
-#define STR_NO_ENTRY 31
-#define STR_CONTENT_WITH_CHILD 32
-#define STR_CHILD_CONTENT 33
-#define STR_CHILD_ORGCONTENT 34
-#define STR_EMPTY 35
-
-// Bitmaps
-#define BMP_STR_CLOSE 41
-#define BMP_STR_OPEN 42
-#define BMP_STR_END 43
-#define BMP_STR_ERROR 44
-
#define SC_CHANGES_COMMENT 49
#define SC_SUB_SORT 50
#define SC_SORT_ACTION 51
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index d9c4b9be5e23..1c756dad466e 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -99,7 +99,7 @@ private:
Timer aSelectionTimer;
Timer aReOpenTimer;
- SvxAcceptChgCtr aAcceptChgCtr;
+ SvxAcceptChgCtr* m_pAcceptChgCtr;
ScViewData* pViewData;
ScDocument* pDoc;
ScRangeName aLocalRangeName;
@@ -107,7 +107,6 @@ private:
SvxTPFilter* pTPFilter;
SvxTPView* pTPView;
SvxRedlinTable* pTheView; // #i48648 now SvHeaderTabListBox
- Size MinSize;
ScRangeList aRangeList;
ScChangeViewSettings aChangeViewSet;
rtl::OUString aStrInsertCols;
@@ -143,7 +142,6 @@ private:
DECL_LINK( FilterHandle, SvxTPFilter* );
DECL_LINK( RefHandle, void* );
DECL_LINK( FilterModified, void* );
- DECL_LINK( MinSizeHandle, SvxAcceptChgCtr*);
DECL_LINK( RejectHandle, SvxTPView*);
DECL_LINK( AcceptHandle, SvxTPView*);
DECL_LINK( RejectAllHandle, void*);
diff --git a/sc/source/ui/inc/highred.hrc b/sc/source/ui/inc/highred.hrc
index 9f3d58940733..9122b8b9c6a6 100644
--- a/sc/source/ui/inc/highred.hrc
+++ b/sc/source/ui/inc/highred.hrc
@@ -26,8 +26,6 @@
#define CB_HIGHLIGHT_REJECT 7
#define FL_FILTER 10
-#define TP_FILTER 11
-#define TP_VIEW 12
#define CB_HIGHLIGHT 13
#define FT_ASSIGN 14
@@ -43,9 +41,3 @@
#define STR_MOVE 26
#define STR_CONTENT 27
#define STR_REJECT 28
-
-// Bitmaps
-#define BMP_STR_CLOSE 31
-#define BMP_STR_OPEN 32
-#define BMP_STR_END 33
-#define BMP_STR_ERROR 34
diff --git a/sc/source/ui/inc/optdlg.hrc b/sc/source/ui/inc/optdlg.hrc
index a1c8e0a13472..a7f655114e48 100644
--- a/sc/source/ui/inc/optdlg.hrc
+++ b/sc/source/ui/inc/optdlg.hrc
@@ -21,7 +21,6 @@
#define TP_GENERAL 1
#define TP_SAVE 2
#define TP_PATH 3
-#define TP_VIEW 5
#define TP_CALC 6
#define TP_USERLISTS 7
#define TP_PRINT 8
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index debae9480d93..7c4ea0846843 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -93,30 +93,29 @@ ScRedlinData::~ScRedlinData()
//============================================================================
// class ScAcceptChgDlg
//----------------------------------------------------------------------------
-ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
- ScViewData* ptrViewData)
-
- : SfxModelessDialog( pB, pCW, pParent, ScResId(RID_SCDLG_CHANGES) ),
- aAcceptChgCtr ( this, ScResId( CTR_REDLINING ) ),
+ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScViewData* ptrViewData)
+ : SfxModelessDialog(pB, pCW, pParent,
+ "AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui"),
pViewData ( ptrViewData ),
pDoc ( ptrViewData->GetDocument() ),
aLocalRangeName ( *(pDoc->GetRangeName()) ),
- aStrInsertCols (SC_RESSTR(STR_INSERT_COLS)),
- aStrInsertRows (SC_RESSTR(STR_INSERT_ROWS)),
- aStrInsertTabs (SC_RESSTR(STR_INSERT_TABS)),
- aStrDeleteCols (SC_RESSTR(STR_DELETE_COLS)),
- aStrDeleteRows (SC_RESSTR(STR_DELETE_ROWS)),
- aStrDeleteTabs (SC_RESSTR(STR_DELETE_TABS)),
- aStrMove (SC_RESSTR(STR_MOVE)),
- aStrContent (SC_RESSTR(STR_CONTENT)),
- aStrReject (SC_RESSTR(STR_REJECT)),
- aStrAllAccepted (SC_RESSTR(STR_ACCEPTED)),
- aStrAllRejected (SC_RESSTR(STR_REJECTED)),
- aStrNoEntry (SC_RESSTR(STR_NO_ENTRY)),
- aStrContentWithChild (SC_RESSTR(STR_CONTENT_WITH_CHILD)),
- aStrChildContent (SC_RESSTR(STR_CHILD_CONTENT)),
- aStrChildOrgContent (SC_RESSTR(STR_CHILD_ORGCONTENT)),
- aStrEmpty (SC_RESSTR(STR_EMPTY)),
+ aStrInsertCols (SC_RESSTR(STR_CHG_INSERT_COLS)),
+ aStrInsertRows (SC_RESSTR(STR_CHG_INSERT_ROWS)),
+ aStrInsertTabs (SC_RESSTR(STR_CHG_INSERT_TABS)),
+ aStrDeleteCols (SC_RESSTR(STR_CHG_DELETE_COLS)),
+ aStrDeleteRows (SC_RESSTR(STR_CHG_DELETE_ROWS)),
+ aStrDeleteTabs (SC_RESSTR(STR_CHG_DELETE_TABS)),
+ aStrMove (SC_RESSTR(STR_CHG_MOVE)),
+ aStrContent (SC_RESSTR(STR_CHG_CONTENT)),
+ aStrReject (SC_RESSTR(STR_CHG_REJECT)),
+ aStrAllAccepted (SC_RESSTR(STR_CHG_ACCEPTED)),
+ aStrAllRejected (SC_RESSTR(STR_CHG_REJECTED)),
+ aStrNoEntry (SC_RESSTR(STR_CHG_NO_ENTRY)),
+ aStrContentWithChild (SC_RESSTR(STR_CHG_CONTENT_WITH_CHILD)),
+ aStrChildContent (SC_RESSTR(STR_CHG_CHILD_CONTENT)),
+ aStrChildOrgContent (SC_RESSTR(STR_CHG_CHILD_ORGCONTENT)),
+ aStrEmpty (SC_RESSTR(STR_CHG_EMPTY)),
aUnknown(RTL_CONSTASCII_USTRINGPARAM("Unknown")),
bAcceptEnableFlag(true),
bRejectEnableFlag(true),
@@ -126,21 +125,14 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
bHasFilterEntry(false),
bUseColor(false)
{
- FreeResource();
+ m_pAcceptChgCtr = new SvxAcceptChgCtr(get_content_area());
nAcceptCount=0;
nRejectCount=0;
aReOpenTimer.SetTimeout(50);
aReOpenTimer.SetTimeoutHdl(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl ));
- // dialog is now only hidden, not deleted, on switching views,
- // so there's no need to restore settings when reopening
- MinSize=aAcceptChgCtr.GetMinSizePixel();
- MinSize.Height()+=2;
- MinSize.Width()+=2;
- SetMinOutputSizePixel(MinSize);
-
- pTPFilter=aAcceptChgCtr.GetFilterPage();
- pTPView=aAcceptChgCtr.GetViewPage();
+ pTPFilter=m_pAcceptChgCtr->GetFilterPage();
+ pTPView=m_pAcceptChgCtr->GetViewPage();
pTheView=pTPView->GetTableControl();
aSelectionTimer.SetTimeout(100);
aSelectionTimer.SetTimeoutHdl(LINK( this, ScAcceptChgDlg, UpdateSelectionHdl ));
@@ -166,8 +158,6 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
Init();
- aAcceptChgCtr.SetMinSizeHdl( LINK( this, ScAcceptChgDlg, MinSizeHandle ));
-
UpdateView();
SvTreeListEntry* pEntry=pTheView->First();
if(pEntry!=NULL)
@@ -175,6 +165,7 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
pTheView->Select(pEntry);
}
}
+
ScAcceptChgDlg::~ScAcceptChgDlg()
{
ClearView();
@@ -185,6 +176,8 @@ ScAcceptChgDlg::~ScAcceptChgDlg()
Link aLink;
pChanges->SetModifiedLink(aLink);
}
+
+ delete m_pAcceptChgCtr;
}
void ScAcceptChgDlg::ReInit(ScViewData* ptrViewData)
@@ -277,13 +270,9 @@ void ScAcceptChgDlg::Init()
pTPFilter->SetRange(aRefStr);
}
- Point aPoint(1,1);
- aAcceptChgCtr.SetPosPixel(aPoint);
InitFilter();
}
-
-
void ScAcceptChgDlg::ClearView()
{
nAcceptCount=0;
@@ -896,15 +885,7 @@ void ScAcceptChgDlg::Resize()
{
SfxModelessDialog::Resize();
Size aOutSize=GetOutputSizePixel();
- aAcceptChgCtr.SetSizePixel(aOutSize);
-}
-
-IMPL_LINK( ScAcceptChgDlg, MinSizeHandle, SvxAcceptChgCtr*, pCtr )
-{
- if(pCtr==&aAcceptChgCtr)
- if(!IsRollUp())
- SetOutputSizePixel(MinSize);
- return 0;
+ m_pAcceptChgCtr->SetSizePixel(aOutSize);
}
IMPL_LINK_NOARG(ScAcceptChgDlg, RefHandle)
@@ -1686,7 +1667,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
IMPL_LINK_NOARG(ScAcceptChgDlg, ReOpenTimerHdl)
{
ScSimpleRefDlgWrapper::SetAutoReOpen(true);
- aAcceptChgCtr.ShowFilterPage();
+ m_pAcceptChgCtr->ShowFilterPage();
RefHandle(NULL);
return 0;
diff --git a/sc/source/ui/miscdlgs/acredlin.src b/sc/source/ui/miscdlgs/acredlin.src
index f1190d66ee6c..aff8ab2b1307 100644
--- a/sc/source/ui/miscdlgs/acredlin.src
+++ b/sc/source/ui/miscdlgs/acredlin.src
@@ -17,138 +17,71 @@
*/
#include "acredlin.hrc"
+#include "globstr.hrc"
-ModelessDialog RID_SCDLG_CHANGES
-{
- OutputSize = TRUE ;
- HelpId = CMD_FID_CHG_ACCEPT ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 282 , 142 ) ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- // Dieser Dialog hat einen Cancel-Button !
- Control CTR_REDLINING
- {
- HelpId = HID_SC_REDLIN_CTR ;
- Pos = MAP_APPFONT ( 2 , 2 ) ;
- Size = MAP_APPFONT ( 270 , 105 ) ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 271 , 105 ) ;
- Size = MAP_APPFONT ( 1 , 1 ) ;
- TabStop = FALSE ;
- };
- FixedText FT_ASSIGN
- {
- Hide = TRUE ;
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 105 ) ;
- Size = MAP_APPFONT ( 128 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Range" ;
- };
- Edit ED_ASSIGN
- {
- HelpID = "sc:Edit:RID_SCDLG_CHANGES:ED_ASSIGN";
- Hide = TRUE ;
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 119 ) ;
- Size = MAP_APPFONT ( 128 , 12 ) ;
- TabStop = TRUE ;
- };
- ImageButton RB_ASSIGN
- {
- HelpID = "sc:ImageButton:RID_SCDLG_CHANGES:RB_ASSIGN";
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 142 , 118 ) ;
- Size = MAP_APPFONT ( 13 , 15 ) ;
- TabStop = FALSE ;
- QuickHelpText [ en-US ] = "Minimize/Maximize" ;
- };
- String STR_INSERT_COLS
- {
- Text [ en-US ] = "Column inserted" ;
- };
- String STR_INSERT_ROWS
- {
- Text [ en-US ] = "Row inserted " ;
- };
- String STR_INSERT_TABS
- {
- Text [ en-US ] = "Sheet inserted " ;
- };
- String STR_DELETE_COLS
- {
- Text [ en-US ] = "Column deleted" ;
- };
- String STR_DELETE_ROWS
- {
- Text [ en-US ] = "Row deleted" ;
- };
- String STR_DELETE_TABS
- {
- Text [ en-US ] = "Sheet deleted" ;
- };
- String STR_MOVE
- {
- Text [ en-US ] = "Range moved" ;
- };
- String STR_CONTENT
- {
- Text [ en-US ] = "Changed contents" ;
- };
- String STR_CONTENT_WITH_CHILD
- {
- Text [ en-US ] = "Changed contents" ;
- };
- String STR_CHILD_CONTENT
- {
- Text [ en-US ] = "Changed to " ;
- };
- String STR_CHILD_ORGCONTENT
- {
- Text [ en-US ] = "Original" ;
- };
- String STR_REJECT
- {
- Text [ en-US ] = "Changes rejected" ;
- };
- String STR_ACCEPTED
- {
- Text [ en-US ] = "Accepted" ;
- };
- String STR_REJECTED
- {
- Text [ en-US ] = "Rejected" ;
- };
- String STR_NO_ENTRY
- {
- Text [ en-US ] = "No Entry" ;
- };
- String STR_EMPTY
- {
- Text [ en-US ] = "<empty>" ;
- };
- Bitmap BMP_STR_CLOSE
- {
- File = "dir-clos.png" ;
- };
- Bitmap BMP_STR_OPEN
- {
- File = "dir-open.png" ;
- };
- Bitmap BMP_STR_END
- {
- File = "basobj2.png" ;
- };
- Bitmap BMP_STR_ERROR
- {
- File = "basbrk.png" ;
- };
- Text [ en-US ] = "Accept or Reject Changes" ;
+String STR_CHG_INSERT_COLS
+{
+ Text [ en-US ] = "Column inserted" ;
+};
+String STR_CHG_INSERT_ROWS
+{
+ Text [ en-US ] = "Row inserted " ;
+};
+String STR_CHG_INSERT_TABS
+{
+ Text [ en-US ] = "Sheet inserted " ;
+};
+String STR_CHG_DELETE_COLS
+{
+ Text [ en-US ] = "Column deleted" ;
+};
+String STR_CHG_DELETE_ROWS
+{
+ Text [ en-US ] = "Row deleted" ;
+};
+String STR_CHG_DELETE_TABS
+{
+ Text [ en-US ] = "Sheet deleted" ;
+};
+String STR_CHG_MOVE
+{
+ Text [ en-US ] = "Range moved" ;
+};
+String STR_CHG_CONTENT
+{
+ Text [ en-US ] = "Changed contents" ;
+};
+String STR_CHG_CONTENT_WITH_CHILD
+{
+ Text [ en-US ] = "Changed contents" ;
+};
+String STR_CHG_CHILD_CONTENT
+{
+ Text [ en-US ] = "Changed to " ;
+};
+String STR_CHG_CHILD_ORGCONTENT
+{
+ Text [ en-US ] = "Original" ;
+};
+String STR_CHG_REJECT
+{
+ Text [ en-US ] = "Changes rejected" ;
+};
+String STR_CHG_ACCEPTED
+{
+ Text [ en-US ] = "Accepted" ;
+};
+String STR_CHG_REJECTED
+{
+ Text [ en-US ] = "Rejected" ;
+};
+String STR_CHG_NO_ENTRY
+{
+ Text [ en-US ] = "No Entry" ;
+};
+String STR_CHG_EMPTY
+{
+ Text [ en-US ] = "<empty>" ;
};
Menu RID_POPUP_CHANGES
diff --git a/svx/UI_svx.mk b/svx/UI_svx.mk
index 38945e83f69c..aee883f72fa8 100644
--- a/svx/UI_svx.mk
+++ b/svx/UI_svx.mk
@@ -10,9 +10,11 @@
$(eval $(call gb_UI_UI,svx))
$(eval $(call gb_UI_add_uifiles,svx,\
+ svx/uiconfig/ui/acceptrejectchangesdialog \
svx/uiconfig/ui/asianphoneticguidedialog \
svx/uiconfig/ui/chineseconversiondialog \
svx/uiconfig/ui/compressgraphicdialog \
+ svx/uiconfig/ui/redlinecontrol \
svx/uiconfig/ui/redlinefilterpage \
svx/uiconfig/ui/redlineviewpage \
))
diff --git a/svx/inc/svx/ctredlin.hxx b/svx/inc/svx/ctredlin.hxx
index d6d5f7b27243..f7b71ec62ff4 100644
--- a/svx/inc/svx/ctredlin.hxx
+++ b/svx/inc/svx/ctredlin.hxx
@@ -351,42 +351,38 @@ public:
void SetUndoClickHdl( const Link& rLink ) { UndoClickLk = rLink; }
const Link& GetUndoAllClickHdl() const { return UndoClickLk; }
+
+ virtual void ActivatePage();
+ virtual void DeactivatePage();
};
//==================================================================
// Redlining - Control (Accept- Changes)
//==================================================================
-class SVX_DLLPUBLIC SvxAcceptChgCtr : public Control
+class SVX_DLLPUBLIC SvxAcceptChgCtr
+ : public TabControl
+ , public VclBuilderContainer
{
private:
- Link aMinSizeLink;
- TabControl aTCAccept;
SvxTPFilter* pTPFilter;
SvxTPView* pTPView;
- Size aMinSize;
-
-protected:
- virtual void Resize();
+ sal_uInt16 m_nViewPageId;
+ sal_uInt16 m_nFilterPageId;
public:
- SvxAcceptChgCtr( Window* pParent, const ResId& rResId );
+ SvxAcceptChgCtr(Window* pParent);
~SvxAcceptChgCtr();
- Size GetMinSizePixel() const;
-
void ShowFilterPage();
void ShowViewPage();
SvxTPFilter* GetFilterPage();
SvxTPView* GetViewPage();
SvxRedlinTable* GetViewTable();
-
- void SetMinSizeHdl( const Link& rLink ) { aMinSizeLink= rLink; }
- const Link& GetMinSizeHdl() const { return aMinSizeLink; }
};
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 1c2fe8211aae..6d47ea76d32f 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <vcl/dialog.hxx>
#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
#include <tools/shl.hxx>
@@ -486,17 +487,18 @@ void SvxRedlinTable::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
// class SvxTPView
//----------------------------------------------------------------------------
-SvxTPView::SvxTPView( Window * pParent)
+SvxTPView::SvxTPView(Window * pParent)
: TabPage(pParent, "RedlineViewPage", "svx/ui/redlineviewpage.ui")
{
- get(m_pAccept, "accept");
- get(m_pReject, "reject");
- get(m_pAcceptAll, "acceptall");
- get(m_pRejectAll, "rejectall");
- get(m_pUndo, "undo");
+ Dialog *pTopLevel = GetParentDialog();
+ pTopLevel->get(m_pAccept, "accept");
+ pTopLevel->get(m_pReject, "reject");
+ pTopLevel->get(m_pAcceptAll, "acceptall");
+ pTopLevel->get(m_pRejectAll, "rejectall");
+ pTopLevel->get(m_pUndo, "undo");
SvxSimpleTableContainer* pTable = get<SvxSimpleTableContainer>("changes");
- Size aControlSize(221, 130);
+ Size aControlSize(221, 65);
aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
pTable->set_width_request(aControlSize.Width());
pTable->set_height_request(aControlSize.Height());
@@ -513,6 +515,26 @@ SvxTPView::SvxTPView( Window * pParent)
m_pViewData->SetTabs(nStaticTabs);
}
+void SvxTPView::ActivatePage()
+{
+ m_pAccept->Enable();
+ m_pReject->Enable();
+ m_pAcceptAll->Enable();
+ m_pRejectAll->Enable();
+ m_pUndo->Enable();
+ TabPage::ActivatePage();
+}
+
+void SvxTPView::DeactivatePage()
+{
+ TabPage::DeactivatePage();
+ m_pAccept->Disable();
+ m_pReject->Disable();
+ m_pAcceptAll->Disable();
+ m_pRejectAll->Disable();
+ m_pUndo->Disable();
+}
+
SvxTPView::~SvxTPView()
{
delete m_pViewData;
@@ -1153,40 +1175,28 @@ IMPL_LINK( SvxTPFilter, RefHandle, PushButton*, pRef )
return 0;
}
-static Size gDiffSize;
//============================================================================
// class SvxAcceptChgCtr
//----------------------------------------------------------------------------
-SvxAcceptChgCtr::SvxAcceptChgCtr( Window* pParent, const ResId& rResId )
- : Control(pParent,rResId ),
- aTCAccept(this,WB_TABSTOP |WB_DIALOGCONTROL)
+SvxAcceptChgCtr::SvxAcceptChgCtr(Window* pParent)
+ : TabControl(pParent, WB_TABSTOP | WB_DIALOGCONTROL)
{
- pTPFilter=new SvxTPFilter(&aTCAccept);
- pTPView=new SvxTPView(&aTCAccept);
-
- aMinSize = VclContainer::getLayoutRequisition(*pTPView);
-
- aTCAccept.InsertPage( TP_VIEW, SVX_RESSTR(RID_SVXSTR_VIEW));
- aTCAccept.InsertPage( TP_FILTER, SVX_RESSTR(RID_SVXSTR_FILTER));
- aTCAccept.SetTabPage( TP_VIEW, pTPView);
- aTCAccept.SetTabPage( TP_FILTER, pTPFilter);
- aTCAccept.SetHelpId(HID_REDLINING_TABCONTROL);
+ m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "svx/ui/redlinecontrol.ui", "RedlineControl");
- aTCAccept.SetTabPageSizePixel(aMinSize);
- Size aSize=aTCAccept.GetSizePixel();
-
- gDiffSize.Height()=aSize.Height()-aMinSize.Height();
- gDiffSize.Width()=aSize.Width()-aMinSize.Width();
+ pTPFilter = new SvxTPFilter(this);
+ pTPView = new SvxTPView(this);
+ m_nViewPageId = GetPageId("view");
+ m_nFilterPageId = GetPageId("filter");
+ SetTabPage(m_nViewPageId, pTPView);
+ SetTabPage(m_nFilterPageId, pTPFilter);
pTPFilter->SetRedlinTable(GetViewTable());
- WinBits nWinStyle=GetStyle()|WB_DIALOGCONTROL;
- SetStyle(nWinStyle);
- aTCAccept.Show();
ShowViewPage();
- Resize();
+
+ Show();
}
SvxAcceptChgCtr::~SvxAcceptChgCtr()
@@ -1195,50 +1205,14 @@ SvxAcceptChgCtr::~SvxAcceptChgCtr()
delete pTPFilter;
}
-void SvxAcceptChgCtr::Resize()
-{
- aMinSize = VclContainer::getLayoutRequisition(*pTPView);
- Size aSize=GetOutputSizePixel();
- sal_Bool bFlag=sal_False;
-
- if(aMinSize.Height()>aSize.Height())
- {
- aSize.Height()=aMinSize.Height();
- bFlag=sal_True;
- }
- if(aMinSize.Width()>aSize.Width())
- {
- aSize.Width()=aMinSize.Width();
- bFlag=sal_True;
- }
-
- if(bFlag)
- {
- SetOutputSizePixel(aSize);
- aMinSizeLink.Call(this);
- }
-
- aSize.Height()-=2;
- aSize.Width()-=2;
- aTCAccept.SetSizePixel(aSize);
-}
-
-Size SvxAcceptChgCtr::GetMinSizePixel() const
-{
- Size aSize = VclContainer::getLayoutRequisition(*pTPView);
- aSize.Height()+=gDiffSize.Height();
- aSize.Width()+=gDiffSize.Width();
- return aSize;
-}
-
void SvxAcceptChgCtr::ShowFilterPage()
{
- aTCAccept.SetCurPageId(TP_FILTER);
+ SetCurPageId(m_nFilterPageId);
}
void SvxAcceptChgCtr::ShowViewPage()
{
- aTCAccept.SetCurPageId(TP_VIEW);
+ SetCurPageId(m_nViewPageId);
}
SvxTPFilter* SvxAcceptChgCtr::GetFilterPage()
@@ -1253,15 +1227,7 @@ SvxTPView* SvxAcceptChgCtr::GetViewPage()
SvxRedlinTable* SvxAcceptChgCtr::GetViewTable()
{
- if(pTPView!=NULL)
- {
- return pTPView->GetTableControl();
- }
- else
- {
- return NULL;
- }
+ return pTPView ? pTPView->GetTableControl() : NULL;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/uiconfig/ui/acceptrejectchangesdialog.ui b/svx/uiconfig/ui/acceptrejectchangesdialog.ui
new file mode 100644
index 000000000000..6377c6cd4fe7
--- /dev/null
+++ b/svx/uiconfig/ui/acceptrejectchangesdialog.ui
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="AcceptRejectChangesDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Accept or Reject Changes</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="accept">
+ <property name="label" translatable="yes">_Accept</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="reject">
+ <property name="label" translatable="yes">_Reject</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="acceptall">
+ <property name="label" translatable="yes">A_ccept All</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="rejectall">
+ <property name="label" translatable="yes">R_eject All</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="undo">
+ <property name="label">gtk-undo</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="close">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">accept</action-widget>
+ <action-widget response="0">reject</action-widget>
+ <action-widget response="0">acceptall</action-widget>
+ <action-widget response="0">rejectall</action-widget>
+ <action-widget response="0">undo</action-widget>
+ <action-widget response="0">close</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/svx/uiconfig/ui/redlinecontrol.ui b/svx/uiconfig/ui/redlinecontrol.ui
index 457b4ee6e48d..61a377bf1687 100644
--- a/svx/uiconfig/ui/redlinecontrol.ui
+++ b/svx/uiconfig/ui/redlinecontrol.ui
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <object class="GtkNotebook" id="notebook1">
+ <object class="GtkNotebook" id="RedlineControl">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<child>
<placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="label1">
+ <object class="GtkLabel" id="view">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">List</property>
@@ -21,7 +23,7 @@
<placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="filter">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Filter</property>
diff --git a/svx/uiconfig/ui/redlineviewpage.ui b/svx/uiconfig/ui/redlineviewpage.ui
index 84c99cd4c3e0..d5e538e60b1d 100644
--- a/svx/uiconfig/ui/redlineviewpage.ui
+++ b/svx/uiconfig/ui/redlineviewpage.ui
@@ -5,129 +5,20 @@
<object class="GtkBox" id="RedlineViewPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
<child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
+ <object class="GtkBox" id="box3">
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox" id="box3">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="action">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Action</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="position">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Postion</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="author">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Author</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="date">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Date</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="comment">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Comment</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="no_show_all">True</property>
+ <property name="homogeneous">True</property>
<child>
- <object class="svxcorelo-SvxSimpleTableContainer" id="changes">
+ <object class="GtkLabel" id="action">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="changes-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">Changes</property>
- </object>
- </child>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="Simple Table Container-selection1"/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButtonBox" id="buttonbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <property name="layout_style">spread</property>
- <child>
- <object class="GtkButton" id="accept">
- <property name="label" translatable="yes">_Accept</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes">Action</property>
</object>
<packing>
<property name="expand">False</property>
@@ -136,12 +27,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="reject">
- <property name="label" translatable="yes">_Reject</property>
+ <object class="GtkLabel" id="position">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Postion</property>
</object>
<packing>
<property name="expand">False</property>
@@ -150,12 +39,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="acceptall">
- <property name="label" translatable="yes">A_ccept All</property>
+ <object class="GtkLabel" id="author">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Author</property>
</object>
<packing>
<property name="expand">False</property>
@@ -164,12 +51,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="rejectall">
- <property name="label" translatable="yes">R_eject All</property>
+ <object class="GtkLabel" id="date">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Date</property>
</object>
<packing>
<property name="expand">False</property>
@@ -178,12 +63,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="undo">
- <property name="label">gtk-undo</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="no_show_all">True</property>
- <property name="use_stock">True</property>
+ <object class="GtkLabel" id="comment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Comment</property>
</object>
<packing>
<property name="expand">False</property>
@@ -195,7 +78,28 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxcorelo-SvxSimpleTableContainer" id="changes">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="changes-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes">Changes</property>
+ </object>
+ </child>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Simple Table Container-selection"/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index 9bdc71f8e2a9..d410de64faeb 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -10,7 +10,6 @@
$(eval $(call gb_UI_UI,modules/swriter))
$(eval $(call gb_UI_add_uifiles,modules/swriter,\
- sw/uiconfig/swriter/ui/acceptrejectchanges \
sw/uiconfig/swriter/ui/autoformattable \
sw/uiconfig/swriter/ui/autotext \
sw/uiconfig/swriter/ui/bibliographyentry \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 26dd338dce82..2f608eab459b 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -138,7 +138,6 @@
#define HID_FILEDLG_SRCVIEW "SW_HID_FILEDLG_SRCVIEW"
#define HID_FILEDLG_WIZDOKU "SW_HID_FILEDLG_WIZDOKU"
-#define HID_REDLINE_AUTOFMT_ACCEPT "SW_HID_REDLINE_AUTOFMT_ACCEPT"
#define HID_MULTI_TOX_DLG "SW_HID_MULTI_TOX_DLG"
#define HID_ASCII_FILTER "SW_HID_ASCII_FILTER"
#define HID_GLBLTREE_EDIT_LINK "SW_HID_GLBLTREE_EDIT_LINK"
@@ -175,7 +174,6 @@
#define HID_OPTSHDWCRSR "SW_HID_OPTSHDWCRSR"
#define HID_NUMPARA "SW_HID_NUMPARA"
#define HID_REDLINE_OPT "SW_HID_REDLINE_OPT"
-#define HID_REDLINE_ACCEPT "SW_HID_REDLINE_ACCEPT"
#define HID_EDIT_FLD_DB "SW_HID_EDIT_FLD_DB"
#define HID_EDIT_FLD_DOKINF "SW_HID_EDIT_FLD_DOKINF"
#define HID_EDIT_FLD_VAR "SW_HID_EDIT_FLD_VAR"
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index ac42c4b04410..0551921b0710 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -397,7 +397,7 @@ public:
virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg( Window* pParent, //add for SwRenameXNamedDlg
::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess, int nResId ) = 0;
- virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ) = 0; //add for SwModalRedlineAcceptDlg
+ virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg(Window *pParent) = 0;
virtual VclAbstractDialog* CreateSwVclDialog( int nResId, Window* pParent, sal_Bool& rWithPrev ) = 0; //add for SwMergeTblDlg
virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index da55531de7c6..62e75620bbd9 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1035,21 +1035,10 @@ AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDl
return 0;
}
-AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId )
+AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg(Window *pParent)
{
- SwModalRedlineAcceptDlg* pDlg=NULL;
- switch ( nResId )
- {
- case DLG_MOD_REDLINE_ACCEPT :
- pDlg = new SwModalRedlineAcceptDlg( pParent );
- break;
- default:
- break;
- }
-
- if ( pDlg )
- return new AbstractSwModalRedlineAcceptDlg_Impl( pDlg );
- return 0;
+ SwModalRedlineAcceptDlg* pDlg = new SwModalRedlineAcceptDlg( pParent );
+ return new AbstractSwModalRedlineAcceptDlg_Impl( pDlg );
}
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index e5dbd9063024..836afb6d0e18 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -488,7 +488,7 @@ public:
virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg( Window* pParent, //add for SwRenameXNamedDlg
::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess, int nResId );
- virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ); //add for SwModalRedlineAcceptDlg
+ virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg(Window *pParent); //add for SwModalRedlineAcceptDlg
virtual VclAbstractDialog* CreateSwVclDialog( int nResId,
Window* pParent, sal_Bool& rWithPrev ); //add for SwMergeTblDlg
diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc
index 09448403f8a3..95efecca9f58 100644
--- a/sw/source/ui/inc/misc.hrc
+++ b/sw/source/ui/inc/misc.hrc
@@ -26,11 +26,8 @@
#define DLG_NUM_NAMES (RC_MISC_BEGIN + 18)
#define DLG_SORTING (RC_MISC_BEGIN + 19)
#define DLG_RENAME_GLOS (RC_MISC_BEGIN + 25)
-#define DLG_REDLINE_ACCEPT (RC_MISC_BEGIN + 29)
#define DLG_TAB_OUTLINE (RC_MISC_BEGIN + 31)
-#define DLG_MOD_REDLINE_ACCEPT (RC_MISC_BEGIN + 32)
-
#define MSG_DOUBLE_SHORTNAME (RC_MISC_BEGIN + 30)
#define MSG_QUERY_DELETE (RC_MISC_BEGIN + 31)
diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx
index e11c94811e33..f7e14079a13f 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -83,7 +83,6 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
String sFmtCollSet;
String sFilterAction;
String sAutoFormat;
- Size aBorderSz;
SvxTPView* pTPView;
SvxRedlinTable* pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
Link aOldSelectHdl;
@@ -131,7 +130,6 @@ public:
void FillInfo(String &rExtraData) const;
virtual void Activate();
- virtual void Resize();
};
class SwModelessRedlineAcceptDlg : public SfxModelessDialog
@@ -139,8 +137,6 @@ class SwModelessRedlineAcceptDlg : public SfxModelessDialog
SwRedlineAcceptDlg* pImplDlg;
SwChildWinWrapper* pChildWin;
- virtual void Resize();
-
public:
SwModelessRedlineAcceptDlg(SfxBindings*, SwChildWinWrapper*, Window *pParent);
~SwModelessRedlineAcceptDlg();
diff --git a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
index d076f64a5ede..a0f90f8f8843 100644
--- a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
+++ b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
@@ -27,8 +27,6 @@ class SwModalRedlineAcceptDlg : public SfxModalDialog
{
SwRedlineAcceptDlg* pImplDlg;
- virtual void Resize();
-
public:
SwModalRedlineAcceptDlg(Window *pParent);
~SwModalRedlineAcceptDlg();
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 8156657aac89..0706fbc8f632 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -84,15 +84,13 @@ sal_Bool SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh)
return bRet;
}
-SwModelessRedlineAcceptDlg::SwModelessRedlineAcceptDlg( SfxBindings* _pBindings,
- SwChildWinWrapper* pChild,
- Window *_pParent) :
- SfxModelessDialog(_pBindings, pChild, _pParent, SW_RES(DLG_REDLINE_ACCEPT)),
- pChildWin (pChild)
+SwModelessRedlineAcceptDlg::SwModelessRedlineAcceptDlg(
+ SfxBindings* _pBindings, SwChildWinWrapper* pChild, Window *_pParent)
+ : SfxModelessDialog(_pBindings, pChild, _pParent,
+ "AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui")
+ , pChildWin (pChild)
{
pImplDlg = new SwRedlineAcceptDlg(this);
-
- FreeResource();
}
void SwModelessRedlineAcceptDlg::Activate()
@@ -139,12 +137,6 @@ void SwModelessRedlineAcceptDlg::FillInfo(SfxChildWinInfo& rInfo) const
pImplDlg->FillInfo(rInfo.aExtraString);
}
-void SwModelessRedlineAcceptDlg::Resize()
-{
- pImplDlg->Resize();
- SfxModelessDialog::Resize();
-}
-
SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
{
delete pImplDlg;
@@ -152,7 +144,7 @@ SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt) :
pParentDlg (pParent),
- aTabPagesCTRL (pParent, SW_RES(CTRL_TABPAGES)),
+ aTabPagesCTRL (pParent->get_content_area()),
aPopup (SW_RES(MN_REDLINE_POPUP)),
sInserted (SW_RES(STR_REDLINE_INSERTED)),
sDeleted (SW_RES(STR_REDLINE_DELETED)),
@@ -206,19 +198,6 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt) :
pTable->SetTabs(aStaticTabs);
- // set minimum size
- Size aMinSz(aTabPagesCTRL.GetMinSizePixel());
- Point aPos(aTabPagesCTRL.GetPosPixel());
-
- aMinSz.Width() += (aPos.X() * 2 - 1);
- aMinSz.Height() += (aPos.Y() * 2 - 1);
- pParentDlg->SetMinOutputSizePixel(aMinSz);
-
- if (pParentDlg->GetOutputSizePixel().Width() < aMinSz.Width())
- pParentDlg->SetOutputSizePixel(Size(aMinSz.Width(), pParentDlg->GetOutputSizePixel().Height()));
- if (pParentDlg->GetOutputSizePixel().Height() < aMinSz.Height())
- pParentDlg->SetOutputSizePixel(Size(pParentDlg->GetOutputSizePixel().Width(), aMinSz.Height()));
-
pTable->SortByCol(nSortMode, bSortDir);
aOldSelectHdl = pTable->GetSelectHdl();
@@ -362,18 +341,6 @@ const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, sal_uIn
return aEmptyStr;
}
-void SwRedlineAcceptDlg::Resize()
-{
- Size aSz(pParentDlg->GetOutputSizePixel());
-
- Point aPos(aTabPagesCTRL.GetPosPixel());
-
- aSz.Width() -= (aPos.X() * 2 - 1);
- aSz.Height() -= (aPos.Y() * 2 - 1);
-
- aTabPagesCTRL.SetOutputSizePixel(aSz);
-}
-
/*--------------------------------------------------------------------
Description: newly initialise after activation
--------------------------------------------------------------------*/
diff --git a/sw/source/ui/misc/redlndlg.hrc b/sw/source/ui/misc/redlndlg.hrc
index dd8fa7fd52a2..b83b5b35ab94 100644
--- a/sw/source/ui/misc/redlndlg.hrc
+++ b/sw/source/ui/misc/redlndlg.hrc
@@ -15,7 +15,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#define CTRL_TABPAGES 1
#define MN_EDIT_COMMENT 1
#define MN_SUB_SORT 2
@@ -24,6 +23,3 @@
#define MN_SORT_DATE 5
#define MN_SORT_COMMENT 6
#define MN_SORT_POSITION 7
-
-#define XBORDER 3
-#define YBORDER 3
diff --git a/sw/source/ui/misc/redlndlg.src b/sw/source/ui/misc/redlndlg.src
index 268bdf5187e0..5b79c1b90503 100644
--- a/sw/source/ui/misc/redlndlg.src
+++ b/sw/source/ui/misc/redlndlg.src
@@ -21,39 +21,6 @@
#include "misc.hrc"
#include "helpid.h"
-#define WIDTH 297
-#define HEIGHT 169
-
-#define REDLNDLG \
- OutputSize = TRUE ; \
- SVLook = TRUE ; \
- Size = MAP_APPFONT ( WIDTH , HEIGHT ) ; \
- Moveable = TRUE ; \
- Closeable = TRUE ; \
- Sizeable = TRUE ; \
- Hide = TRUE ; \
- Control CTRL_TABPAGES\
- {\
- Pos = MAP_APPFONT ( XBORDER , YBORDER ) ; \
- Size = MAP_APPFONT ( WIDTH - XBORDER * 2 , HEIGHT - YBORDER * 2 ) ; \
- HelpID = HID_REDLINE_CTRL ; \
- TabStop = TRUE ; \
- };
-
-ModelessDialog DLG_REDLINE_ACCEPT
-{
- HelpID = HID_REDLINE_ACCEPT ;
- Text [ en-US ] = "Accept or Reject Changes" ;
- REDLNDLG
-};
-
-ModalDialog DLG_MOD_REDLINE_ACCEPT
-{
- HelpID = HID_REDLINE_AUTOFMT_ACCEPT ;
- REDLNDLG
- Text [ en-US ] = "Accept or Reject AutoCorrect Changes";
-};
-
Menu MN_REDLINE_POPUP
{
ItemList =
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 528380e49344..45ac31c15c75 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -34,7 +34,6 @@
#include <helpid.h>
#include <cmdid.h>
#include <misc.hrc>
-#include <redlndlg.hrc>
#include <shells.hrc>
#include <vector>
@@ -43,15 +42,14 @@
#include <unomid.h>
-SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
- SfxModalDialog(pParent, SW_RES(DLG_MOD_REDLINE_ACCEPT))
+SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent)
+ : SfxModalDialog(pParent,
+ "AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui")
{
pImplDlg = new SwRedlineAcceptDlg(this, sal_True);
pImplDlg->Initialize(GetExtraData());
pImplDlg->Activate(); // for data's initialisation
-
- FreeResource();
}
SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
@@ -66,12 +64,6 @@ void SwModalRedlineAcceptDlg::Activate()
{
}
-void SwModalRedlineAcceptDlg::Resize()
-{
- pImplDlg->Resize();
- SfxModalDialog::Resize();
-}
-
void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
{
SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 7e168d16dcc1..830d5101697a 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -603,7 +603,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwModalRedlineAcceptDlg* pDlg = pFact->CreateSwModalRedlineAcceptDlg( &GetView().GetEditWin(), DLG_MOD_REDLINE_ACCEPT );
+ AbstractSwModalRedlineAcceptDlg* pDlg = pFact->CreateSwModalRedlineAcceptDlg(&GetView().GetEditWin());
OSL_ENSURE(pDlg, "Dialogdiet fail!");
switch (lcl_AskRedlineMode(&GetView().GetEditWin()))
diff --git a/sw/uiconfig/swriter/ui/acceptrejectchanges.ui b/sw/uiconfig/swriter/ui/acceptrejectchanges.ui
deleted file mode 100644
index 2ebcf117269f..000000000000
--- a/sw/uiconfig/swriter/ui/acceptrejectchanges.ui
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkDialog" id="AcceptRejectChangesDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Accept or Reject Changes</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkNotebook" id="notebook1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">List</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Filter</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>