Kaydet (Commit) 06da9114 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

Show type of graphic in CompressGraphicDialog.

Change-Id: I4066a26fb93e9a97707a249f08c4c67459c8abb2
üst bde563d8
...@@ -33,6 +33,7 @@ class SdrGrafObj; ...@@ -33,6 +33,7 @@ class SdrGrafObj;
class SVX_DLLPUBLIC CompressGraphicsDialog : public ModalDialog class SVX_DLLPUBLIC CompressGraphicsDialog : public ModalDialog
{ {
private: private:
FixedText* m_pLabelGraphicType;
FixedText* m_pFixedText2; FixedText* m_pFixedText2;
FixedText* m_pFixedText3; FixedText* m_pFixedText3;
FixedText* m_pFixedText5; FixedText* m_pFixedText5;
......
...@@ -66,6 +66,7 @@ CompressGraphicsDialog::CompressGraphicsDialog( Window* pParent, Graphic& rGraph ...@@ -66,6 +66,7 @@ CompressGraphicsDialog::CompressGraphicsDialog( Window* pParent, Graphic& rGraph
void CompressGraphicsDialog::Initialize() void CompressGraphicsDialog::Initialize()
{ {
get(m_pLabelGraphicType, "label-graphic-type");
get(m_pFixedText2, "label-original-size"); get(m_pFixedText2, "label-original-size");
get(m_pFixedText3, "label-view-size"); get(m_pFixedText3, "label-view-size");
get(m_pFixedText5, "label-image-capacity"); get(m_pFixedText5, "label-image-capacity");
...@@ -109,6 +110,40 @@ CompressGraphicsDialog::~CompressGraphicsDialog() ...@@ -109,6 +110,40 @@ CompressGraphicsDialog::~CompressGraphicsDialog()
void CompressGraphicsDialog::Update() void CompressGraphicsDialog::Update()
{ {
GfxLinkType aLinkType = m_aGraphic.GetLink().GetType();
OUString aGraphicTypeString;
switch(aLinkType)
{
case GFX_LINK_TYPE_NATIVE_GIF:
aGraphicTypeString = "Gif image";
break;
case GFX_LINK_TYPE_NATIVE_JPG:
aGraphicTypeString = "Jpeg image";
break;
case GFX_LINK_TYPE_NATIVE_PNG:
aGraphicTypeString = "PNG image";
break;
case GFX_LINK_TYPE_NATIVE_TIF:
aGraphicTypeString = "TIFF image";
break;
case GFX_LINK_TYPE_NATIVE_WMF:
aGraphicTypeString = "WMF image";
break;
case GFX_LINK_TYPE_NATIVE_MET:
aGraphicTypeString = "MET image";
break;
case GFX_LINK_TYPE_NATIVE_PCT:
aGraphicTypeString = "PCT image";
break;
case GFX_LINK_TYPE_NATIVE_SVG:
aGraphicTypeString = "SVG image";
break;
default:
aGraphicTypeString = "Unknown";
break;
}
m_pLabelGraphicType->SetText(aGraphicTypeString);
const FieldUnit eFieldUnit = m_rBindings.GetDispatcher()->GetModule()->GetFieldUnit(); const FieldUnit eFieldUnit = m_rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
sal_Unicode cSeparator = rLocaleWrapper.getNumDecimalSep()[0]; sal_Unicode cSeparator = rLocaleWrapper.getNumDecimalSep()[0];
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">0</property> <property name="top_attach">1</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">0</property> <property name="top_attach">1</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">1</property> <property name="top_attach">2</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">2</property> <property name="top_attach">3</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">3</property> <property name="top_attach">4</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">1</property> <property name="top_attach">2</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">2</property> <property name="top_attach">3</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">3</property> <property name="top_attach">4</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">4</property> <property name="top_attach">5</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
...@@ -249,6 +249,37 @@ ...@@ -249,6 +249,37 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Type:</property>
<property name="width_chars">15</property>
<property name="single_line_mode">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label-graphic-type">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label">???</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object> </object>
</child> </child>
</object> </object>
......
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