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
f4be2add
Kaydet (Commit)
f4be2add
authored
Agu 18, 2013
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String to OUString, data member prefix, early bail out
Change-Id: I532401e4853319668f49c75e4653907272384d12
üst
bc42d992
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
32 deletions
+24
-32
unoframe.hxx
sw/inc/unoframe.hxx
+1
-1
unoframe.cxx
sw/source/core/unocore/unoframe.cxx
+23
-31
No files found.
sw/inc/unoframe.hxx
Dosyayı görüntüle @
f4be2add
...
...
@@ -68,7 +68,7 @@ private:
// Descriptor-interface
BaseFrameProperties_Impl
*
pProps
;
bool
bIsDescriptor
;
String
sName
;
OUString
m_
sName
;
SwPaM
*
m_pCopySource
;
...
...
sw/source/core/unocore/unoframe.cxx
Dosyayı görüntüle @
f4be2add
...
...
@@ -898,32 +898,28 @@ SwXFrame::~SwXFrame()
OUString
SwXFrame
::
getName
(
void
)
throw
(
uno
::
RuntimeException
)
{
SolarMutexGuard
aGuard
;
String
sRet
;
SwFrmFmt
*
pFmt
=
GetFrmFmt
();
if
(
pFmt
)
sRet
=
pFmt
->
GetName
();
else
if
(
bIsDescriptor
)
sRet
=
sName
;
else
return
pFmt
->
GetName
();
if
(
!
bIsDescriptor
)
throw
uno
::
RuntimeException
();
return
sRet
;
return
m_sName
;
}
void
SwXFrame
::
setName
(
const
::
OUString
&
rName
)
throw
(
uno
::
RuntimeException
)
void
SwXFrame
::
setName
(
const
OUString
&
rName
)
throw
(
uno
::
RuntimeException
)
{
SolarMutexGuard
aGuard
;
SwFrmFmt
*
pFmt
=
GetFrmFmt
();
String
sTmpName
(
rName
);
if
(
pFmt
)
{
pFmt
->
GetDoc
()
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFmt
,
sTmp
Name
);
if
(
pFmt
->
GetName
()
!=
sTmp
Name
)
pFmt
->
GetDoc
()
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFmt
,
r
Name
);
if
(
pFmt
->
GetName
()
!=
r
Name
)
{
throw
uno
::
RuntimeException
();
}
}
else
if
(
bIsDescriptor
)
sName
=
sTmp
Name
;
m_sName
=
r
Name
;
else
throw
uno
::
RuntimeException
();
}
...
...
@@ -1110,9 +1106,8 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
SwFlyFrmFmt
*
pFlyFmt
=
dynamic_cast
<
SwFlyFrmFmt
*>
(
pFmt
);
OSL_ENSURE
(
pFmt
,
"unexpected type of <pFmt> --> crash"
);
OUString
uTemp
;
aValue
>>=
uTemp
;
const
String
sTitle
(
uTemp
);
OUString
sTitle
;
aValue
>>=
sTitle
;
// assure that <SdrObject> instance exists.
GetOrCreateSdrObject
(
pFlyFmt
);
pFlyFmt
->
GetDoc
()
->
SetFlyFrmTitle
(
*
(
pFlyFmt
),
sTitle
);
...
...
@@ -1123,9 +1118,8 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
SwFlyFrmFmt
*
pFlyFmt
=
dynamic_cast
<
SwFlyFrmFmt
*>
(
pFmt
);
OSL_ENSURE
(
pFmt
,
"unexpected type of <pFmt> --> crash"
);
OUString
uTemp
;
aValue
>>=
uTemp
;
const
String
sDescription
(
uTemp
);
OUString
sDescription
;
aValue
>>=
sDescription
;
// assure that <SdrObject> instance exists.
GetOrCreateSdrObject
(
pFlyFmt
);
pFlyFmt
->
GetDoc
()
->
SetFlyFrmDescription
(
*
(
pFlyFmt
),
sDescription
);
...
...
@@ -2221,8 +2215,8 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
if
(
pFmt
)
{
pFmt
->
Add
(
this
);
if
(
sName
.
Len
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFmt
,
sName
);
if
(
!
m_sName
.
isEmpty
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFmt
,
m_
sName
);
}
//den SwXText wecken
((
SwXTextFrame
*
)
this
)
->
SetDoc
(
bIsDescriptor
?
m_pDoc
:
GetFrmFmt
()
->
GetDoc
()
);
...
...
@@ -2265,13 +2259,11 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
aGraphic
=
Graphic
(
xGraphic
);
}
String
sFltName
;
OU
String
sFltName
;
const
::
uno
::
Any
*
pFilter
;
if
(
pProps
->
GetProperty
(
FN_UNO_GRAPHIC_FILTER
,
0
,
pFilter
))
{
OUString
uTemp
;
(
*
pFilter
)
>>=
uTemp
;
sFltName
=
String
(
uTemp
);
(
*
pFilter
)
>>=
sFltName
;
}
pFmt
=
...
...
@@ -2286,8 +2278,8 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
->
GetIndex
()
+
1
]
->
GetGrfNode
();
pGrfNd
->
SetChgTwipSize
(
!
bSizeFound
);
pFmt
->
Add
(
this
);
if
(
sName
.
Len
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFmt
,
sName
);
if
(
!
m_sName
.
isEmpty
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFmt
,
m_
sName
);
}
const
::
uno
::
Any
*
pSurroundContour
;
...
...
@@ -2390,8 +2382,8 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
pDoc
->
GetIDocumentUndoRedo
().
EndUndo
(
UNDO_INSERT
,
NULL
);
pFmt2
->
Add
(
this
);
if
(
sName
.
Len
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFmt2
,
sName
);
if
(
!
m_sName
.
isEmpty
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFmt2
,
m_
sName
);
}
}
else
if
(
pStreamName
)
...
...
@@ -2404,8 +2396,8 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
pFrmFmt
=
pDoc
->
InsertOLE
(
aPam
,
sStreamName
,
embed
::
Aspects
::
MSOLE_CONTENT
,
&
aFrmSet
,
NULL
,
NULL
);
pDoc
->
GetIDocumentUndoRedo
().
EndUndo
(
UNDO_INSERT
,
NULL
);
pFrmFmt
->
Add
(
this
);
if
(
sName
.
Len
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFrmFmt
,
sName
);
if
(
!
m_sName
.
isEmpty
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFrmFmt
,
m_
sName
);
}
else
if
(
pEmbeddedObject
||
pStreamName
)
{
...
...
@@ -2430,8 +2422,8 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
pFrmFmt
=
pDoc
->
Insert
(
aPam
,
xObj
,
&
aFrmSet
,
NULL
,
NULL
);
pDoc
->
GetIDocumentUndoRedo
().
EndUndo
(
UNDO_INSERT
,
NULL
);
pFrmFmt
->
Add
(
this
);
if
(
sName
.
Len
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFrmFmt
,
sName
);
if
(
!
m_sName
.
isEmpty
())
pDoc
->
SetFlyName
((
SwFlyFrmFmt
&
)
*
pFrmFmt
,
m_
sName
);
}
}
if
(
pFmt
&&
pDoc
->
GetDrawModel
()
)
...
...
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