Convert RID_SCDLG_RETYPEPASS to .ui
Change-Id: I5d6e1ba67bf04c4a10e92f203fcbf36b58a8801c Reviewed-on: https://gerrit.libreoffice.org/10178 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
committed by
Caolán McNamara
parent
2df4f9425c
commit
91ebd8825b
@@ -135,6 +135,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
|
||||
sc/uiconfig/scalc/ui/protectsheetdlg \
|
||||
sc/uiconfig/scalc/ui/queryrunstreamscriptdialog \
|
||||
sc/uiconfig/scalc/ui/randomnumbergenerator \
|
||||
sc/uiconfig/scalc/ui/retypepassdialog \
|
||||
sc/uiconfig/scalc/ui/retypepassworddialog \
|
||||
sc/uiconfig/scalc/ui/rightfooterdialog \
|
||||
sc/uiconfig/scalc/ui/rightheaderdialog \
|
||||
|
@@ -19,39 +19,11 @@
|
||||
|
||||
#include <sc.hrc>
|
||||
|
||||
#define BTN_OK 1
|
||||
#define BTN_CANCEL 2
|
||||
#define BTN_HELP 3
|
||||
|
||||
#define FT_DESC 10
|
||||
#define FL_DOCUMENT 11
|
||||
#define FT_DOCSTATUS 12
|
||||
#define BTN_RETYPE_DOC 13
|
||||
|
||||
#define FL_SHEET 112
|
||||
|
||||
#define FT_SHEETNAME1 113
|
||||
#define FT_SHEETSTATUS1 114
|
||||
#define BTN_RETYPE_SHEET1 115
|
||||
|
||||
#define FT_SHEETNAME2 116
|
||||
#define FT_SHEETSTATUS2 117
|
||||
#define BTN_RETYPE_SHEET2 118
|
||||
|
||||
#define FT_SHEETNAME3 119
|
||||
#define FT_SHEETSTATUS3 120
|
||||
#define BTN_RETYPE_SHEET3 121
|
||||
|
||||
#define FT_SHEETNAME4 122
|
||||
#define FT_SHEETSTATUS4 123
|
||||
#define BTN_RETYPE_SHEET4 124
|
||||
|
||||
#define SB_SCROLL 190
|
||||
|
||||
#define STR_NOT_PROTECTED 200
|
||||
#define STR_NOT_PASS_PROTECTED 201
|
||||
#define STR_HASH_BAD 202
|
||||
#define STR_HASH_GOOD 203
|
||||
#define STR_HASH_REGENERATED 204
|
||||
#define STR_NOT_PROTECTED 256
|
||||
#define STR_NOT_PASS_PROTECTED 257
|
||||
#define STR_HASH_BAD 258
|
||||
#define STR_HASH_GOOD 259
|
||||
#define STR_HASH_REGENERATED 260
|
||||
#define STR_RETYPE 261
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -63,41 +63,20 @@ private:
|
||||
void PopulateDialog();
|
||||
void SetDocData();
|
||||
void SetTableData(size_t nRowPos, SCTAB nTab);
|
||||
void ResetTableRows();
|
||||
|
||||
/** Check the status of all hash values to see if it's okay to enable
|
||||
the OK button. */
|
||||
void CheckHashStatus();
|
||||
|
||||
void DeleteSheets();
|
||||
|
||||
private:
|
||||
OKButton maBtnOk;
|
||||
CancelButton maBtnCancel;
|
||||
HelpButton maBtnHelp;
|
||||
OKButton* mpBtnOk;
|
||||
FixedText* mpTextDocStatus;
|
||||
PushButton* mpBtnRetypeDoc;
|
||||
VclVBox* mpSheetsBox;
|
||||
|
||||
FixedInfo maTextDescription;
|
||||
|
||||
FixedLine maLineDocument;
|
||||
FixedText maTextDocStatus;
|
||||
PushButton maBtnRetypeDoc;
|
||||
|
||||
FixedLine maLineSheet;
|
||||
FixedText maTextSheetName1;
|
||||
FixedText maTextSheetStatus1;
|
||||
PushButton maBtnRetypeSheet1;
|
||||
|
||||
FixedText maTextSheetName2;
|
||||
FixedText maTextSheetStatus2;
|
||||
PushButton maBtnRetypeSheet2;
|
||||
|
||||
FixedText maTextSheetName3;
|
||||
FixedText maTextSheetStatus3;
|
||||
PushButton maBtnRetypeSheet3;
|
||||
|
||||
FixedText maTextSheetName4;
|
||||
FixedText maTextSheetStatus4;
|
||||
PushButton maBtnRetypeSheet4;
|
||||
|
||||
ScrollBar maScrollBar;
|
||||
std::vector<VclHBox*> maSheets;
|
||||
|
||||
OUString maTextNotProtected;
|
||||
OUString maTextNotPassProtected;
|
||||
@@ -107,7 +86,6 @@ private:
|
||||
|
||||
DECL_LINK( OKHdl, void* );
|
||||
DECL_LINK( RetypeBtnHdl, PushButton* );
|
||||
DECL_LINK( ScrollHdl, void* );
|
||||
|
||||
struct TableItem
|
||||
{
|
||||
|
@@ -28,35 +28,7 @@
|
||||
#include <vcl/msgbox.hxx>
|
||||
|
||||
ScRetypePassDlg::ScRetypePassDlg(Window* pParent) :
|
||||
ModalDialog(pParent, ScResId(RID_SCDLG_RETYPEPASS)),
|
||||
|
||||
maBtnOk (this, ScResId(BTN_OK)),
|
||||
maBtnCancel (this, ScResId(BTN_CANCEL)),
|
||||
maBtnHelp (this, ScResId(BTN_HELP)),
|
||||
|
||||
maTextDescription(this, ScResId(FT_DESC)),
|
||||
maLineDocument(this, ScResId(FL_DOCUMENT)),
|
||||
maTextDocStatus(this, ScResId(FT_DOCSTATUS)),
|
||||
maBtnRetypeDoc(this, ScResId(BTN_RETYPE_DOC)),
|
||||
|
||||
maLineSheet(this, ScResId(FL_SHEET)),
|
||||
maTextSheetName1(this, ScResId(FT_SHEETNAME1)),
|
||||
maTextSheetStatus1(this, ScResId(FT_SHEETSTATUS1)),
|
||||
maBtnRetypeSheet1(this, ScResId(BTN_RETYPE_SHEET1)),
|
||||
|
||||
maTextSheetName2(this, ScResId(FT_SHEETNAME2)),
|
||||
maTextSheetStatus2(this, ScResId(FT_SHEETSTATUS2)),
|
||||
maBtnRetypeSheet2(this, ScResId(BTN_RETYPE_SHEET2)),
|
||||
|
||||
maTextSheetName3(this, ScResId(FT_SHEETNAME3)),
|
||||
maTextSheetStatus3(this, ScResId(FT_SHEETSTATUS3)),
|
||||
maBtnRetypeSheet3(this, ScResId(BTN_RETYPE_SHEET3)),
|
||||
|
||||
maTextSheetName4(this, ScResId(FT_SHEETNAME4)),
|
||||
maTextSheetStatus4(this, ScResId(FT_SHEETSTATUS4)),
|
||||
maBtnRetypeSheet4(this, ScResId(BTN_RETYPE_SHEET4)),
|
||||
|
||||
maScrollBar (this, ScResId(SB_SCROLL)),
|
||||
ModalDialog(pParent, "RetypePass", "modules/scalc/ui/retypepassdialog.ui"),
|
||||
|
||||
maTextNotProtected(ScResId(STR_NOT_PROTECTED)),
|
||||
maTextNotPassProtected(ScResId(STR_NOT_PASS_PROTECTED)),
|
||||
@@ -68,12 +40,37 @@ ScRetypePassDlg::ScRetypePassDlg(Window* pParent) :
|
||||
mnCurScrollPos(0),
|
||||
meDesiredHash(PASSHASH_SHA1)
|
||||
{
|
||||
get(mpBtnOk ,"ok");
|
||||
get(mpTextDocStatus, "docStatusLabel");
|
||||
get(mpBtnRetypeDoc, "retypeDocButton");
|
||||
Window *pScrolledWindow = get<Window>("scrolledwindow");
|
||||
Size aSize(LogicToPixel(Size(190, 90), MAP_APPFONT));
|
||||
pScrolledWindow->set_width_request(aSize.Width());
|
||||
pScrolledWindow->set_height_request(aSize.Height());
|
||||
get(mpSheetsBox, "sheetsBox");
|
||||
|
||||
Init();
|
||||
FreeResource();
|
||||
}
|
||||
|
||||
ScRetypePassDlg::~ScRetypePassDlg()
|
||||
{
|
||||
DeleteSheets();
|
||||
}
|
||||
|
||||
void ScRetypePassDlg::DeleteSheets()
|
||||
{
|
||||
for(std::vector<VclHBox*>::iterator it = maSheets.begin(); it != maSheets.end(); ++it)
|
||||
{
|
||||
Window *pWindow = (*it);
|
||||
Window *pChild = pWindow->GetWindow(WINDOW_FIRSTCHILD);
|
||||
while (pChild)
|
||||
{
|
||||
Window *pOldChild = pChild;
|
||||
pChild = pChild->GetWindow(WINDOW_NEXT);
|
||||
delete pOldChild;
|
||||
}
|
||||
delete pWindow;
|
||||
}
|
||||
}
|
||||
|
||||
short ScRetypePassDlg::Execute()
|
||||
@@ -85,12 +82,14 @@ short ScRetypePassDlg::Execute()
|
||||
|
||||
void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc)
|
||||
{
|
||||
DeleteSheets();
|
||||
const ScDocProtection* pDocProtect = rDoc.GetDocProtection();
|
||||
if (pDocProtect && pDocProtect->isProtected())
|
||||
mpDocItem.reset(new ScDocProtection(*pDocProtect));
|
||||
|
||||
SCTAB nTabCount = rDoc.GetTableCount();
|
||||
maTableItems.reserve(nTabCount);
|
||||
maSheets.reserve(nTabCount);
|
||||
for (SCTAB i = 0; i < nTabCount; ++i)
|
||||
{
|
||||
TableItem aTabItem;
|
||||
@@ -101,6 +100,23 @@ void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc)
|
||||
aTabItem.mpProtect.reset(new ScTableProtection(*pTabProtect));
|
||||
|
||||
maTableItems.push_back(aTabItem);
|
||||
VclHBox* pSheet = new VclHBox(mpSheetsBox, false, 12);
|
||||
pSheet->Show(true);
|
||||
|
||||
FixedText* pFtSheetName = new FixedText(pSheet);
|
||||
pFtSheetName->Show(true);
|
||||
pFtSheetName->SetStyle(WB_VCENTER);
|
||||
FixedText* pFtSheetStatus = new FixedText(pSheet);
|
||||
pFtSheetStatus->Show(true);
|
||||
pFtSheetStatus->SetStyle(WB_VCENTER);
|
||||
|
||||
PushButton* pBtnSheet = new PushButton(pSheet);
|
||||
pBtnSheet->SetText(ScResId(STR_RETYPE));
|
||||
pBtnSheet->SetClickHdl(LINK(this, ScRetypePassDlg, RetypeBtnHdl));
|
||||
pBtnSheet->Disable();
|
||||
pBtnSheet->Show(true);
|
||||
|
||||
maSheets.push_back(pSheet);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,52 +146,13 @@ void ScRetypePassDlg::WriteNewDataToDocument(ScDocument& rDoc) const
|
||||
void ScRetypePassDlg::Init()
|
||||
{
|
||||
Link aLink = LINK( this, ScRetypePassDlg, OKHdl );
|
||||
maBtnOk.SetClickHdl(aLink);
|
||||
mpBtnOk->SetClickHdl(aLink);
|
||||
|
||||
aLink = LINK( this, ScRetypePassDlg, RetypeBtnHdl );
|
||||
maBtnRetypeDoc.SetClickHdl(aLink);
|
||||
maBtnRetypeSheet1.SetClickHdl(aLink);
|
||||
maBtnRetypeSheet2.SetClickHdl(aLink);
|
||||
maBtnRetypeSheet3.SetClickHdl(aLink);
|
||||
maBtnRetypeSheet4.SetClickHdl(aLink);
|
||||
mpBtnRetypeDoc->SetClickHdl(aLink);
|
||||
|
||||
maTextDocStatus.SetText(maTextNotProtected);
|
||||
maTextSheetStatus1.SetText(maTextNotProtected);
|
||||
maTextSheetStatus2.SetText(maTextNotProtected);
|
||||
maTextSheetStatus3.SetText(maTextNotProtected);
|
||||
maTextSheetStatus4.SetText(maTextNotProtected);
|
||||
maBtnRetypeDoc.Disable();
|
||||
|
||||
// Make all sheet rows invisible.
|
||||
|
||||
maTextSheetName1.Show(false);
|
||||
maTextSheetStatus1.Show(false);
|
||||
maBtnRetypeSheet1.Show(false);
|
||||
maBtnRetypeSheet1.Disable();
|
||||
|
||||
maTextSheetName2.Show(false);
|
||||
maTextSheetStatus2.Show(false);
|
||||
maBtnRetypeSheet2.Show(false);
|
||||
maBtnRetypeSheet2.Disable();
|
||||
|
||||
maTextSheetName3.Show(false);
|
||||
maTextSheetStatus3.Show(false);
|
||||
maBtnRetypeSheet3.Show(false);
|
||||
maBtnRetypeSheet3.Disable();
|
||||
|
||||
maTextSheetName4.Show(false);
|
||||
maTextSheetStatus4.Show(false);
|
||||
maBtnRetypeSheet4.Show(false);
|
||||
maBtnRetypeSheet4.Disable();
|
||||
|
||||
maScrollBar.Show(false);
|
||||
|
||||
maScrollBar.SetEndScrollHdl( LINK( this, ScRetypePassDlg, ScrollHdl ) );
|
||||
maScrollBar.SetScrollHdl( LINK( this, ScRetypePassDlg, ScrollHdl ) );
|
||||
|
||||
maScrollBar.SetPageSize(4);
|
||||
maScrollBar.SetVisibleSize(4);
|
||||
maScrollBar.SetLineSize(1);
|
||||
mpTextDocStatus->SetText(maTextNotProtected);
|
||||
mpBtnRetypeDoc->Disable();
|
||||
}
|
||||
|
||||
void ScRetypePassDlg::PopulateDialog()
|
||||
@@ -183,17 +160,9 @@ void ScRetypePassDlg::PopulateDialog()
|
||||
// Document protection first.
|
||||
SetDocData();
|
||||
|
||||
// Sheet protection next. We're only interested in the first 4 sheets
|
||||
// (or less).
|
||||
size_t n = maTableItems.size();
|
||||
for (size_t i = 0; i < n && i < 4; ++i)
|
||||
// Sheet protection next.
|
||||
for (size_t i = 0; i < maTableItems.size(); ++i)
|
||||
SetTableData(i, static_cast< SCTAB >( i ));
|
||||
|
||||
if (n > 4)
|
||||
{
|
||||
maScrollBar.Show(true);
|
||||
maScrollBar.SetRange(Range(0, n));
|
||||
}
|
||||
}
|
||||
|
||||
void ScRetypePassDlg::SetDocData()
|
||||
@@ -202,56 +171,29 @@ void ScRetypePassDlg::SetDocData()
|
||||
if (mpDocItem.get() && mpDocItem->isProtected())
|
||||
{
|
||||
if (mpDocItem->isPasswordEmpty())
|
||||
maTextDocStatus.SetText(maTextNotPassProtected);
|
||||
mpTextDocStatus->SetText(maTextNotPassProtected);
|
||||
else if (mpDocItem->hasPasswordHash(meDesiredHash))
|
||||
maTextDocStatus.SetText(maTextHashGood);
|
||||
mpTextDocStatus->SetText(maTextHashGood);
|
||||
else
|
||||
{
|
||||
// incompatible hash
|
||||
maTextDocStatus.SetText(maTextHashBad);
|
||||
mpTextDocStatus->SetText(maTextHashBad);
|
||||
bBtnEnabled = true;
|
||||
}
|
||||
}
|
||||
maBtnRetypeDoc.Enable(bBtnEnabled);
|
||||
mpBtnRetypeDoc->Enable(bBtnEnabled);
|
||||
}
|
||||
|
||||
void ScRetypePassDlg::SetTableData(size_t nRowPos, SCTAB nTab)
|
||||
{
|
||||
if (nRowPos >= 4)
|
||||
return;
|
||||
|
||||
FixedText* pName = NULL;
|
||||
FixedText* pStatus = NULL;
|
||||
PushButton* pBtn = NULL;
|
||||
switch (nRowPos)
|
||||
if(nRowPos < maSheets.size())
|
||||
{
|
||||
case 0:
|
||||
pName = &maTextSheetName1;
|
||||
pStatus = &maTextSheetStatus1;
|
||||
pBtn = &maBtnRetypeSheet1;
|
||||
break;
|
||||
case 1:
|
||||
pName = &maTextSheetName2;
|
||||
pStatus = &maTextSheetStatus2;
|
||||
pBtn = &maBtnRetypeSheet2;
|
||||
break;
|
||||
case 2:
|
||||
pName = &maTextSheetName3;
|
||||
pStatus = &maTextSheetStatus3;
|
||||
pBtn = &maBtnRetypeSheet3;
|
||||
break;
|
||||
case 3:
|
||||
pName = &maTextSheetName4;
|
||||
pStatus = &maTextSheetStatus4;
|
||||
pBtn = &maBtnRetypeSheet4;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
FixedText* pName = static_cast<FixedText*>(maSheets[nRowPos]->GetChild(0));
|
||||
FixedText* pStatus = static_cast<FixedText*>(maSheets[nRowPos]->GetChild(1));
|
||||
PushButton* pBtn = static_cast<PushButton*>(maSheets[nRowPos]->GetChild(2));
|
||||
|
||||
bool bBtnEnabled = false;
|
||||
pName->SetText(maTableItems[nTab].maName);
|
||||
pName->Show(true);
|
||||
const ScTableProtection* pTabProtect = maTableItems[nTab].mpProtect.get();
|
||||
if (pTabProtect && pTabProtect->isProtected())
|
||||
{
|
||||
@@ -269,18 +211,8 @@ void ScRetypePassDlg::SetTableData(size_t nRowPos, SCTAB nTab)
|
||||
else
|
||||
pStatus->SetText(maTextNotProtected);
|
||||
|
||||
pStatus->Show(true);
|
||||
pBtn->Show(true);
|
||||
pBtn->Enable(bBtnEnabled);
|
||||
}
|
||||
|
||||
void ScRetypePassDlg::ResetTableRows()
|
||||
{
|
||||
long nScrollPos = maScrollBar.GetThumbPos();
|
||||
mnCurScrollPos = nScrollPos < 0 ? 0 : nScrollPos;
|
||||
size_t nRowCount = maTableItems.size() - nScrollPos;
|
||||
for (size_t i = 0; i < nRowCount; ++i)
|
||||
SetTableData(i, static_cast< SCTAB >( i + nScrollPos ));
|
||||
}
|
||||
|
||||
static bool lcl_IsInGoodStatus(ScPassHashProtectable* pProtected, ScPasswordHash eDesiredHash)
|
||||
@@ -315,12 +247,12 @@ void ScRetypePassDlg::CheckHashStatus()
|
||||
if (!bStatusGood)
|
||||
break;
|
||||
|
||||
maBtnOk.Enable();
|
||||
mpBtnOk->Enable();
|
||||
return;
|
||||
}
|
||||
while (false);
|
||||
|
||||
maBtnOk.Disable();
|
||||
mpBtnOk->Disable();
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(ScRetypePassDlg, OKHdl)
|
||||
@@ -332,7 +264,7 @@ IMPL_LINK_NOARG(ScRetypePassDlg, OKHdl)
|
||||
IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn )
|
||||
{
|
||||
ScPassHashProtectable* pProtected = NULL;
|
||||
if (pBtn == &maBtnRetypeDoc)
|
||||
if (pBtn == mpBtnRetypeDoc)
|
||||
{
|
||||
// document protection.
|
||||
pProtected = mpDocItem.get();
|
||||
@@ -340,22 +272,11 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn )
|
||||
else
|
||||
{
|
||||
// sheet protection.
|
||||
size_t nTabPos = mnCurScrollPos;
|
||||
if (pBtn == &maBtnRetypeSheet2)
|
||||
nTabPos += 1;
|
||||
else if (pBtn == &maBtnRetypeSheet3)
|
||||
nTabPos += 2;
|
||||
else if (pBtn == &maBtnRetypeSheet4)
|
||||
nTabPos += 3;
|
||||
else if (pBtn != &maBtnRetypeSheet1)
|
||||
// This should never happen !
|
||||
return 0;
|
||||
size_t aPos = 0;
|
||||
while(aPos < maSheets.size() && pBtn != maSheets[aPos]->GetChild(2))
|
||||
++aPos;
|
||||
|
||||
if (nTabPos >= maTableItems.size())
|
||||
// Likewise, this should never happen !
|
||||
return 0;
|
||||
|
||||
pProtected = maTableItems[nTabPos].mpProtect.get();
|
||||
pProtected = aPos < maSheets.size() ? maTableItems[aPos].mpProtect.get() : 0;
|
||||
}
|
||||
|
||||
if (!pProtected)
|
||||
@@ -379,18 +300,11 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn )
|
||||
}
|
||||
|
||||
SetDocData();
|
||||
ResetTableRows();
|
||||
CheckHashStatus();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(ScRetypePassDlg, ScrollHdl)
|
||||
{
|
||||
ResetTableRows();
|
||||
return 0;
|
||||
}
|
||||
|
||||
ScRetypePassInputDlg::ScRetypePassInputDlg(Window* pParent, ScPassHashProtectable* pProtected)
|
||||
: ModalDialog(pParent, "RetypePasswordDialog",
|
||||
"modules/scalc/ui/retypepassworddialog.ui")
|
||||
|
@@ -19,183 +19,6 @@
|
||||
|
||||
#include "retypepassdlg.hrc"
|
||||
|
||||
ModalDialog RID_SCDLG_RETYPEPASS
|
||||
{
|
||||
HelpID = "sc:ModalDialog:RID_SCDLG_RETYPEPASS";
|
||||
Text [ en-US ] = "Re-type Password" ;
|
||||
Size = MAP_APPFONT ( 260 , 165 ) ;
|
||||
Moveable = TRUE ;
|
||||
Closeable = TRUE ;
|
||||
|
||||
OKButton BTN_OK
|
||||
{
|
||||
Pos = MAP_APPFONT ( 204, 6 ) ;
|
||||
Size = MAP_APPFONT ( 50, 14 ) ;
|
||||
DefButton = TRUE ;
|
||||
};
|
||||
|
||||
CancelButton BTN_CANCEL
|
||||
{
|
||||
Pos = MAP_APPFONT ( 204, 23 ) ;
|
||||
Size = MAP_APPFONT ( 50, 14 ) ;
|
||||
};
|
||||
|
||||
HelpButton BTN_HELP
|
||||
{
|
||||
Pos = MAP_APPFONT ( 204, 43 ) ;
|
||||
Size = MAP_APPFONT ( 50, 14 ) ;
|
||||
};
|
||||
|
||||
FixedText FT_DESC
|
||||
{
|
||||
Pos = MAP_APPFONT ( 6, 6 ) ;
|
||||
Size = MAP_APPFONT ( 190, 36 );
|
||||
|
||||
WordBreak = TRUE ;
|
||||
|
||||
Text [ en-US ] = "The document you are about to export has one or more protected items with password that cannot be exported. Please re-type your password to be able to export your document." ;
|
||||
};
|
||||
|
||||
FixedLine FL_DOCUMENT
|
||||
{
|
||||
Pos = MAP_APPFONT ( 6, 48 );
|
||||
Size = MAP_APPFONT ( 190, 8 );
|
||||
|
||||
Text [ en-US ] = "Document protection" ;
|
||||
};
|
||||
|
||||
FixedText FT_DOCSTATUS
|
||||
{
|
||||
Pos = MAP_APPFONT ( 10, 62 );
|
||||
Size = MAP_APPFONT ( 140, 8 );
|
||||
|
||||
Text [ en-US ] = "Status unknown" ;
|
||||
};
|
||||
|
||||
PushButton BTN_RETYPE_DOC
|
||||
{
|
||||
HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_DOC";
|
||||
Pos = MAP_APPFONT ( 158, 59 );
|
||||
Size = MAP_APPFONT ( 30, 14 );
|
||||
|
||||
Text [ en-US ] = "Re-type" ;
|
||||
};
|
||||
|
||||
FixedLine FL_SHEET
|
||||
{
|
||||
Pos = MAP_APPFONT ( 6, 83 );
|
||||
Size = MAP_APPFONT ( 190, 8 );
|
||||
|
||||
Text [ en-US ] = "Sheet protection" ;
|
||||
};
|
||||
|
||||
FixedText FT_SHEETNAME1
|
||||
{
|
||||
Pos = MAP_APPFONT ( 10, 97 );
|
||||
Size = MAP_APPFONT ( 68, 8 );
|
||||
|
||||
Text [ en-US ] = "Sheet1 has a really long name" ;
|
||||
};
|
||||
|
||||
FixedText FT_SHEETSTATUS1
|
||||
{
|
||||
Pos = MAP_APPFONT ( 82, 97 );
|
||||
Size = MAP_APPFONT ( 72, 8 );
|
||||
|
||||
Text [ en-US ] = "Status unknown" ;
|
||||
};
|
||||
|
||||
PushButton BTN_RETYPE_SHEET1
|
||||
{
|
||||
HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET1";
|
||||
Pos = MAP_APPFONT ( 158, 94 );
|
||||
Size = MAP_APPFONT ( 30, 14 );
|
||||
|
||||
Text [ en-US ] = "Re-type" ;
|
||||
};
|
||||
|
||||
FixedText FT_SHEETNAME2
|
||||
{
|
||||
Pos = MAP_APPFONT ( 10, 113 );
|
||||
Size = MAP_APPFONT ( 68, 8 );
|
||||
|
||||
Text [ en-US ] = "Sheet2" ;
|
||||
};
|
||||
|
||||
FixedText FT_SHEETSTATUS2
|
||||
{
|
||||
Pos = MAP_APPFONT ( 82, 113 );
|
||||
Size = MAP_APPFONT ( 72, 8 );
|
||||
|
||||
Text [ en-US ] = "Status unknown" ;
|
||||
};
|
||||
|
||||
PushButton BTN_RETYPE_SHEET2
|
||||
{
|
||||
HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET2";
|
||||
Pos = MAP_APPFONT ( 158, 110 );
|
||||
Size = MAP_APPFONT ( 30, 14 );
|
||||
|
||||
Text [ en-US ] = "Re-type" ;
|
||||
};
|
||||
|
||||
FixedText FT_SHEETNAME3
|
||||
{
|
||||
Pos = MAP_APPFONT ( 10, 129 );
|
||||
Size = MAP_APPFONT ( 68, 8 );
|
||||
|
||||
Text [ en-US ] = "Sheet3" ;
|
||||
};
|
||||
|
||||
FixedText FT_SHEETSTATUS3
|
||||
{
|
||||
Pos = MAP_APPFONT ( 82, 129 );
|
||||
Size = MAP_APPFONT ( 72, 8 );
|
||||
|
||||
Text [ en-US ] = "Status unknown" ;
|
||||
};
|
||||
|
||||
PushButton BTN_RETYPE_SHEET3
|
||||
{
|
||||
HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET3";
|
||||
Pos = MAP_APPFONT ( 158, 126 );
|
||||
Size = MAP_APPFONT ( 30, 14 );
|
||||
|
||||
Text [ en-US ] = "Re-type" ;
|
||||
};
|
||||
|
||||
FixedText FT_SHEETNAME4
|
||||
{
|
||||
Pos = MAP_APPFONT ( 10, 145 );
|
||||
Size = MAP_APPFONT ( 68, 8 );
|
||||
|
||||
Text [ en-US ] = "Sheet4" ;
|
||||
};
|
||||
|
||||
FixedText FT_SHEETSTATUS4
|
||||
{
|
||||
Pos = MAP_APPFONT ( 82, 145 );
|
||||
Size = MAP_APPFONT ( 72, 8 );
|
||||
|
||||
Text [ en-US ] = "Status unknown" ;
|
||||
};
|
||||
|
||||
PushButton BTN_RETYPE_SHEET4
|
||||
{
|
||||
HelpID = "sc:PushButton:RID_SCDLG_RETYPEPASS:BTN_RETYPE_SHEET4";
|
||||
Pos = MAP_APPFONT ( 158, 142 );
|
||||
Size = MAP_APPFONT ( 30, 14 );
|
||||
|
||||
Text [ en-US ] = "Re-type" ;
|
||||
};
|
||||
|
||||
ScrollBar SB_SCROLL
|
||||
{
|
||||
Pos = MAP_APPFONT ( 190, 94 ) ;
|
||||
Size = MAP_APPFONT ( 8, 61 ) ;
|
||||
VScroll = TRUE ;
|
||||
};
|
||||
|
||||
String STR_NOT_PROTECTED
|
||||
{
|
||||
Text [ en-US ] = "Not protected" ;
|
||||
@@ -220,6 +43,10 @@ ModalDialog RID_SCDLG_RETYPEPASS
|
||||
{
|
||||
Text [ en-US ] = "Hash re-generated" ;
|
||||
};
|
||||
|
||||
String STR_RETYPE
|
||||
{
|
||||
Text [ en-US ] = "Re-type" ;
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
239
sc/uiconfig/scalc/ui/retypepassdialog.ui
Normal file
239
sc/uiconfig/scalc/ui/retypepassdialog.ui
Normal file
@@ -0,0 +1,239 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<object class="GtkDialog" id="RetypePass">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Re-type Password</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="hexpand">True</property>
|
||||
<property name="vexpand">True</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="orientation">vertical</property>
|
||||
<property name="layout_style">start</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="ok">
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_action_appearance">False</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">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancel">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">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">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="help">
|
||||
<property name="label">gtk-help</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">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">2</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>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="descLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">The document you are about to export has one or more protected items with password that cannot be exported. Please re-type your password to be able to export your document.</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="max_width_chars">60</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="docStatusLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Status unknown</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="retypeDocButton">
|
||||
<property name="label" translatable="yes">_Re-type</property>
|
||||
<property name="use_action_appearance">False</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>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Document protection</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="semibold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="vscrollbar_policy">always</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="sheetsBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Sheet protection</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="semibold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="0">ok</action-widget>
|
||||
<action-widget response="0">cancel</action-widget>
|
||||
<action-widget response="0">help</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
Reference in New Issue
Block a user