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
d0216f56
Kaydet (Commit)
d0216f56
authored
Ock 06, 2018
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SdrMarkView: provide OUString as return value
Change-Id: I2d45f4ada683da4f69df6d81a072d2f3ba813dae
üst
dbc3c4ed
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
58 deletions
+59
-58
svdmrkv.hxx
include/svx/svdmrkv.hxx
+3
-3
svddrgmt.cxx
svx/source/svdraw/svddrgmt.cxx
+4
-4
svdedtv1.cxx
svx/source/svdraw/svdedtv1.cxx
+38
-33
svdedxv.cxx
svx/source/svdraw/svdedxv.cxx
+2
-6
svdmrkv.cxx
svx/source/svdraw/svdmrkv.cxx
+9
-9
svdview.cxx
svx/source/svdraw/svdview.cxx
+3
-3
No files found.
include/svx/svdmrkv.hxx
Dosyayı görüntüle @
d0216f56
...
...
@@ -79,8 +79,8 @@ enum class SdrViewEditMode {
GluePointEdit
// Glue point editing mode
};
/** options for Imp
TakeDescriptionStr
() */
enum
class
Imp
Take
DescriptionOptions
/** options for Imp
GetDescriptionString
() */
enum
class
Imp
Get
DescriptionOptions
{
NONE
=
0
,
POINTS
=
1
,
...
...
@@ -154,7 +154,7 @@ protected:
SdrObject
*
CheckSingleSdrObjectHit
(
const
Point
&
rPnt
,
sal_uInt16
nTol
,
SdrObjList
const
*
pOL
,
SdrPageView
*
pPV
,
SdrSearchOptions
nOptions
,
const
SdrLayerIDSet
*
pMVisLay
,
SdrObject
*&
rpRootObj
)
const
;
SdrObject
*
CheckSingleSdrObjectHit
(
const
Point
&
rPnt
,
sal_uInt16
nTol
,
SdrObjList
const
*
pOL
,
SdrPageView
*
pPV
,
SdrSearchOptions
nOptions
,
const
SdrLayerIDSet
*
pMVisLay
,
SdrObject
*&
rpRootObj
,
const
SdrMarkList
*
pMarkList
)
const
;
bool
ImpIsFrameHandles
()
const
;
void
ImpTakeDescriptionStr
(
const
char
*
pStrCacheID
,
OUString
&
rStr
,
ImpTakeDescriptionOptions
nOpt
=
ImpTake
DescriptionOptions
::
NONE
)
const
;
OUString
ImpGetDescriptionString
(
const
char
*
pStrCacheID
,
ImpGetDescriptionOptions
nOpt
=
ImpGet
DescriptionOptions
::
NONE
)
const
;
// Generates a string including degrees symbol, from an angel specification in 1/100deg
bool
ImpMarkPoint
(
SdrHdl
*
pHdl
,
SdrMark
*
pMark
,
bool
bUnmark
);
...
...
svx/source/svdraw/svddrgmt.cxx
Dosyayı görüntüle @
d0216f56
...
...
@@ -552,13 +552,13 @@ void SdrDragMethod::createSdrDragEntries_GlueDrag()
void
SdrDragMethod
::
ImpTakeDescriptionStr
(
const
char
*
pStrCacheID
,
OUString
&
rStr
)
const
{
Imp
TakeDescriptionOptions
nOpt
=
ImpTake
DescriptionOptions
::
NONE
;
Imp
GetDescriptionOptions
nOpt
=
ImpGet
DescriptionOptions
::
NONE
;
if
(
IsDraggingPoints
())
{
nOpt
=
Imp
Take
DescriptionOptions
::
POINTS
;
nOpt
=
Imp
Get
DescriptionOptions
::
POINTS
;
}
else
if
(
IsDraggingGluePoints
())
{
nOpt
=
Imp
Take
DescriptionOptions
::
GLUEPOINTS
;
nOpt
=
Imp
Get
DescriptionOptions
::
GLUEPOINTS
;
}
getSdrDragView
().
ImpTakeDescriptionStr
(
pStrCacheID
,
rStr
,
nOpt
);
rStr
=
getSdrDragView
().
ImpGetDescriptionString
(
pStrCacheID
,
nOpt
);
}
SdrObject
*
SdrDragMethod
::
GetDragObj
()
const
...
...
svx/source/svdraw/svdedtv1.cxx
Dosyayı görüntüle @
d0216f56
...
...
@@ -83,12 +83,10 @@ void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect)
long
y1
=
rRect
.
Top
();
long
w1
=
rRect
.
Right
()
-
x1
;
long
h1
=
rRect
.
Bottom
()
-
y1
;
OUString
aStr
;
ImpTakeDescriptionStr
(
STR_EditPosSize
,
aStr
);
const
bool
bUndo
=
IsUndoEnabled
();
if
(
bUndo
)
BegUndo
(
aStr
);
BegUndo
(
ImpGetDescriptionString
(
STR_EditPosSize
)
);
for
(
size_t
nm
=
0
;
nm
<
nCount
;
++
nm
)
{
...
...
@@ -211,8 +209,7 @@ void SdrEditView::ResizeMarkedObj(const Point& rRef, const Fraction& xFact, cons
const
bool
bUndo
=
IsUndoEnabled
();
if
(
bUndo
)
{
OUString
aStr
;
ImpTakeDescriptionStr
(
STR_EditResize
,
aStr
);
OUString
aStr
{
ImpGetDescriptionString
(
STR_EditResize
)};
if
(
bCopy
)
aStr
+=
ImpGetResStr
(
STR_EditWithCopy
);
BegUndo
(
aStr
);
...
...
@@ -247,9 +244,7 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef,
const
bool
bUndo
=
IsUndoEnabled
();
if
(
bUndo
)
{
OUString
aStr
;
ImpTakeDescriptionStr
(
STR_EditResize
,
aStr
);
BegUndo
(
aStr
);
BegUndo
(
ImpGetDescriptionString
(
STR_EditResize
));
}
const
size_t
nMarkCount
=
GetMarkedObjectCount
();
...
...
@@ -310,8 +305,7 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy)
const
bool
bUndo
=
IsUndoEnabled
();
if
(
bUndo
)
{
OUString
aStr
;
ImpTakeDescriptionStr
(
STR_EditRotate
,
aStr
);
OUString
aStr
{
ImpGetDescriptionString
(
STR_EditRotate
)};
if
(
bCopy
)
aStr
+=
ImpGetResStr
(
STR_EditWithCopy
);
BegUndo
(
aStr
);
}
...
...
@@ -370,10 +364,14 @@ void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool b
{
OUString
aStr
;
Point
aDif
(
rRef2
-
rRef1
);
if
(
aDif
.
X
()
==
0
)
ImpTakeDescriptionStr
(
STR_EditMirrorHori
,
aStr
);
else
if
(
aDif
.
Y
()
==
0
)
ImpTakeDescriptionStr
(
STR_EditMirrorVert
,
aStr
);
else
if
(
std
::
abs
(
aDif
.
X
())
==
std
::
abs
(
aDif
.
Y
()))
ImpTakeDescriptionStr
(
STR_EditMirrorDiag
,
aStr
);
else
ImpTakeDescriptionStr
(
STR_EditMirrorFree
,
aStr
);
if
(
aDif
.
X
()
==
0
)
aStr
=
ImpGetDescriptionString
(
STR_EditMirrorHori
);
else
if
(
aDif
.
Y
()
==
0
)
aStr
=
ImpGetDescriptionString
(
STR_EditMirrorVert
);
else
if
(
std
::
abs
(
aDif
.
X
())
==
std
::
abs
(
aDif
.
Y
()))
aStr
=
ImpGetDescriptionString
(
STR_EditMirrorDiag
);
else
aStr
=
ImpGetDescriptionString
(
STR_EditMirrorFree
);
if
(
bCopy
)
aStr
+=
ImpGetResStr
(
STR_EditWithCopy
);
BegUndo
(
aStr
);
}
...
...
@@ -464,8 +462,7 @@ void SdrEditView::ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear, b
if
(
bUndo
)
{
OUString
aStr
;
ImpTakeDescriptionStr
(
STR_EditShear
,
aStr
);
OUString
aStr
{
ImpGetDescriptionString
(
STR_EditShear
)};
if
(
bCopy
)
aStr
+=
ImpGetResStr
(
STR_EditWithCopy
);
BegUndo
(
aStr
);
...
...
@@ -581,8 +578,7 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM
if
(
bUndo
)
{
OUString
aStr
;
ImpTakeDescriptionStr
(
bNoContortion
?
STR_EditCrook
:
STR_EditCrookContortion
,
aStr
);
OUString
aStr
{
ImpGetDescriptionString
(
bNoContortion
?
STR_EditCrook
:
STR_EditCrookContortion
)};
if
(
bCopy
)
aStr
+=
ImpGetResStr
(
STR_EditWithCopy
);
BegUndo
(
aStr
);
...
...
@@ -655,8 +651,7 @@ void SdrEditView::DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon&
if
(
bUndo
)
{
OUString
aStr
;
ImpTakeDescriptionStr
(
STR_EditDistort
,
aStr
);
OUString
aStr
{
ImpGetDescriptionString
(
STR_EditDistort
)};
if
(
bCopy
)
aStr
+=
ImpGetResStr
(
STR_EditWithCopy
);
BegUndo
(
aStr
);
...
...
@@ -1009,9 +1004,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
const
bool
bUndo
=
IsUndoEnabled
();
if
(
bUndo
)
{
OUString
aStr
;
ImpTakeDescriptionStr
(
STR_EditSetAttributes
,
aStr
);
BegUndo
(
aStr
);
BegUndo
(
ImpGetDescriptionString
(
STR_EditSetAttributes
));
}
const
size_t
nMarkCount
(
GetMarkedObjectCount
());
...
...
@@ -1190,9 +1183,9 @@ void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool bDontRe
{
OUString
aStr
;
if
(
pStyleSheet
!=
nullptr
)
ImpTakeDescriptionStr
(
STR_EditSetStylesheet
,
aStr
);
aStr
=
ImpGetDescriptionString
(
STR_EditSetStylesheet
);
else
ImpTakeDescriptionStr
(
STR_EditDelStylesheet
,
aStr
);
aStr
=
ImpGetDescriptionString
(
STR_EditDelStylesheet
);
BegUndo
(
aStr
);
}
...
...
@@ -1748,9 +1741,15 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
{
switch
(
eVert
)
{
case
SdrVertAlign
:
:
Top
:
ImpTakeDescriptionStr
(
STR_EditAlignVTop
,
aStr
);
break
;
case
SdrVertAlign
:
:
Bottom
:
ImpTakeDescriptionStr
(
STR_EditAlignVBottom
,
aStr
);
break
;
case
SdrVertAlign
:
:
Center
:
ImpTakeDescriptionStr
(
STR_EditAlignVCenter
,
aStr
);
break
;
case
SdrVertAlign
:
:
Top
:
aStr
=
ImpGetDescriptionString
(
STR_EditAlignVTop
);
break
;
case
SdrVertAlign
:
:
Bottom
:
aStr
=
ImpGetDescriptionString
(
STR_EditAlignVBottom
);
break
;
case
SdrVertAlign
:
:
Center
:
aStr
=
ImpGetDescriptionString
(
STR_EditAlignVCenter
);
break
;
default
:
break
;
}
}
...
...
@@ -1758,19 +1757,25 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
{
switch
(
eHor
)
{
case
SdrHorAlign
:
:
Left
:
ImpTakeDescriptionStr
(
STR_EditAlignHLeft
,
aStr
);
break
;
case
SdrHorAlign
:
:
Right
:
ImpTakeDescriptionStr
(
STR_EditAlignHRight
,
aStr
);
break
;
case
SdrHorAlign
:
:
Center
:
ImpTakeDescriptionStr
(
STR_EditAlignHCenter
,
aStr
);
break
;
case
SdrHorAlign
:
:
Left
:
aStr
=
ImpGetDescriptionString
(
STR_EditAlignHLeft
);
break
;
case
SdrHorAlign
:
:
Right
:
aStr
=
ImpGetDescriptionString
(
STR_EditAlignHRight
);
break
;
case
SdrHorAlign
:
:
Center
:
aStr
=
ImpGetDescriptionString
(
STR_EditAlignHCenter
);
break
;
default
:
break
;
}
}
else
if
(
eHor
==
SdrHorAlign
::
Center
&&
eVert
==
SdrVertAlign
::
Center
)
{
ImpTakeDescriptionStr
(
STR_EditAlignCenter
,
aSt
r
);
aStr
=
ImpGetDescriptionString
(
STR_EditAlignCente
r
);
}
else
{
ImpTakeDescriptionStr
(
STR_EditAlign
,
aStr
);
aStr
=
ImpGetDescriptionString
(
STR_EditAlign
);
}
BegUndo
(
aStr
);
}
...
...
svx/source/svdraw/svdedxv.cxx
Dosyayı görüntüle @
d0216f56
...
...
@@ -2096,9 +2096,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
if
(
bUndo
)
{
OUString
aStr
;
ImpTakeDescriptionStr
(
STR_EditSetAttributes
,
aStr
);
BegUndo
(
aStr
);
BegUndo
(
ImpGetDescriptionString
(
STR_EditSetAttributes
));
AddUndo
(
GetModel
()
->
GetSdrUndoFactory
().
CreateUndoGeoObject
(
*
mxTextEditObj
.
get
()));
// If this is a text object also rescue the OutlinerParaObject since
...
...
@@ -2143,9 +2141,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
{
if
(
IsUndoEnabled
()
)
{
OUString
aStr
;
ImpTakeDescriptionStr
(
STR_EditSetAttributes
,
aStr
);
BegUndo
(
aStr
);
BegUndo
(
ImpGetDescriptionString
(
STR_EditSetAttributes
));
AddUndo
(
GetModel
()
->
GetSdrUndoFactory
().
CreateUndoGeoObject
(
*
mxTextEditObj
.
get
()));
AddUndo
(
GetModel
()
->
GetSdrUndoFactory
().
CreateUndoAttrObject
(
*
mxTextEditObj
.
get
()));
EndUndo
();
...
...
svx/source/svdraw/svdmrkv.cxx
Dosyayı görüntüle @
d0216f56
...
...
@@ -2075,28 +2075,28 @@ const tools::Rectangle& SdrMarkView::GetMarkedObjRect() const
}
void
SdrMarkView
::
ImpTakeDescriptionStr
(
const
char
*
pStrCacheID
,
OUString
&
rStr
,
ImpTake
DescriptionOptions
nOpt
)
const
OUString
SdrMarkView
::
ImpGetDescriptionString
(
const
char
*
pStrCacheID
,
ImpGet
DescriptionOptions
nOpt
)
const
{
r
Str
=
ImpGetResStr
(
pStrCacheID
);
sal_Int32
nPos
=
r
Str
.
indexOf
(
"%1"
);
OUString
s
Str
=
ImpGetResStr
(
pStrCacheID
);
const
sal_Int32
nPos
=
s
Str
.
indexOf
(
"%1"
);
if
(
nPos
!=
-
1
)
{
if
(
nOpt
==
Imp
Take
DescriptionOptions
::
POINTS
)
if
(
nOpt
==
Imp
Get
DescriptionOptions
::
POINTS
)
{
rStr
=
r
Str
.
replaceAt
(
nPos
,
2
,
GetDescriptionOfMarkedPoints
());
sStr
=
s
Str
.
replaceAt
(
nPos
,
2
,
GetDescriptionOfMarkedPoints
());
}
else
if
(
nOpt
==
Imp
Take
DescriptionOptions
::
GLUEPOINTS
)
else
if
(
nOpt
==
Imp
Get
DescriptionOptions
::
GLUEPOINTS
)
{
rStr
=
r
Str
.
replaceAt
(
nPos
,
2
,
GetDescriptionOfMarkedGluePoints
());
sStr
=
s
Str
.
replaceAt
(
nPos
,
2
,
GetDescriptionOfMarkedGluePoints
());
}
else
{
rStr
=
r
Str
.
replaceAt
(
nPos
,
2
,
GetDescriptionOfMarkedObjects
());
sStr
=
s
Str
.
replaceAt
(
nPos
,
2
,
GetDescriptionOfMarkedObjects
());
}
}
r
Str
=
r
Str
.
replaceFirst
(
"%2"
,
"0"
);
r
eturn
s
Str
.
replaceFirst
(
"%2"
,
"0"
);
}
...
...
svx/source/svdraw/svdview.cxx
Dosyayı görüntüle @
d0216f56
...
...
@@ -1269,14 +1269,14 @@ OUString SdrView::GetStatusText()
if
(
aStr
==
STR_NOTHING
)
{
if
(
AreObjectsMarked
())
{
ImpTakeDescriptionStr
(
STR_ViewMarked
,
aStr
);
aStr
=
ImpGetDescriptionString
(
STR_ViewMarked
);
if
(
IsGluePointEditMode
())
{
if
(
HasMarkedGluePoints
())
{
ImpTakeDescriptionStr
(
STR_ViewMarked
,
aStr
,
ImpTake
DescriptionOptions
::
GLUEPOINTS
);
aStr
=
ImpGetDescriptionString
(
STR_ViewMarked
,
ImpGet
DescriptionOptions
::
GLUEPOINTS
);
}
}
else
{
if
(
HasMarkedPoints
())
{
ImpTakeDescriptionStr
(
STR_ViewMarked
,
aStr
,
ImpTake
DescriptionOptions
::
POINTS
);
aStr
=
ImpGetDescriptionString
(
STR_ViewMarked
,
ImpGet
DescriptionOptions
::
POINTS
);
}
}
}
else
{
...
...
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