convert writer changes menu to .ui
Change-Id: I30a957f91c3faca5e16a70efce08579ac3368bdf
This commit is contained in:
@@ -1679,15 +1679,15 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, CommandHdl, SvSimpleTable*, void)
|
||||
m_xPopup->Deactivate();
|
||||
}
|
||||
|
||||
const sal_uInt16 nSubSortId = m_xPopup->GetItemId("sort");
|
||||
const sal_uInt16 nSubSortId = m_xPopup->GetItemId("calcsort");
|
||||
PopupMenu *pSubMenu = m_xPopup->GetPopupMenu(nSubSortId);
|
||||
const sal_uInt16 nActionId = pSubMenu->GetItemId("action");
|
||||
const sal_uInt16 nActionId = pSubMenu->GetItemId("calcaction");
|
||||
|
||||
sal_uInt16 nSortedCol = pTheView->GetSortedCol();
|
||||
if (nSortedCol != 0xFFFF)
|
||||
pSubMenu->CheckItem(nActionId + nSortedCol);
|
||||
|
||||
const sal_uInt16 nEditId = m_xPopup->GetItemId("edit");
|
||||
const sal_uInt16 nEditId = m_xPopup->GetItemId("calcedit");
|
||||
|
||||
m_xPopup->EnableItem(nEditId, false);
|
||||
|
||||
|
@@ -128,14 +128,14 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="edit">
|
||||
<object class="GtkMenuItem" id="calcedit">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Edit Comment...</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="sort">
|
||||
<object class="GtkMenuItem" id="calcsort">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Sorting</property>
|
||||
@@ -145,7 +145,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="action">
|
||||
<object class="GtkRadioMenuItem" id="calcaction">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Action</property>
|
||||
@@ -153,7 +153,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="position">
|
||||
<object class="GtkRadioMenuItem" id="calcposition">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Position</property>
|
||||
@@ -161,7 +161,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="author">
|
||||
<object class="GtkRadioMenuItem" id="calcauthor">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Author</property>
|
||||
@@ -169,7 +169,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="date">
|
||||
<object class="GtkRadioMenuItem" id="calcdate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Date</property>
|
||||
@@ -177,7 +177,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="desc">
|
||||
<object class="GtkRadioMenuItem" id="calcdesc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Description</property>
|
||||
@@ -189,4 +189,69 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkMenu" id="writermenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="writeredit">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Edit Comment...</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="writersort">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Sort By</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="writeraction">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Action</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="writerauthor">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Author</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="writerdate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Date</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="writerdesc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Comment</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="writerposition">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Document Position</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
@@ -66,7 +66,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
|
||||
sw/source/uibase/dialog/regionsw.src \
|
||||
sw/source/uibase/docvw/docvw.src \
|
||||
sw/source/uibase/lingu/olmenu.src \
|
||||
sw/source/uibase/misc/redlndlg.src \
|
||||
sw/source/uibase/ribbar/inputwin.src \
|
||||
sw/source/uibase/ribbar/workctrl.src \
|
||||
sw/source/uibase/uiview/view.src \
|
||||
|
@@ -58,13 +58,6 @@
|
||||
#define HID_GLBLTREE_UPD_IDX "SW_HID_GLBLTREE_UPD_IDX"
|
||||
#define HID_GLBLTREE_UPD_LINK "SW_HID_GLBLTREE_UPD_LINK"
|
||||
#define HID_GLBLTREEUPD_ALL "SW_HID_GLBLTREEUPD_ALL"
|
||||
#define HID_SORT_ACTION "SW_HID_SORT_ACTION"
|
||||
#define HID_SORT_AUTHOR "SW_HID_SORT_AUTHOR"
|
||||
#define HID_SORT_DATE "SW_HID_SORT_DATE"
|
||||
#define HID_SORT_COMMENT "SW_HID_SORT_COMMENT"
|
||||
#define HID_SW_SORT_POSITION "SW_HID_SW_SORT_POSITION"
|
||||
#define HID_EDIT_COMMENT "SW_HID_EDIT_COMMENT"
|
||||
|
||||
|
||||
#define HID_GLBLTREE_EDIT_LINK "SW_HID_GLBLTREE_EDIT_LINK"
|
||||
|
||||
@@ -73,8 +66,6 @@
|
||||
|
||||
#define HID_REDLINE_CTRL "SW_HID_REDLINE_CTRL"
|
||||
|
||||
|
||||
|
||||
// sw::sidebar::PagePropertyPanel
|
||||
#define HID_SWPAGE_LEFT_MARGIN "HID_SWPAGE_LEFT_MARGIN"
|
||||
#define HID_SWPAGE_RIGHT_MARGIN "HID_SWPAGE_RIGHT_MARGIN"
|
||||
|
@@ -39,7 +39,6 @@
|
||||
#define STR_CHANGE_END (RC_MISC_BEGIN + 45)
|
||||
#define STR_SAVE_GLOSSARY (RC_MISC_BEGIN + 46)
|
||||
|
||||
#define MN_REDLINE_POPUP (RC_MISC_BEGIN + 61)
|
||||
#define STR_MY_AUTOTEXT (RC_MISC_BEGIN + 64)
|
||||
|
||||
#define STR_COMMENTS_LABEL (RC_MISC_BEGIN + 65)
|
||||
|
@@ -66,7 +66,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg final
|
||||
SwRedlineDataChildArr m_RedlineChildren;
|
||||
SwRedlineDataParentSortArr m_aUsedSeqNo;
|
||||
VclPtr<SvxAcceptChgCtr> m_aTabPagesCTRL;
|
||||
ScopedVclPtrInstance<PopupMenu> m_aPopup;
|
||||
VclPtr<PopupMenu> m_xPopup;
|
||||
Timer m_aDeselectTimer;
|
||||
Timer m_aSelectTimer;
|
||||
OUString m_sInserted;
|
||||
|
@@ -36,7 +36,6 @@
|
||||
#include <helpid.h>
|
||||
#include <cmdid.h>
|
||||
#include <misc.hrc>
|
||||
#include <redlndlg.hrc>
|
||||
#include <shells.hrc>
|
||||
|
||||
// -> #111827#
|
||||
@@ -150,7 +149,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer
|
||||
vcl::Window *pContentArea, bool bAutoFormat) :
|
||||
m_pParentDlg (pParent),
|
||||
m_aTabPagesCTRL (VclPtr<SvxAcceptChgCtr>::Create(pContentArea, pBuilder)),
|
||||
m_aPopup (SW_RES(MN_REDLINE_POPUP)),
|
||||
m_xPopup(pBuilder->get_menu("writermenu")),
|
||||
m_sInserted (SW_RES(STR_REDLINE_INSERTED)),
|
||||
m_sDeleted (SW_RES(STR_REDLINE_DELETED)),
|
||||
m_sFormated (SW_RES(STR_REDLINE_FORMATED)),
|
||||
@@ -1012,10 +1011,9 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
|
||||
{
|
||||
const CommandEvent aCEvt(m_pTable->GetCommandEvent());
|
||||
|
||||
switch ( aCEvt.GetCommand() )
|
||||
{
|
||||
case CommandEventId::ContextMenu:
|
||||
{
|
||||
if (aCEvt.GetCommand() != CommandEventId::ContextMenu)
|
||||
return;
|
||||
|
||||
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
|
||||
SvTreeListEntry* pEntry = m_pTable->FirstSelected();
|
||||
const SwRangeRedline *pRed = nullptr;
|
||||
@@ -1038,32 +1036,27 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
|
||||
}
|
||||
}
|
||||
|
||||
m_aPopup->EnableItem( MN_EDIT_COMMENT, pEntry && pRed &&
|
||||
!m_pTable->GetParent(pEntry) &&
|
||||
!m_pTable->NextSelected(pEntry)
|
||||
//JP 27.9.2001: make no sense if we handle readonly sections
|
||||
// && pRed->HasReadonlySel()
|
||||
);
|
||||
const sal_uInt16 nEditId = m_xPopup->GetItemId("writeredit");
|
||||
|
||||
m_xPopup->EnableItem(nEditId, pEntry && pRed &&
|
||||
!m_pTable->GetParent(pEntry) &&
|
||||
!m_pTable->NextSelected(pEntry));
|
||||
|
||||
m_aPopup->EnableItem( MN_SUB_SORT, m_pTable->First() != nullptr );
|
||||
sal_uInt16 nColumn = m_pTable->GetSortedCol();
|
||||
if (nColumn == 0xffff)
|
||||
nColumn = 4;
|
||||
|
||||
PopupMenu *pSubMenu = m_aPopup->GetPopupMenu(MN_SUB_SORT);
|
||||
if (pSubMenu)
|
||||
{
|
||||
for (sal_uInt16 i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++)
|
||||
const sal_uInt16 nSubSortId = m_xPopup->GetItemId("writersort");
|
||||
m_xPopup->EnableItem(nSubSortId, m_pTable->First() != nullptr);
|
||||
PopupMenu *pSubMenu = m_xPopup->GetPopupMenu(nSubSortId);
|
||||
const sal_uInt16 nActionId = pSubMenu->GetItemId("writeraction");
|
||||
for (sal_uInt16 i = nActionId; i < nActionId + 5; ++i)
|
||||
pSubMenu->CheckItem(i, false);
|
||||
pSubMenu->CheckItem(nActionId + nColumn);
|
||||
|
||||
pSubMenu->CheckItem(nColumn + MN_SORT_ACTION);
|
||||
}
|
||||
sal_uInt16 nRet = m_xPopup->Execute(m_pTable, aCEvt.GetMousePosPixel());
|
||||
|
||||
sal_uInt16 nRet = m_aPopup->Execute(m_pTable, aCEvt.GetMousePosPixel());
|
||||
|
||||
switch( nRet )
|
||||
{
|
||||
case MN_EDIT_COMMENT:
|
||||
if (nRet == nEditId)
|
||||
{
|
||||
if (pEntry)
|
||||
{
|
||||
@@ -1073,7 +1066,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
|
||||
sal_uInt16 nPos = GetRedlinePos(*pEntry);
|
||||
|
||||
if (nPos == USHRT_MAX)
|
||||
break;
|
||||
return;
|
||||
|
||||
const SwRangeRedline &rRedline = pSh->GetRedline(nPos);
|
||||
|
||||
@@ -1141,21 +1134,14 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
|
||||
pDlg.disposeAndClear();
|
||||
SwViewShell::SetCareWin(nullptr);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case MN_SORT_ACTION:
|
||||
case MN_SORT_AUTHOR:
|
||||
case MN_SORT_DATE:
|
||||
case MN_SORT_COMMENT:
|
||||
case MN_SORT_POSITION:
|
||||
else if (nRet)
|
||||
{
|
||||
bSortDir = true;
|
||||
if (nRet - MN_SORT_ACTION == 4 && m_pTable->GetSortedCol() == 0xffff)
|
||||
break; // we already have it
|
||||
if (nRet - nActionId == 4 && m_pTable->GetSortedCol() == 0xffff)
|
||||
return; // we already have it
|
||||
|
||||
nSortMode = nRet - MN_SORT_ACTION;
|
||||
nSortMode = nRet - nActionId;
|
||||
if (nSortMode == 4)
|
||||
nSortMode = 0xffff; // unsorted / sorted by position
|
||||
|
||||
@@ -1167,12 +1153,6 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
|
||||
if (nSortMode == 0xffff)
|
||||
Init(); // newly fill everything
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
void SwRedlineAcceptDlg::Initialize(const OUString& rExtraData)
|
||||
|
@@ -1,28 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#define MN_EDIT_COMMENT 1
|
||||
#define MN_SUB_SORT 2
|
||||
#define MN_SORT_ACTION 3
|
||||
#define MN_SORT_AUTHOR 4
|
||||
#define MN_SORT_DATE 5
|
||||
#define MN_SORT_COMMENT 6
|
||||
#define MN_SORT_POSITION 7
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -1,85 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
/* StarView resource file */
|
||||
|
||||
#include "redlndlg.hrc"
|
||||
#include "misc.hrc"
|
||||
#include "helpid.h"
|
||||
|
||||
Menu MN_REDLINE_POPUP
|
||||
{
|
||||
ItemList =
|
||||
{
|
||||
MenuItem
|
||||
{
|
||||
Identifier = MN_EDIT_COMMENT ;
|
||||
HelpID = HID_EDIT_COMMENT ;
|
||||
Text [ en-US ] = "Edit Comment..." ;
|
||||
};
|
||||
MenuItem
|
||||
{
|
||||
Identifier = MN_SUB_SORT ;
|
||||
RadioCheck = TRUE ;
|
||||
SubMenu = Menu
|
||||
{
|
||||
ItemList =
|
||||
{
|
||||
MenuItem
|
||||
{
|
||||
Identifier = MN_SORT_ACTION ;
|
||||
HelpID = HID_SORT_ACTION ;
|
||||
RadioCheck = TRUE ;
|
||||
Text [ en-US ] = "Action" ;
|
||||
};
|
||||
MenuItem
|
||||
{
|
||||
Identifier = MN_SORT_AUTHOR ;
|
||||
HelpID = HID_SORT_AUTHOR ;
|
||||
RadioCheck = TRUE ;
|
||||
Text [ en-US ] = "Author" ;
|
||||
};
|
||||
MenuItem
|
||||
{
|
||||
Identifier = MN_SORT_DATE ;
|
||||
HelpID = HID_SORT_DATE ;
|
||||
RadioCheck = TRUE ;
|
||||
Text [ en-US ] = "Date" ;
|
||||
};
|
||||
MenuItem
|
||||
{
|
||||
Identifier = MN_SORT_COMMENT ;
|
||||
HelpID = HID_SORT_COMMENT ;
|
||||
RadioCheck = TRUE ;
|
||||
Text [ en-US ] = "Comment" ;
|
||||
};
|
||||
MenuItem
|
||||
{
|
||||
Identifier = MN_SORT_POSITION ;
|
||||
HelpID = HID_SW_SORT_POSITION ;
|
||||
RadioCheck = TRUE ;
|
||||
Text [ en-US ] = "Document position" ;
|
||||
};
|
||||
};
|
||||
};
|
||||
Text [ en-US ] = "Sort By" ;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
Reference in New Issue
Block a user