Kaydet (Commit) 151cc93f authored tarafından Caolán McNamara's avatar Caolán McNamara

split out document info page and convert to .ui

move svt::SelectableFixedText to vcl and implement
"selectable" GtkLabels by mapping to that vs
FixedText for standard GtkLabels

Change-Id: Ic114991cd2c2eb6673bcef634fa286dd7c67056f
üst ffe1f483
......@@ -11,6 +11,7 @@ $(eval $(call gb_UI_UI,sfx))
$(eval $(call gb_UI_add_uifiles,sfx,\
sfx2/uiconfig/ui/checkin \
sfx2/uiconfig/ui/documentinfopage \
sfx2/uiconfig/ui/password \
sfx2/uiconfig/ui/printeroptionsdialog \
sfx2/uiconfig/ui/templatemanagementdialog \
......
......@@ -162,42 +162,31 @@ public:
class SfxDocumentPage : public SfxTabPage
{
private:
FixedImage aBmp1;
Edit aNameED;
PushButton aChangePassBtn;
FixedLine aLine1FL;
FixedText aTypeFT;
svt::SelectableFixedText aShowTypeFT;
CheckBox aReadOnlyCB;
FixedText aFileFt;
svt::SelectableFixedText aFileValFt;
FixedText aSizeFT;
svt::SelectableFixedText aShowSizeFT;
FixedLine aLine2FL;
FixedText aCreateFt;
svt::SelectableFixedText aCreateValFt;
FixedText aChangeFt;
svt::SelectableFixedText aChangeValFt;
FixedText aSignedFt;
svt::SelectableFixedText aSignedValFt;
PushButton aSignatureBtn;
FixedText aPrintFt;
svt::SelectableFixedText aPrintValFt;
FixedText aTimeLogFt;
svt::SelectableFixedText aTimeLogValFt;
FixedText aDocNoFt;
svt::SelectableFixedText aDocNoValFt;
CheckBox aUseUserDataCB;
PushButton aDeleteBtn;
FixedLine aLine3FL;
FixedText aTemplFt;
svt::SelectableFixedText aTemplValFt;
String aUnknownSize;
String aMultiSignedStr;
FixedImage* m_pBmp;
Edit* m_pNameED;
PushButton* m_pChangePassBtn;
SelectableFixedText* m_pShowTypeFT;
CheckBox* m_pReadOnlyCB;
SelectableFixedText* m_pFileValFt;
SelectableFixedText* m_pShowSizeFT;
SelectableFixedText* m_pCreateValFt;
SelectableFixedText* m_pChangeValFt;
SelectableFixedText* m_pSignedValFt;
PushButton* m_pSignatureBtn;
SelectableFixedText* m_pPrintValFt;
SelectableFixedText* m_pTimeLogValFt;
SelectableFixedText* m_pDocNoValFt;
CheckBox* m_pUseUserDataCB;
PushButton* m_pDeleteBtn;
FixedText* m_pTemplFt;
SelectableFixedText* m_pTemplValFt;
OUString m_aUnknownSize;
OUString m_aMultiSignedStr;
sal_Bool bEnableUseUserData : 1,
bHandleDelete : 1;
......
This diff is collapsed.
......@@ -58,12 +58,6 @@
// defines ---------------------------------------------------------------
#define FT_FILE 1
#define FT_FILE_VAL 2
#define FT_CHANGE 3
#define FT_CHANGE_VAL 4
#define FT_CREATE 7
#define FT_CREATE_VAL 8
#define FT_TITLE 9
#define ED_TITLE 10
#define FT_THEMA 11
......@@ -80,30 +74,9 @@
#define ED_INFO4 22
#define FT_COMMENT 23
#define ED_COMMENT 24
#define FT_TEMPL 32
#define FT_TEMPL_VAL 33
#define BTN_EDITLABEL 34
#define FT_TIMELOG 35
#define FT_TIMELOG_VAL 36
#define FT_DOCNO 37
#define FT_DOCNO_VAL 38
#define FT_URL 43
#define ED_URL 44
#define CB_FILE_READONLY 48
#define CB_USE_USERDATA 49
#define BMP_FILE_1 50
#define ED_FILE_NAME 51
#define FL_FILE_1 52
#define FT_FILE_TYP 53
#define FT_FILE_SHOW_TYP 54
#define FT_FILE_SIZE 55
#define FT_FILE_SHOW_SIZE 56
#define FL_FILE_2 57
#define FT_PRINT 58
#define FT_PRINT_VAL 59
#define STR_UNKNOWNSIZE 60
#define FL_FILE_3 61
#define BTN_DELETE 62
#define RB_NOAUTOUPDATE 63
#define RB_RELOADUPDATE 64
......@@ -119,12 +92,6 @@
#define PB_BROWSEURL 74
#define STR_FORWARD_ERRMSSG 75
#define FT_SIGNED 76
#define FT_SIGNED_VAL 77
#define STR_MULTSIGNED 78
#define BTN_SIGNATURE 79
#define BTN_CHANGE_PASS 80
#define WIN_PROPERTIES 90
#define SB_VERTICAL 91
#define FT_PROPERTIES 92
......
......@@ -101,212 +101,6 @@ TabPage TP_DOCINFODESC
};
};
// TP_DOCINFODOC ---------------------------------------------------------
TabPage TP_DOCINFODOC
{
HelpId = HID_DOCINFODOC ;
Hide = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
FixedImage BMP_FILE_1
{
Pos = MAP_APPFONT ( 6 , 7 ) ;
Size = MAP_APPFONT ( 20 , 20 ) ;
};
Edit ED_FILE_NAME
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:ED_FILE_NAME";
Pos = MAP_APPFONT ( 36 , 12 ) ;
Size = MAP_APPFONT ( 140 , RSC_CD_TEXTBOX_HEIGHT ) ;
Border = TRUE ;
};
PushButton BTN_CHANGE_PASS
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:BTN_CHANGE_PASS";
Pos = MAP_APPFONT ( 189 , 11 ) ;
Size = MAP_APPFONT ( 65 , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Hide = FALSE;
Text [ en-US ] = "Change ~Password...";
};
FixedLine FL_FILE_1
{
Pos = MAP_APPFONT ( 6 , 31 ) ;
Size = MAP_APPFONT ( 248 , 1 ) ;
};
FixedText FT_FILE_TYP
{
Pos = MAP_APPFONT ( 6 , 37 ) ;
Size = MAP_APPFONT ( 70 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Type:" ;
};
Edit FT_FILE_SHOW_TYP
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_FILE_SHOW_TYP";
Pos = MAP_APPFONT ( 78 , 37 ) ;
Size = MAP_APPFONT ( 106 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
CheckBox CB_FILE_READONLY
{
HelpID = "sfx2:CheckBox:TP_DOCINFODOC:CB_FILE_READONLY";
Pos = MAP_APPFONT ( 163 , 37 ) ;
Size = MAP_APPFONT ( 91 , RSC_CD_CHECKBOX_HEIGHT ) ;
Text [ en-US ] = "~Read-only" ;
};
FixedText FT_FILE
{
Pos = MAP_APPFONT ( 6 , 49 ) ;
Size = MAP_APPFONT ( 70 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Location:" ;
};
Edit FT_FILE_VAL
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_FILE_VAL";
Pos = MAP_APPFONT ( 78 , 49 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
FixedText FT_FILE_SIZE
{
Pos = MAP_APPFONT ( 6 , 61 ) ;
Size = MAP_APPFONT ( 70 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Size:" ;
};
Edit FT_FILE_SHOW_SIZE
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_FILE_SHOW_SIZE";
Pos = MAP_APPFONT ( 78 , 61 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
FixedLine FL_FILE_2
{
Pos = MAP_APPFONT ( 6 , 74 ) ;
Size = MAP_APPFONT ( 248 , 1 ) ;
};
FixedText FT_CREATE
{
Pos = MAP_APPFONT ( 6 , 80 ) ;
Size = MAP_APPFONT ( 70 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Created:" ;
};
Edit FT_CREATE_VAL
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_CREATE_VAL";
Pos = MAP_APPFONT ( 78 , 80 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
FixedText FT_CHANGE
{
Pos = MAP_APPFONT ( 6 , 92 ) ;
Size = MAP_APPFONT ( 70 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Modified:" ;
};
Edit FT_CHANGE_VAL
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_CHANGE_VAL";
Pos = MAP_APPFONT ( 78 , 92 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
FixedText FT_SIGNED
{
Pos = MAP_APPFONT ( 6 , 104 ) ;
Size = MAP_APPFONT ( 70 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Digitally signed:" ;
};
Edit FT_SIGNED_VAL
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_SIGNED_VAL";
Pos = MAP_APPFONT ( 78 , 104 ) ;
Size = MAP_APPFONT ( 123 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
PushButton BTN_SIGNATURE
{
HelpID = "sfx2:PushButton:TP_DOCINFODOC:BTN_SIGNATURE";
Pos = MAP_APPFONT ( 204 , 101 ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Text [ en-US ] = "Digital Signature...";
};
String STR_MULTSIGNED
{
Text [ en-US ] = "Multiply signed document" ;
};
FixedText FT_PRINT
{
Pos = MAP_APPFONT ( 6 , 116 ) ;
Size = MAP_APPFONT ( 70 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Last printed:" ;
};
Edit FT_PRINT_VAL
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_PRINT_VAL";
Pos = MAP_APPFONT ( 78 , 116 ) ;
Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
FixedText FT_TIMELOG
{
Pos = MAP_APPFONT ( 6 , 128 ) ;
Size = MAP_APPFONT ( 70 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Total editing time:" ;
};
Edit FT_TIMELOG_VAL
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_TIMELOG_VAL";
Pos = MAP_APPFONT ( 78 , 128 ) ;
Size = MAP_APPFONT ( 30 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
FixedText FT_DOCNO
{
Pos = MAP_APPFONT ( 6 , 140 ) ;
Size = MAP_APPFONT ( 70 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Revision number:" ;
};
Edit FT_DOCNO_VAL
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_DOCNO_VAL";
Pos = MAP_APPFONT ( 78 , 140 ) ;
Size = MAP_APPFONT ( 30 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
PushButton BTN_DELETE
{
HelpID = "sfx2:PushButton:TP_DOCINFODOC:BTN_DELETE";
Pos = MAP_APPFONT ( 204 , 150 ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Hide = TRUE;
Text [ en-US ] = "Reset";
};
CheckBox CB_USE_USERDATA
{
HelpID = "sfx2:CheckBox:TP_DOCINFODOC:CB_USE_USERDATA";
Pos = MAP_APPFONT ( 6 , 152 ) ;
Size = MAP_APPFONT ( 192 , RSC_CD_CHECKBOX_HEIGHT ) ;
Hide = TRUE;
Text [ en-US ] = "~Apply user data";
};
FixedLine FL_FILE_3
{
Pos = MAP_APPFONT ( 5 , 167 ) ;
Size = MAP_APPFONT ( 248 , 1 ) ;
};
FixedText FT_TEMPL
{
Pos = MAP_APPFONT ( 5 , 172 ) ;
Size = MAP_APPFONT ( 45 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Template:" ;
};
Edit FT_TEMPL_VAL
{
HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_TEMPL_VAL";
Pos = MAP_APPFONT ( 78 , 172 ) ;
Size = MAP_APPFONT ( 180 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
};
String STR_UNKNOWNSIZE
{
Text [ en-US ] = "unknown" ;
};
String EDIT_FILE_NAME
{
Text [ en-US ] = "File Name" ;
};
};
// TP_DOCINFOUSER --------------------------------------------------------
TabPage TP_DOCINFOUSER
......
......@@ -27,7 +27,6 @@
#define HID_MANAGE_STYLES "SFX2_HID_MANAGE_STYLES"
#define HID_CONFIG_EVENT "SFX2_HID_CONFIG_EVENT"
#define HID_DOCINFODESC "SFX2_HID_DOCINFODESC"
#define HID_DOCINFODOC "SFX2_HID_DOCINFODOC"
#define HID_DOCINFOUSER "SFX2_HID_DOCINFOUSER"
#define HID_DOCINFORELOAD "SFX2_HID_DOCINFORELOAD"
#define HID_BROWSERCONTROL "SFX2_HID_BROWSERCONTROL"
......
This diff is collapsed.
......@@ -36,26 +36,6 @@ public:
FixedInfo( Window* pParent, const ResId& rResId );
};
namespace svt
{
// ----------------------------
// - svt::SelectableFixedText -
// ----------------------------
class SVT_DLLPUBLIC SelectableFixedText : public Edit
{
private:
void Init();
public:
SelectableFixedText( Window* pParent, const ResId& rResId );
virtual ~SelectableFixedText();
virtual void LoseFocus();
};
} // namespace svt
#endif // _STDCTRL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -35,45 +35,4 @@ FixedInfo::FixedInfo( Window* pParent, const ResId& rResId ) :
SetStyle( GetStyle() | WB_INFO );
}
namespace svt
{
// class svt::SelectableFixedText ----------------------------------------
SelectableFixedText::SelectableFixedText( Window* pParent, const ResId& rResId ) :
Edit( pParent, rResId )
{
Init();
}
// -----------------------------------------------------------------------
SelectableFixedText::~SelectableFixedText()
{
}
// -----------------------------------------------------------------------
void SelectableFixedText::Init()
{
// no border
SetBorderStyle( WINDOW_BORDER_NOBORDER );
// read-only
SetReadOnly();
// make it transparent
SetControlBackground();
SetBackground();
SetPaintTransparent( sal_True );
}
// -----------------------------------------------------------------------
void SelectableFixedText::LoseFocus()
{
Edit::LoseFocus();
// clear cursor
Invalidate();
}
} // namespace svt
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
translations @ 85f724f5
Subproject commit c6cfd71c3d302bdb0999888f9c867d70acb40708
Subproject commit 85f724f5aa1d6a59662a7d1c7ea406a641814bd2
......@@ -23,8 +23,9 @@
#include <tools/solar.h>
#include <vcl/dllapi.h>
#include <vcl/bitmap.hxx>
#include <vcl/image.hxx>
#include <vcl/ctrl.hxx>
#include <vcl/edit.hxx>
#include <vcl/image.hxx>
class UserDrawEvent;
......@@ -76,6 +77,18 @@ public:
virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue);
};
class VCL_DLLPUBLIC SelectableFixedText : public Edit
{
private:
void Init();
public:
SelectableFixedText( Window* pParent, WinBits nStyle = 0 );
SelectableFixedText( Window* pParent, const ResId& rResId );
virtual void LoseFocus();
};
// -------------
// - FixedLine -
// -------------
......
......@@ -484,6 +484,41 @@ bool FixedText::set_property(const rtl::OString &rKey, const rtl::OString &rValu
return true;
}
SelectableFixedText::SelectableFixedText(Window* pParent, const ResId& rResId)
: Edit(pParent, rResId)
{
Init();
}
SelectableFixedText::SelectableFixedText(Window* pParent, WinBits nStyle)
: Edit(pParent, nStyle)
{
Init();
}
// -----------------------------------------------------------------------
void SelectableFixedText::Init()
{
// no border
SetBorderStyle( WINDOW_BORDER_NOBORDER );
// read-only
SetReadOnly();
// make it transparent
SetControlBackground();
SetBackground();
SetPaintTransparent( sal_True );
}
// -----------------------------------------------------------------------
void SelectableFixedText::LoseFocus()
{
Edit::LoseFocus();
// clear cursor
Invalidate();
}
// =======================================================================
void FixedLine::ImplInit( Window* pParent, WinBits nStyle )
......
......@@ -627,6 +627,19 @@ namespace
}
return nActiveId;
}
bool extractSelectable(VclBuilder::stringmap &rMap)
{
bool bSelectable = false;
VclBuilder::stringmap::iterator aFind = rMap.find(OString("selectable"));
if (aFind != rMap.end())
{
bSelectable = toBool(aFind->second);
rMap.erase(aFind);
}
return bSelectable;
}
}
bool VclBuilder::extractModel(const OString &id, stringmap &rMap)
......@@ -881,7 +894,12 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
pWindow = new ListBox(pParent, WB_LEFT|WB_VCENTER|WB_3DLOOK);
}
else if (name == "GtkLabel")
pWindow = new FixedText(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
{
if (extractSelectable(rMap))
pWindow = new SelectableFixedText(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
else
pWindow = new FixedText(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
}
else if (name == "GtkImage")
{
extractStock(id, rMap);
......
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