[Libreoffice-commits] core.git: include/svx svx/source svx/uiconfig
Tomaž Vajngerl
quikee at gmail.com
Sat May 4 02:44:39 PDT 2013
include/svx/compressgraphicdialog.hxx | 1
svx/source/dialog/compressgraphicdialog.cxx | 35 ++++++++++++++++++++
svx/uiconfig/ui/compressgraphicdialog.ui | 49 ++++++++++++++++++++++------
3 files changed, 76 insertions(+), 9 deletions(-)
New commits:
commit 06da9114c91bdd90e196a5086e99c13ee905fb01
Author: Tomaž Vajngerl <quikee at gmail.com>
Date: Thu Apr 25 22:53:58 2013 +0200
Show type of graphic in CompressGraphicDialog.
Change-Id: I4066a26fb93e9a97707a249f08c4c67459c8abb2
diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx
index e0b2309..e53f46b 100644
--- a/include/svx/compressgraphicdialog.hxx
+++ b/include/svx/compressgraphicdialog.hxx
@@ -33,6 +33,7 @@ class SdrGrafObj;
class SVX_DLLPUBLIC CompressGraphicsDialog : public ModalDialog
{
private:
+ FixedText* m_pLabelGraphicType;
FixedText* m_pFixedText2;
FixedText* m_pFixedText3;
FixedText* m_pFixedText5;
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 92749aa..c691b15 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -66,6 +66,7 @@ CompressGraphicsDialog::CompressGraphicsDialog( Window* pParent, Graphic& rGraph
void CompressGraphicsDialog::Initialize()
{
+ get(m_pLabelGraphicType, "label-graphic-type");
get(m_pFixedText2, "label-original-size");
get(m_pFixedText3, "label-view-size");
get(m_pFixedText5, "label-image-capacity");
@@ -109,6 +110,40 @@ CompressGraphicsDialog::~CompressGraphicsDialog()
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 LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
sal_Unicode cSeparator = rLocaleWrapper.getNumDecimalSep()[0];
diff --git a/svx/uiconfig/ui/compressgraphicdialog.ui b/svx/uiconfig/ui/compressgraphicdialog.ui
index 8695798..0b14381 100644
--- a/svx/uiconfig/ui/compressgraphicdialog.ui
+++ b/svx/uiconfig/ui/compressgraphicdialog.ui
@@ -121,7 +121,7 @@
</object>
<packing>
<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="height">1</property>
</packing>
@@ -136,7 +136,7 @@
</object>
<packing>
<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="height">1</property>
</packing>
@@ -151,7 +151,7 @@
</object>
<packing>
<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="height">1</property>
</packing>
@@ -166,7 +166,7 @@
</object>
<packing>
<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="height">1</property>
</packing>
@@ -181,7 +181,7 @@
</object>
<packing>
<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="height">1</property>
</packing>
@@ -196,7 +196,7 @@
</object>
<packing>
<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="height">1</property>
</packing>
@@ -211,7 +211,7 @@
</object>
<packing>
<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="height">1</property>
</packing>
@@ -226,7 +226,7 @@
</object>
<packing>
<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="height">1</property>
</packing>
@@ -241,7 +241,7 @@
</object>
<packing>
<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="height">1</property>
</packing>
@@ -249,6 +249,37 @@
<child>
<placeholder/>
</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>
</child>
</object>
More information about the Libreoffice-commits
mailing list