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
34279ea8
Kaydet (Commit)
34279ea8
authored
Mar 20, 2014
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i124409 use slot SID_ATTR_METRIC to retrive the UI unit, not GetModuleFieldUnit
üst
d6020179
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
PosSizePropertyPanel.cxx
svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+23
-7
No files found.
svx/source/sidebar/possize/PosSizePropertyPanel.cxx
Dosyayı görüntüle @
34279ea8
...
...
@@ -91,7 +91,10 @@ PosSizePropertyPanel::PosSizePropertyPanel(
mlRotY
(
0
),
maUIScale
(),
mePoolUnit
(),
meDlgUnit
(),
// #124409# init with fallback default
meDlgUnit
(
FUNIT_INCH
),
maTransfPosXControl
(
SID_ATTR_TRANSFORM_POS_X
,
*
pBindings
,
*
this
),
maTransfPosYControl
(
SID_ATTR_TRANSFORM_POS_Y
,
*
pBindings
,
*
this
),
maTransfWidthControl
(
SID_ATTR_TRANSFORM_WIDTH
,
*
pBindings
,
*
this
),
...
...
@@ -313,11 +316,15 @@ void PosSizePropertyPanel::Initialize()
}
mePoolUnit
=
maTransfWidthControl
.
GetCoreMetric
();
meDlgUnit
=
GetModuleFieldUnit
();
SetFieldUnit
(
*
mpMtrPosX
,
meDlgUnit
,
true
);
SetFieldUnit
(
*
mpMtrPosY
,
meDlgUnit
,
true
);
SetFieldUnit
(
*
mpMtrWidth
,
meDlgUnit
,
true
);
SetFieldUnit
(
*
mpMtrHeight
,
meDlgUnit
,
true
);
// #124409# no need to do this, the mpBindings->Update( SID_ATTR_METRIC )
// call in the constructor will trigger MetricState and will get the correct unit
//
// meDlgUnit = GetModuleFieldUnit();
// SetFieldUnit( *mpMtrPosX, meDlgUnit, true );
// SetFieldUnit( *mpMtrPosY, meDlgUnit, true );
// SetFieldUnit( *mpMtrWidth, meDlgUnit, true );
// SetFieldUnit( *mpMtrHeight, meDlgUnit, true );
}
...
...
@@ -784,7 +791,13 @@ void PosSizePropertyPanel::NotifyItemUpdate(
// Pool unit and dialog unit may have changed, make sure that we
// have the current values.
mePoolUnit
=
maTransfWidthControl
.
GetCoreMetric
();
meDlgUnit
=
GetModuleFieldUnit
();
// #124409# do not change; GetModuleFieldUnit uses SfxModule::GetCurrentFieldUnit()
// which uses GetActiveModule() and if no items are set there (which is the case e.g.
// for writer), will just return the system fallback of FUNIT_INCH which is wrong.
// Anyways, with multiple open views the static call GetActiveModule is ambigious
//
// meDlgUnit = GetModuleFieldUnit();
switch
(
nSID
)
{
...
...
@@ -1202,6 +1215,9 @@ void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem*
bool
bWidthBlank
=
false
;
bool
bHeightBlank
=
false
;
String
sNull
=
String
::
CreateFromAscii
(
""
);
// #124409# use the given Item to get the correct UI unit and initialize it
// and the Fields using it
meDlgUnit
=
GetCurrentUnit
(
eState
,
pState
);
if
(
mpMtrPosX
->
GetText
()
==
sNull
)
...
...
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