Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
adb8868e
Kaydet (Commit)
adb8868e
authored
Eki 28, 2011
tarafından
László Németh
Kaydeden (comit)
Andras Timar
Eki 28, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Display original resolution in PPI in Writer's Picture/Crop tab
üst
d87d2aa4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
42 deletions
+36
-42
grfpage.hxx
cui/source/inc/grfpage.hxx
+1
-0
grfpage.cxx
cui/source/tabpages/grfpage.cxx
+29
-3
grfpage.hrc
cui/source/tabpages/grfpage.hrc
+1
-2
grfpage.src
cui/source/tabpages/grfpage.src
+5
-37
No files found.
cui/source/inc/grfpage.hxx
Dosyayı görüntüle @
adb8868e
...
@@ -97,6 +97,7 @@ class SvxGrfCropPage : public SfxTabPage
...
@@ -97,6 +97,7 @@ class SvxGrfCropPage : public SfxTabPage
Timer
aTimer
;
Timer
aTimer
;
String
aGraphicName
;
String
aGraphicName
;
Size
aOrigSize
;
Size
aOrigSize
;
Size
aOrigPixelSize
;
Size
aPageSize
;
Size
aPageSize
;
const
MetricField
*
pLastCropField
;
const
MetricField
*
pLastCropField
;
long
nOldWidth
;
long
nOldWidth
;
...
...
cui/source/tabpages/grfpage.cxx
Dosyayı görüntüle @
adb8868e
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
#include <svx/dialogs.hrc> // for RID_SVXPAGE_GRFCROP
#include <svx/dialogs.hrc> // for RID_SVXPAGE_GRFCROP
#define CM_1_TO_TWIP 567
#define CM_1_TO_TWIP 567
#define TWIP_TO_INCH 1440
inline
long
lcl_GetValue
(
MetricField
&
rMetric
,
FieldUnit
eUnit
)
inline
long
lcl_GetValue
(
MetricField
&
rMetric
,
FieldUnit
eUnit
)
...
@@ -214,8 +215,13 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet )
...
@@ -214,8 +215,13 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet )
if
(
SFX_ITEM_SET
==
rSet
.
GetItemState
(
SID_ATTR_GRAF_GRAPHIC
,
sal_False
,
&
pItem
)
)
if
(
SFX_ITEM_SET
==
rSet
.
GetItemState
(
SID_ATTR_GRAF_GRAPHIC
,
sal_False
,
&
pItem
)
)
{
{
const
Graphic
*
pGrf
=
((
SvxBrushItem
*
)
pItem
)
->
GetGraphic
();
const
Graphic
*
pGrf
=
((
SvxBrushItem
*
)
pItem
)
->
GetGraphic
();
if
(
pGrf
)
if
(
pGrf
)
{
aOrigSize
=
GetGrfOrigSize
(
*
pGrf
);
aOrigSize
=
GetGrfOrigSize
(
*
pGrf
);
if
(
pGrf
->
GetType
()
==
GRAPHIC_BITMAP
&&
aOrigSize
.
Width
()
&&
aOrigSize
.
Height
())
{
Bitmap
aBitmap
=
pGrf
->
GetBitmap
();
aOrigPixelSize
=
aBitmap
.
GetSizePixel
();
}
}
if
(
aOrigSize
.
Width
()
&&
aOrigSize
.
Height
()
)
if
(
aOrigSize
.
Width
()
&&
aOrigSize
.
Height
()
)
{
{
...
@@ -360,6 +366,10 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
...
@@ -360,6 +366,10 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
{
{
aExampleWN
.
SetGraphic
(
*
pGrf
);
aExampleWN
.
SetGraphic
(
*
pGrf
);
aOrigSize
=
GetGrfOrigSize
(
*
pGrf
);
aOrigSize
=
GetGrfOrigSize
(
*
pGrf
);
if
(
pGrf
->
GetType
()
==
GRAPHIC_BITMAP
&&
aOrigSize
.
Width
()
>
1
&&
aOrigSize
.
Height
()
>
1
)
{
Bitmap
aBitmap
=
pGrf
->
GetBitmap
();
aOrigPixelSize
=
aBitmap
.
GetSizePixel
();
}
aExampleWN
.
SetFrameSize
(
aOrigSize
);
aExampleWN
.
SetFrameSize
(
aOrigSize
);
GraphicHasChanged
(
aOrigSize
.
Width
()
&&
aOrigSize
.
Height
()
);
GraphicHasChanged
(
aOrigSize
.
Width
()
&&
aOrigSize
.
Height
()
);
CalcMinMaxBorder
();
CalcMinMaxBorder
();
...
@@ -664,9 +674,25 @@ void SvxGrfCropPage::GraphicHasChanged( sal_Bool bFound )
...
@@ -664,9 +674,25 @@ void SvxGrfCropPage::GraphicHasChanged( sal_Bool bFound )
aFld
.
SetValue
(
aFld
.
Normalize
(
aOrigSize
.
Width
()
),
eUnit
);
aFld
.
SetValue
(
aFld
.
Normalize
(
aOrigSize
.
Width
()
),
eUnit
);
String
sTemp
=
aFld
.
GetText
();
String
sTemp
=
aFld
.
GetText
();
aFld
.
SetValue
(
aFld
.
Normalize
(
aOrigSize
.
Height
()
),
eUnit
);
aFld
.
SetValue
(
aFld
.
Normalize
(
aOrigSize
.
Height
()
),
eUnit
);
sTemp
+=
UniString
::
CreateFromAscii
(
" x "
);
// multiplication sign (U+00D7)
sTemp
+=
UniString
(
"
\xc3\x97
"
,
RTL_TEXTENCODING_UTF8
);
sTemp
+=
aFld
.
GetText
();
sTemp
+=
aFld
.
GetText
();
aOrigSizeFT
.
SetText
(
sTemp
);
if
(
aOrigPixelSize
.
Width
()
&&
aOrigPixelSize
.
Height
()
)
{
int
ax
=
int
(
floor
((
float
)
aOrigPixelSize
.
Width
()
/
((
float
)
aOrigSize
.
Width
()
/
TWIP_TO_INCH
)
+
0.5
));
int
ay
=
int
(
floor
((
float
)
aOrigPixelSize
.
Height
()
/
((
float
)
aOrigSize
.
Height
()
/
TWIP_TO_INCH
)
+
0.5
));
sTemp
+=
UniString
::
CreateFromAscii
(
" "
);
sTemp
+=
CUI_RESSTR
(
STR_PPI
);
String
sPPI
=
UniString
::
CreateFromInt32
(
ax
);
if
(
abs
(
ax
-
ay
)
>
1
)
{
sPPI
+=
UniString
(
"
\xc3\x97
"
,
RTL_TEXTENCODING_UTF8
);
sPPI
+=
UniString
::
CreateFromInt32
(
ay
);
}
sTemp
.
SearchAndReplaceAscii
(
"%1"
,
sPPI
);
}
aOrigSizeFT
.
SetText
(
sTemp
);
}
}
aLeftFT
.
Enable
(
bFound
);
aLeftFT
.
Enable
(
bFound
);
aLeftMF
.
Enable
(
bFound
);
aLeftMF
.
Enable
(
bFound
);
...
...
cui/source/tabpages/grfpage.hrc
Dosyayı görüntüle @
adb8868e
...
@@ -49,5 +49,4 @@
...
@@ -49,5 +49,4 @@
#define RB_SIZECONST 23
#define RB_SIZECONST 23
#define RB_ZOOMCONST 24
#define RB_ZOOMCONST 24
#define WN_BSP 25
#define WN_BSP 25
#define STR_PPI 2600
cui/source/tabpages/grfpage.src
Dosyayı görüntüle @
adb8868e
...
@@ -304,40 +304,8 @@ TabPage RID_SVXPAGE_GRFCROP
...
@@ -304,40 +304,8 @@ TabPage RID_SVXPAGE_GRFCROP
};
};
};
};
String STR_PPI
{
Text [ x-comment ] = "PPI is pixel per inch, %1 is a number" ;
Text [ en-US ] = "(%1 PPI)" ;
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment