Kaydet (Commit) 91ebd882 authored tarafından Palenik Mihály's avatar Palenik Mihály Kaydeden (comit) Caolán McNamara

Convert RID_SCDLG_RETYPEPASS to .ui

Change-Id: I5d6e1ba67bf04c4a10e92f203fcbf36b58a8801c
Reviewed-on: https://gerrit.libreoffice.org/10178Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2df4f942
...@@ -135,6 +135,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ ...@@ -135,6 +135,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/protectsheetdlg \ sc/uiconfig/scalc/ui/protectsheetdlg \
sc/uiconfig/scalc/ui/queryrunstreamscriptdialog \ sc/uiconfig/scalc/ui/queryrunstreamscriptdialog \
sc/uiconfig/scalc/ui/randomnumbergenerator \ sc/uiconfig/scalc/ui/randomnumbergenerator \
sc/uiconfig/scalc/ui/retypepassdialog \
sc/uiconfig/scalc/ui/retypepassworddialog \ sc/uiconfig/scalc/ui/retypepassworddialog \
sc/uiconfig/scalc/ui/rightfooterdialog \ sc/uiconfig/scalc/ui/rightfooterdialog \
sc/uiconfig/scalc/ui/rightheaderdialog \ sc/uiconfig/scalc/ui/rightheaderdialog \
......
...@@ -19,39 +19,11 @@ ...@@ -19,39 +19,11 @@
#include <sc.hrc> #include <sc.hrc>
#define BTN_OK 1 #define STR_NOT_PROTECTED 256
#define BTN_CANCEL 2 #define STR_NOT_PASS_PROTECTED 257
#define BTN_HELP 3 #define STR_HASH_BAD 258
#define STR_HASH_GOOD 259
#define FT_DESC 10 #define STR_HASH_REGENERATED 260
#define FL_DOCUMENT 11 #define STR_RETYPE 261
#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
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -63,41 +63,20 @@ private: ...@@ -63,41 +63,20 @@ private:
void PopulateDialog(); void PopulateDialog();
void SetDocData(); void SetDocData();
void SetTableData(size_t nRowPos, SCTAB nTab); void SetTableData(size_t nRowPos, SCTAB nTab);
void ResetTableRows();
/** Check the status of all hash values to see if it's okay to enable /** Check the status of all hash values to see if it's okay to enable
the OK button. */ the OK button. */
void CheckHashStatus(); void CheckHashStatus();
private: void DeleteSheets();
OKButton maBtnOk;
CancelButton maBtnCancel;
HelpButton maBtnHelp;
FixedInfo maTextDescription;
FixedLine maLineDocument;
FixedText maTextDocStatus;
PushButton maBtnRetypeDoc;
FixedLine maLineSheet;
FixedText maTextSheetName1;
FixedText maTextSheetStatus1;
PushButton maBtnRetypeSheet1;
FixedText maTextSheetName2; private:
FixedText maTextSheetStatus2; OKButton* mpBtnOk;
PushButton maBtnRetypeSheet2; FixedText* mpTextDocStatus;
PushButton* mpBtnRetypeDoc;
FixedText maTextSheetName3; VclVBox* mpSheetsBox;
FixedText maTextSheetStatus3;
PushButton maBtnRetypeSheet3;
FixedText maTextSheetName4;
FixedText maTextSheetStatus4;
PushButton maBtnRetypeSheet4;
ScrollBar maScrollBar; std::vector<VclHBox*> maSheets;
OUString maTextNotProtected; OUString maTextNotProtected;
OUString maTextNotPassProtected; OUString maTextNotPassProtected;
...@@ -107,7 +86,6 @@ private: ...@@ -107,7 +86,6 @@ private:
DECL_LINK( OKHdl, void* ); DECL_LINK( OKHdl, void* );
DECL_LINK( RetypeBtnHdl, PushButton* ); DECL_LINK( RetypeBtnHdl, PushButton* );
DECL_LINK( ScrollHdl, void* );
struct TableItem struct TableItem
{ {
......
...@@ -28,35 +28,7 @@ ...@@ -28,35 +28,7 @@
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
ScRetypePassDlg::ScRetypePassDlg(Window* pParent) : ScRetypePassDlg::ScRetypePassDlg(Window* pParent) :
ModalDialog(pParent, ScResId(RID_SCDLG_RETYPEPASS)), ModalDialog(pParent, "RetypePass", "modules/scalc/ui/retypepassdialog.ui"),
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)),
maTextNotProtected(ScResId(STR_NOT_PROTECTED)), maTextNotProtected(ScResId(STR_NOT_PROTECTED)),
maTextNotPassProtected(ScResId(STR_NOT_PASS_PROTECTED)), maTextNotPassProtected(ScResId(STR_NOT_PASS_PROTECTED)),
...@@ -68,12 +40,37 @@ ScRetypePassDlg::ScRetypePassDlg(Window* pParent) : ...@@ -68,12 +40,37 @@ ScRetypePassDlg::ScRetypePassDlg(Window* pParent) :
mnCurScrollPos(0), mnCurScrollPos(0),
meDesiredHash(PASSHASH_SHA1) 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(); Init();
FreeResource();
} }
ScRetypePassDlg::~ScRetypePassDlg() 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() short ScRetypePassDlg::Execute()
...@@ -85,12 +82,14 @@ short ScRetypePassDlg::Execute() ...@@ -85,12 +82,14 @@ short ScRetypePassDlg::Execute()
void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc) void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc)
{ {
DeleteSheets();
const ScDocProtection* pDocProtect = rDoc.GetDocProtection(); const ScDocProtection* pDocProtect = rDoc.GetDocProtection();
if (pDocProtect && pDocProtect->isProtected()) if (pDocProtect && pDocProtect->isProtected())
mpDocItem.reset(new ScDocProtection(*pDocProtect)); mpDocItem.reset(new ScDocProtection(*pDocProtect));
SCTAB nTabCount = rDoc.GetTableCount(); SCTAB nTabCount = rDoc.GetTableCount();
maTableItems.reserve(nTabCount); maTableItems.reserve(nTabCount);
maSheets.reserve(nTabCount);
for (SCTAB i = 0; i < nTabCount; ++i) for (SCTAB i = 0; i < nTabCount; ++i)
{ {
TableItem aTabItem; TableItem aTabItem;
...@@ -101,6 +100,23 @@ void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc) ...@@ -101,6 +100,23 @@ void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc)
aTabItem.mpProtect.reset(new ScTableProtection(*pTabProtect)); aTabItem.mpProtect.reset(new ScTableProtection(*pTabProtect));
maTableItems.push_back(aTabItem); 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 ...@@ -130,52 +146,13 @@ void ScRetypePassDlg::WriteNewDataToDocument(ScDocument& rDoc) const
void ScRetypePassDlg::Init() void ScRetypePassDlg::Init()
{ {
Link aLink = LINK( this, ScRetypePassDlg, OKHdl ); Link aLink = LINK( this, ScRetypePassDlg, OKHdl );
maBtnOk.SetClickHdl(aLink); mpBtnOk->SetClickHdl(aLink);
aLink = LINK( this, ScRetypePassDlg, RetypeBtnHdl ); aLink = LINK( this, ScRetypePassDlg, RetypeBtnHdl );
maBtnRetypeDoc.SetClickHdl(aLink); mpBtnRetypeDoc->SetClickHdl(aLink);
maBtnRetypeSheet1.SetClickHdl(aLink);
maBtnRetypeSheet2.SetClickHdl(aLink); mpTextDocStatus->SetText(maTextNotProtected);
maBtnRetypeSheet3.SetClickHdl(aLink); mpBtnRetypeDoc->Disable();
maBtnRetypeSheet4.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);
} }
void ScRetypePassDlg::PopulateDialog() void ScRetypePassDlg::PopulateDialog()
...@@ -183,17 +160,9 @@ void ScRetypePassDlg::PopulateDialog() ...@@ -183,17 +160,9 @@ void ScRetypePassDlg::PopulateDialog()
// Document protection first. // Document protection first.
SetDocData(); SetDocData();
// Sheet protection next. We're only interested in the first 4 sheets // Sheet protection next.
// (or less). for (size_t i = 0; i < maTableItems.size(); ++i)
size_t n = maTableItems.size();
for (size_t i = 0; i < n && i < 4; ++i)
SetTableData(i, static_cast< SCTAB >( i )); SetTableData(i, static_cast< SCTAB >( i ));
if (n > 4)
{
maScrollBar.Show(true);
maScrollBar.SetRange(Range(0, n));
}
} }
void ScRetypePassDlg::SetDocData() void ScRetypePassDlg::SetDocData()
...@@ -202,85 +171,48 @@ void ScRetypePassDlg::SetDocData() ...@@ -202,85 +171,48 @@ void ScRetypePassDlg::SetDocData()
if (mpDocItem.get() && mpDocItem->isProtected()) if (mpDocItem.get() && mpDocItem->isProtected())
{ {
if (mpDocItem->isPasswordEmpty()) if (mpDocItem->isPasswordEmpty())
maTextDocStatus.SetText(maTextNotPassProtected); mpTextDocStatus->SetText(maTextNotPassProtected);
else if (mpDocItem->hasPasswordHash(meDesiredHash)) else if (mpDocItem->hasPasswordHash(meDesiredHash))
maTextDocStatus.SetText(maTextHashGood); mpTextDocStatus->SetText(maTextHashGood);
else else
{ {
// incompatible hash // incompatible hash
maTextDocStatus.SetText(maTextHashBad); mpTextDocStatus->SetText(maTextHashBad);
bBtnEnabled = true; bBtnEnabled = true;
} }
} }
maBtnRetypeDoc.Enable(bBtnEnabled); mpBtnRetypeDoc->Enable(bBtnEnabled);
} }
void ScRetypePassDlg::SetTableData(size_t nRowPos, SCTAB nTab) void ScRetypePassDlg::SetTableData(size_t nRowPos, SCTAB nTab)
{ {
if (nRowPos >= 4) if(nRowPos < maSheets.size())
return;
FixedText* pName = NULL;
FixedText* pStatus = NULL;
PushButton* pBtn = NULL;
switch (nRowPos)
{ {
case 0: FixedText* pName = static_cast<FixedText*>(maSheets[nRowPos]->GetChild(0));
pName = &maTextSheetName1; FixedText* pStatus = static_cast<FixedText*>(maSheets[nRowPos]->GetChild(1));
pStatus = &maTextSheetStatus1; PushButton* pBtn = static_cast<PushButton*>(maSheets[nRowPos]->GetChild(2));
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;
}
bool bBtnEnabled = false; bool bBtnEnabled = false;
pName->SetText(maTableItems[nTab].maName); pName->SetText(maTableItems[nTab].maName);
pName->Show(true); const ScTableProtection* pTabProtect = maTableItems[nTab].mpProtect.get();
const ScTableProtection* pTabProtect = maTableItems[nTab].mpProtect.get(); if (pTabProtect && pTabProtect->isProtected())
if (pTabProtect && pTabProtect->isProtected())
{
if (pTabProtect->isPasswordEmpty())
pStatus->SetText(maTextNotPassProtected);
else if (pTabProtect->hasPasswordHash(meDesiredHash))
pStatus->SetText(maTextHashGood);
else
{ {
// incompatible hash if (pTabProtect->isPasswordEmpty())
pStatus->SetText(maTextHashBad); pStatus->SetText(maTextNotPassProtected);
bBtnEnabled = true; else if (pTabProtect->hasPasswordHash(meDesiredHash))
pStatus->SetText(maTextHashGood);
else
{
// incompatible hash
pStatus->SetText(maTextHashBad);
bBtnEnabled = true;
}
} }
} else
else pStatus->SetText(maTextNotProtected);
pStatus->SetText(maTextNotProtected);
pStatus->Show(true);
pBtn->Show(true);
pBtn->Enable(bBtnEnabled);
}
void ScRetypePassDlg::ResetTableRows() pBtn->Enable(bBtnEnabled);
{ }
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) static bool lcl_IsInGoodStatus(ScPassHashProtectable* pProtected, ScPasswordHash eDesiredHash)
...@@ -315,12 +247,12 @@ void ScRetypePassDlg::CheckHashStatus() ...@@ -315,12 +247,12 @@ void ScRetypePassDlg::CheckHashStatus()
if (!bStatusGood) if (!bStatusGood)
break; break;
maBtnOk.Enable(); mpBtnOk->Enable();
return; return;
} }
while (false); while (false);
maBtnOk.Disable(); mpBtnOk->Disable();
} }
IMPL_LINK_NOARG(ScRetypePassDlg, OKHdl) IMPL_LINK_NOARG(ScRetypePassDlg, OKHdl)
...@@ -332,7 +264,7 @@ IMPL_LINK_NOARG(ScRetypePassDlg, OKHdl) ...@@ -332,7 +264,7 @@ IMPL_LINK_NOARG(ScRetypePassDlg, OKHdl)
IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn ) IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn )
{ {
ScPassHashProtectable* pProtected = NULL; ScPassHashProtectable* pProtected = NULL;
if (pBtn == &maBtnRetypeDoc) if (pBtn == mpBtnRetypeDoc)
{ {
// document protection. // document protection.
pProtected = mpDocItem.get(); pProtected = mpDocItem.get();
...@@ -340,22 +272,11 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn ) ...@@ -340,22 +272,11 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn )
else else
{ {
// sheet protection. // sheet protection.
size_t nTabPos = mnCurScrollPos; size_t aPos = 0;
if (pBtn == &maBtnRetypeSheet2) while(aPos < maSheets.size() && pBtn != maSheets[aPos]->GetChild(2))
nTabPos += 1; ++aPos;
else if (pBtn == &maBtnRetypeSheet3)
nTabPos += 2; pProtected = aPos < maSheets.size() ? maTableItems[aPos].mpProtect.get() : 0;
else if (pBtn == &maBtnRetypeSheet4)
nTabPos += 3;
else if (pBtn != &maBtnRetypeSheet1)
// This should never happen !
return 0;
if (nTabPos >= maTableItems.size())
// Likewise, this should never happen !
return 0;
pProtected = maTableItems[nTabPos].mpProtect.get();
} }
if (!pProtected) if (!pProtected)
...@@ -379,18 +300,11 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn ) ...@@ -379,18 +300,11 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn )
} }
SetDocData(); SetDocData();
ResetTableRows();
CheckHashStatus(); CheckHashStatus();
} }
return 0; return 0;
} }
IMPL_LINK_NOARG(ScRetypePassDlg, ScrollHdl)
{
ResetTableRows();
return 0;
}
ScRetypePassInputDlg::ScRetypePassInputDlg(Window* pParent, ScPassHashProtectable* pProtected) ScRetypePassInputDlg::ScRetypePassInputDlg(Window* pParent, ScPassHashProtectable* pProtected)
: ModalDialog(pParent, "RetypePasswordDialog", : ModalDialog(pParent, "RetypePasswordDialog",
"modules/scalc/ui/retypepassworddialog.ui") "modules/scalc/ui/retypepassworddialog.ui")
......
...@@ -19,207 +19,34 @@ ...@@ -19,207 +19,34 @@
#include "retypepassdlg.hrc" #include "retypepassdlg.hrc"
ModalDialog RID_SCDLG_RETYPEPASS String STR_NOT_PROTECTED
{ {
HelpID = "sc:ModalDialog:RID_SCDLG_RETYPEPASS"; Text [ en-US ] = "Not protected" ;
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 String STR_NOT_PASS_PROTECTED
{ {
Text [ en-US ] = "Not protected" ; Text [ en-US ] = "Not password-protected" ;
}; };
String STR_NOT_PASS_PROTECTED String STR_HASH_BAD
{ {
Text [ en-US ] = "Not password-protected" ; Text [ en-US ] = "Hash incompatible" ;
}; };
String STR_HASH_BAD String STR_HASH_GOOD
{ {
Text [ en-US ] = "Hash incompatible" ; Text [ en-US ] = "Hash compatible" ;
}; };
String STR_HASH_GOOD String STR_HASH_REGENERATED
{ {
Text [ en-US ] = "Hash compatible" ; Text [ en-US ] = "Hash re-generated" ;
}; };
String STR_HASH_REGENERATED String STR_RETYPE
{ {
Text [ en-US ] = "Hash re-generated" ; Text [ en-US ] = "Re-type" ;
};
}; };
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment