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
6f2a379f
Kaydet (Commit)
6f2a379f
authored
Agu 23, 2002
tarafından
Oliver Specht
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#98399# Ruler capable of right-to-left text
üst
e178afdb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
20 deletions
+96
-20
svx.sdi
svx/sdi/svx.sdi
+26
-0
rlrcitem.cxx
svx/source/dialog/rlrcitem.cxx
+12
-2
svxruler.cxx
svx/source/dialog/svxruler.cxx
+58
-18
No files found.
svx/sdi/svx.sdi
Dosyayı görüntüle @
6f2a379f
...
@@ -11508,3 +11508,29 @@ SfxBoolItem ParaRightToLeft SID_ATTR_PARA_RIGHT_TO_LEFT
...
@@ -11508,3 +11508,29 @@ SfxBoolItem ParaRightToLeft SID_ATTR_PARA_RIGHT_TO_LEFT
ToolBoxConfig = TRUE,
ToolBoxConfig = TRUE,
GroupId = GID_FORMAT;
GroupId = GID_FORMAT;
]
]
//--------------------------------------------------------------------------
SfxBoolItem TextRTL SID_RULER_TEXT_RIGHT_TO_LEFT
[
/* flags: */
AutoUpdate = TRUE,
Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
ReadOnlyDoc = FALSE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
Asynchron;
Readonly = FALSE,
/* config: */
AccelConfig = FALSE,
MenuConfig = FALSE,
StatusBarConfig = FALSE,
ToolBoxConfig = FALSE,
GroupId = GID_CONTROLS;
]
svx/source/dialog/rlrcitem.cxx
Dosyayı görüntüle @
6f2a379f
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: rlrcitem.cxx,v $
* $RCSfile: rlrcitem.cxx,v $
*
*
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
*
* last change: $Author: os $ $Date: 2002-0
2-27 08:49:32
$
* last change: $Author: os $ $Date: 2002-0
8-23 09:32:04
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -80,6 +80,9 @@
...
@@ -80,6 +80,9 @@
#include "protitem.hxx"
#include "protitem.hxx"
#include "rlrcitem.hxx"
#include "rlrcitem.hxx"
#include "rulritem.hxx"
#include "rulritem.hxx"
#ifndef _SFXENUMITEM_HXX
#include <svtools/eitem.hxx>
#endif
// class SvxRulerItem ----------------------------------------------------
// class SvxRulerItem ----------------------------------------------------
...
@@ -185,6 +188,13 @@ void SvxRulerItem::StateChanged( USHORT nSID, SfxItemState eState,
...
@@ -185,6 +188,13 @@ void SvxRulerItem::StateChanged( USHORT nSID, SfxItemState eState,
rRuler
.
UpdateParaBorder
(
pItem
);
rRuler
.
UpdateParaBorder
(
pItem
);
}
}
break
;
break
;
case
SID_RULER_TEXT_RIGHT_TO_LEFT
:
{
const
SfxBoolItem
*
pItem
=
PTR_CAST
(
SfxBoolItem
,
pState
);
DBG_ASSERT
(
pState
?
0
!=
pItem
:
TRUE
,
"SfxBoolItem erwartet"
);
rRuler
.
UpdateTextRTL
(
pItem
);
}
break
;
}
}
}
}
...
...
svx/source/dialog/svxruler.cxx
Dosyayı görüntüle @
6f2a379f
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: svxruler.cxx,v $
* $RCSfile: svxruler.cxx,v $
*
*
* $Revision: 1.1
4
$
* $Revision: 1.1
5
$
*
*
* last change: $Author: os $ $Date: 2002-0
3-12 16:46:11
$
* last change: $Author: os $ $Date: 2002-0
8-23 09:33:12
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
// STATIC DATA -----------------------------------------------------------
// STATIC DATA -----------------------------------------------------------
#define CTRL_ITEM_COUNT 1
1
#define CTRL_ITEM_COUNT 1
2
#define GAP 10
#define GAP 10
#define OBJECT_BORDER_COUNT 4
#define OBJECT_BORDER_COUNT 4
#define TAB_GAP 1
#define TAB_GAP 1
...
@@ -179,7 +179,7 @@ void DebugParaMargin_Impl(const SvxLRSpaceItem& rLRSpace)
...
@@ -179,7 +179,7 @@ void DebugParaMargin_Impl(const SvxLRSpaceItem& rLRSpace)
}
}
#endif // DEBUGLIN
#endif // DEBUGLIN
#ifdef DEBUG
#ifdef DEBUG
_RULER
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/lstbox.hxx>
class
RulerDebugWindow
:
public
Window
class
RulerDebugWindow
:
public
Window
...
@@ -250,6 +250,7 @@ struct SvxRuler_Impl {
...
@@ -250,6 +250,7 @@ struct SvxRuler_Impl {
long
lMaxRightLogic
;
long
lMaxRightLogic
;
long
lLastLMargin
;
long
lLastLMargin
;
SvxProtectItem
aProtectItem
;
SvxProtectItem
aProtectItem
;
SfxBoolItem
*
pTextRTLItem
;
USHORT
nControlerItems
;
USHORT
nControlerItems
;
USHORT
nIdx
;
USHORT
nIdx
;
USHORT
nColLeftPix
,
nColRightPix
;
// Pixelwerte fuer linken / rechten Rand
USHORT
nColLeftPix
,
nColRightPix
;
// Pixelwerte fuer linken / rechten Rand
...
@@ -259,13 +260,14 @@ struct SvxRuler_Impl {
...
@@ -259,13 +260,14 @@ struct SvxRuler_Impl {
// aufgebohrt werden
// aufgebohrt werden
SvxRuler_Impl
()
:
SvxRuler_Impl
()
:
pPercBuf
(
0
),
pBlockBuf
(
0
),
nPercSize
(
0
),
nTotalDist
(
0
),
nIdx
(
0
),
pPercBuf
(
0
),
pBlockBuf
(
0
),
nPercSize
(
0
),
nTotalDist
(
0
),
nIdx
(
0
),
nColLeftPix
(
0
),
nColRightPix
(
0
),
lOldWinPos
(
0
)
nColLeftPix
(
0
),
nColRightPix
(
0
),
lOldWinPos
(
0
)
,
pTextRTLItem
(
0
)
{
{
}
}
~
SvxRuler_Impl
()
~
SvxRuler_Impl
()
{
{
nPercSize
=
0
;
nTotalDist
=
0
;
nPercSize
=
0
;
nTotalDist
=
0
;
delete
pPercBuf
;
delete
pBlockBuf
;
pPercBuf
=
0
;
delete
pPercBuf
;
delete
pBlockBuf
;
pPercBuf
=
0
;
delete
pTextRTLItem
;
}
}
void
SetPercSize
(
USHORT
nSize
);
void
SetPercSize
(
USHORT
nSize
);
...
@@ -419,7 +421,10 @@ SvxRuler::SvxRuler
...
@@ -419,7 +421,10 @@ SvxRuler::SvxRuler
}
}
if
((
nFlags
&
SVXRULER_SUPPORT_BORDERS
)
==
SVXRULER_SUPPORT_BORDERS
)
if
((
nFlags
&
SVXRULER_SUPPORT_BORDERS
)
==
SVXRULER_SUPPORT_BORDERS
)
{
pCtrlItem
[
i
++
]
=
new
SvxRulerItem
(
bHorz
?
SID_RULER_BORDERS
:
SID_RULER_BORDERS_VERTICAL
,
*
this
,
rBindings
);
pCtrlItem
[
i
++
]
=
new
SvxRulerItem
(
bHorz
?
SID_RULER_BORDERS
:
SID_RULER_BORDERS_VERTICAL
,
*
this
,
rBindings
);
pCtrlItem
[
i
++
]
=
new
SvxRulerItem
(
SID_RULER_TEXT_RIGHT_TO_LEFT
,
*
this
,
rBindings
);
}
if
((
nFlags
&
SVXRULER_SUPPORT_OBJECT
)
==
SVXRULER_SUPPORT_OBJECT
)
if
((
nFlags
&
SVXRULER_SUPPORT_OBJECT
)
==
SVXRULER_SUPPORT_OBJECT
)
{
{
...
@@ -763,6 +768,19 @@ void SvxRuler::Update( const SvxProtectItem* pItem )
...
@@ -763,6 +768,19 @@ void SvxRuler::Update( const SvxProtectItem* pItem )
{
{
if
(
pItem
)
pRuler_Imp
->
aProtectItem
=
*
pItem
;
if
(
pItem
)
pRuler_Imp
->
aProtectItem
=
*
pItem
;
}
}
/* -----------------------------22.08.2002 13:10------------------------------
---------------------------------------------------------------------------*/
void
SvxRuler
::
UpdateTextRTL
(
const
SfxBoolItem
*
pItem
)
{
if
(
bActive
)
{
delete
pRuler_Imp
->
pTextRTLItem
;
pRuler_Imp
->
pTextRTLItem
=
0
;
if
(
pItem
)
pRuler_Imp
->
pTextRTLItem
=
new
SfxBoolItem
(
*
pItem
);
StartListening_Impl
();
}
}
void
SvxRuler
::
Update
void
SvxRuler
::
Update
(
(
...
@@ -903,12 +921,18 @@ void SvxRuler::UpdatePara()
...
@@ -903,12 +921,18 @@ void SvxRuler::UpdatePara()
// Erstzeileneinzug, ist negativ zum linken Absatzrand
// Erstzeileneinzug, ist negativ zum linken Absatzrand
long
nLeftFrameMargin
=
GetLeftFrameMargin
();
long
nLeftFrameMargin
=
GetLeftFrameMargin
();
long
nRightFrameMargin
=
GetRightFrameMargin
();
long
nRightFrameMargin
=
GetRightFrameMargin
();
pIndents
[
INDENT_FIRST_LINE
].
nPos
=
if
(
pRuler_Imp
->
pTextRTLItem
&&
pRuler_Imp
->
pTextRTLItem
->
GetValue
())
ConvertHPosPixel
(
pIndents
[
INDENT_FIRST_LINE
].
nPos
=
nLeftFrameMargin
+
ConvertHPosPixel
(
pParaItem
->
GetTxtLeft
()
+
nRightFrameMargin
-
pParaItem
->
GetTxtFirstLineOfst
()
+
pParaItem
->
GetTxtFirstLineOfst
()
+
lAppNullOffset
);
lAppNullOffset
);
else
pIndents
[
INDENT_FIRST_LINE
].
nPos
=
ConvertHPosPixel
(
nLeftFrameMargin
+
pParaItem
->
GetTxtLeft
()
+
pParaItem
->
GetTxtFirstLineOfst
()
+
lAppNullOffset
);
if
(
pParaItem
->
IsAutoFirst
()
)
if
(
pParaItem
->
IsAutoFirst
()
)
pIndents
[
INDENT_FIRST_LINE
].
nStyle
|=
RULER_STYLE_INVISIBLE
;
pIndents
[
INDENT_FIRST_LINE
].
nStyle
|=
RULER_STYLE_INVISIBLE
;
else
else
...
@@ -1681,7 +1705,9 @@ void SvxRuler::DragIndents()
...
@@ -1681,7 +1705,9 @@ void SvxRuler::DragIndents()
const
USHORT
nIdx
=
GetDragAryPos
()
+
INDENT_GAP
;
const
USHORT
nIdx
=
GetDragAryPos
()
+
INDENT_GAP
;
const
long
lDiff
=
pIndents
[
nIdx
].
nPos
-
lDragPos
;
const
long
lDiff
=
pIndents
[
nIdx
].
nPos
-
lDragPos
;
if
(
nIdx
>=
INDENT_FIRST_LINE
&&
nIdx
<
INDENT_RIGHT_MARGIN
&&
BOOL
bRTL
=
pRuler_Imp
->
pTextRTLItem
&&
pRuler_Imp
->
pTextRTLItem
->
GetValue
();
if
((
nIdx
==
INDENT_FIRST_LINE
||
(
!
bRTL
&&
nIdx
==
INDENT_LEFT_MARGIN
)
||
(
bRTL
&&
nIdx
==
INDENT_RIGHT_MARGIN
))
&&
(
nDragType
&
DRAG_OBJECT_LEFT_INDENT_ONLY
)
!=
(
nDragType
&
DRAG_OBJECT_LEFT_INDENT_ONLY
)
!=
DRAG_OBJECT_LEFT_INDENT_ONLY
)
DRAG_OBJECT_LEFT_INDENT_ONLY
)
pIndents
[
INDENT_FIRST_LINE
].
nPos
-=
lDiff
;
pIndents
[
INDENT_FIRST_LINE
].
nPos
-=
lDiff
;
...
@@ -2146,12 +2172,24 @@ void SvxRuler::ApplyIndents()
...
@@ -2146,12 +2172,24 @@ void SvxRuler::ApplyIndents()
ConvertHPosLogic
(
pIndents
[
INDENT_LEFT_MARGIN
].
nPos
),
ConvertHPosLogic
(
pIndents
[
INDENT_LEFT_MARGIN
].
nPos
),
pParaItem
->
GetTxtLeft
());
pParaItem
->
GetTxtLeft
());
long
nNewFirstLineOffset
=
BOOL
bRTL
=
pRuler_Imp
->
pTextRTLItem
&&
pRuler_Imp
->
pTextRTLItem
->
GetValue
();
PixelHAdjust
(
ConvertHPosLogic
(
pIndents
[
INDENT_FIRST_LINE
].
nPos
-
long
nNewFirstLineOffset
;
if
(
bRTL
)
{
long
nRightFrameMargin
=
GetRightFrameMargin
();
nNewFirstLineOffset
=
PixelHAdjust
(
nRightFrameMargin
-
ConvertHPosLogic
(
pIndents
[
INDENT_FIRST_LINE
].
nPos
)
-
lAppNullOffset
,
pParaItem
->
GetTxtFirstLineOfst
());
}
else
nNewFirstLineOffset
=
PixelHAdjust
(
ConvertHPosLogic
(
pIndents
[
INDENT_FIRST_LINE
].
nPos
-
pIndents
[
INDENT_LEFT_MARGIN
].
nPos
)
-
pIndents
[
INDENT_LEFT_MARGIN
].
nPos
)
-
lAppNullOffset
,
lAppNullOffset
,
pParaItem
->
GetTxtFirstLineOfst
());
pParaItem
->
GetTxtFirstLineOfst
());
// #62986# : Ist der neue TxtLeft kleiner als der alte FirstLineIndent,
// #62986# : Ist der neue TxtLeft kleiner als der alte FirstLineIndent,
// dann geht die Differenz verloren und der Absatz wird insgesamt
// dann geht die Differenz verloren und der Absatz wird insgesamt
...
@@ -3001,7 +3039,9 @@ long __EXPORT SvxRuler::StartDrag()
...
@@ -3001,7 +3039,9 @@ long __EXPORT SvxRuler::StartDrag()
case
RULER_TYPE_INDENT
:
{
// Absatzeinzuege (Modifier)
case
RULER_TYPE_INDENT
:
{
// Absatzeinzuege (Modifier)
if
(
bContentProtected
)
if
(
bContentProtected
)
return
FALSE
;
return
FALSE
;
if
((
INDENT_LEFT_MARGIN
)
==
GetDragAryPos
()
+
INDENT_GAP
)
{
// Linker Absatzeinzug
BOOL
bRTL
=
pRuler_Imp
->
pTextRTLItem
&&
pRuler_Imp
->
pTextRTLItem
->
GetValue
();
USHORT
nIndent
=
bRTL
?
INDENT_RIGHT_MARGIN
:
INDENT_LEFT_MARGIN
;
if
((
nIndent
)
==
GetDragAryPos
()
+
INDENT_GAP
)
{
// Linker Absatzeinzug
pIndents
[
0
]
=
pIndents
[
INDENT_FIRST_LINE
];
pIndents
[
0
]
=
pIndents
[
INDENT_FIRST_LINE
];
pIndents
[
0
].
nStyle
|=
RULER_STYLE_DONTKNOW
;
pIndents
[
0
].
nStyle
|=
RULER_STYLE_DONTKNOW
;
EvalModifier
();
EvalModifier
();
...
...
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