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
5e3cbe05
Kaydet (Commit)
5e3cbe05
authored
Agu 07, 2014
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i125386 secured user request and changed some bools to bitfield
üst
a02eb39b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
17 deletions
+61
-17
embeddedobjectcontainer.hxx
comphelper/inc/comphelper/embeddedobjectcontainer.hxx
+3
-0
embeddedobjectcontainer.cxx
comphelper/source/container/embeddedobjectcontainer.cxx
+28
-8
linkmgr2.cxx
sfx2/source/appl/linkmgr2.cxx
+10
-0
embedhlp.cxx
svtools/source/misc/embedhlp.cxx
+20
-9
No files found.
comphelper/inc/comphelper/embeddedobjectcontainer.hxx
Dosyayı görüntüle @
5e3cbe05
...
...
@@ -178,6 +178,9 @@ sal_Bool RemoveEmbeddedObject( const ::com::sun::star::uno::Reference
* \return <FALSE/> if no error occurred, otherwise <TRUE/>.
*/
sal_Bool
SetPersistentEntries
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
embed
::
XStorage
>&
_xStorage
,
bool
_bClearModifedFlag
=
true
);
bool
getUserAllowsLinkUpdate
()
const
;
void
setUserAllowsLinkUpdate
(
bool
bNew
);
};
}
...
...
comphelper/source/container/embeddedobjectcontainer.cxx
Dosyayı görüntüle @
5e3cbe05
...
...
@@ -92,7 +92,10 @@ struct EmbedImpl
uno
::
WeakReference
<
uno
::
XInterface
>
m_xModel
;
//EmbeddedObjectContainerNameMap maTempObjectContainer;
//uno::Reference < embed::XStorage > mxTempStorage;
sal_Bool
bOwnsStorage
;
/// bitfield
bool
mbOwnsStorage
:
1
;
bool
mbUserAllowsLinkUpdate
:
1
;
const
uno
::
Reference
<
embed
::
XStorage
>&
GetReplacements
();
};
...
...
@@ -123,7 +126,8 @@ EmbeddedObjectContainer::EmbeddedObjectContainer()
{
pImpl
=
new
EmbedImpl
;
pImpl
->
mxStorage
=
::
comphelper
::
OStorageHelper
::
GetTemporaryStorage
();
pImpl
->
bOwnsStorage
=
sal_True
;
pImpl
->
mbOwnsStorage
=
true
;
pImpl
->
mbUserAllowsLinkUpdate
=
true
;
pImpl
->
mpTempObjectContainer
=
0
;
}
...
...
@@ -131,7 +135,8 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
{
pImpl
=
new
EmbedImpl
;
pImpl
->
mxStorage
=
rStor
;
pImpl
->
bOwnsStorage
=
sal_False
;
pImpl
->
mbOwnsStorage
=
false
;
pImpl
->
mbUserAllowsLinkUpdate
=
true
;
pImpl
->
mpTempObjectContainer
=
0
;
}
...
...
@@ -139,7 +144,8 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
{
pImpl
=
new
EmbedImpl
;
pImpl
->
mxStorage
=
rStor
;
pImpl
->
bOwnsStorage
=
sal_False
;
pImpl
->
mbOwnsStorage
=
false
;
pImpl
->
mbUserAllowsLinkUpdate
=
true
;
pImpl
->
mpTempObjectContainer
=
0
;
pImpl
->
m_xModel
=
xModel
;
}
...
...
@@ -148,11 +154,11 @@ void EmbeddedObjectContainer::SwitchPersistence( const uno::Reference < embed::X
{
ReleaseImageSubStorage
();
if
(
pImpl
->
bOwnsStorage
)
if
(
pImpl
->
m
bOwnsStorage
)
pImpl
->
mxStorage
->
dispose
();
pImpl
->
mxStorage
=
rStor
;
pImpl
->
bOwnsStorage
=
sal_F
alse
;
pImpl
->
mbOwnsStorage
=
f
alse
;
}
sal_Bool
EmbeddedObjectContainer
::
CommitImageSubStorage
()
...
...
@@ -208,7 +214,7 @@ EmbeddedObjectContainer::~EmbeddedObjectContainer()
{
ReleaseImageSubStorage
();
if
(
pImpl
->
bOwnsStorage
)
if
(
pImpl
->
m
bOwnsStorage
)
pImpl
->
mxStorage
->
dispose
();
delete
pImpl
->
mpTempObjectContainer
;
...
...
@@ -1401,7 +1407,7 @@ sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Boo
xStream
=
GetGraphicStream
(
xObj
,
&
aMediaType
);
}
if
(
!
xStream
.
is
()
)
if
(
!
xStream
.
is
()
&&
getUserAllowsLinkUpdate
()
)
{
// the image must be regenerated
// TODO/LATER: another aspect could be used
...
...
@@ -1685,4 +1691,18 @@ sal_Bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< emb
}
return
bError
;
}
bool
EmbeddedObjectContainer
::
getUserAllowsLinkUpdate
()
const
{
return
pImpl
->
mbUserAllowsLinkUpdate
;
}
void
EmbeddedObjectContainer
::
setUserAllowsLinkUpdate
(
bool
bNew
)
{
if
(
pImpl
->
mbUserAllowsLinkUpdate
!=
bNew
)
{
pImpl
->
mbUserAllowsLinkUpdate
=
bNew
;
}
}
}
sfx2/source/appl/linkmgr2.cxx
Dosyayı görüntüle @
5e3cbe05
...
...
@@ -318,7 +318,17 @@ void LinkManager::UpdateAllLinks(
{
int
nRet
=
QueryBox
(
pParentWin
,
WB_YES_NO
|
WB_DEF_YES
,
SfxResId
(
STR_QUERY_UPDATE_LINKS
)
).
Execute
();
if
(
RET_YES
!=
nRet
)
{
SfxObjectShell
*
pShell
=
pLink
->
GetLinkManager
()
->
GetPersist
();
if
(
pShell
)
{
comphelper
::
EmbeddedObjectContainer
&
rEmbeddedObjectContainer
=
pShell
->
getEmbeddedObjectContainer
();
rEmbeddedObjectContainer
.
setUserAllowsLinkUpdate
(
false
);
}
return
;
// es soll nichts geupdatet werden
}
bAskUpdate
=
sal_False
;
// einmal reicht
}
...
...
svtools/source/misc/embedhlp.cxx
Dosyayı görüntüle @
5e3cbe05
...
...
@@ -709,19 +709,30 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
if
(
!
xStream
.
is
()
)
{
RTL_LOGFILE_CONTEXT_TRACE
(
aLog
,
"getting stream from object"
);
// update wanted or no stream in container storage available
xStream
=
GetGraphicReplacementStream
(
mpImp
->
nViewAspect
,
mxObj
,
&
mpImp
->
aMediaType
);
bool
bUserAllowsLinkUpdate
(
true
);
const
comphelper
::
EmbeddedObjectContainer
*
pContainer
=
GetContainer
(
);
if
(
xStream
.
is
()
)
if
(
pContainer
)
{
if
(
mpImp
->
pContainer
)
mpImp
->
pContainer
->
InsertGraphicStream
(
xStream
,
mpImp
->
aPersistName
,
mpImp
->
aMediaType
);
bUserAllowsLinkUpdate
=
pContainer
->
getUserAllowsLinkUpdate
();
}
SvStream
*
pResult
=
::
utl
::
UcbStreamHelper
::
CreateStream
(
xStream
);
if
(
pResult
&&
bUpdate
)
mpImp
->
bNeedUpdate
=
sal_False
;
if
(
bUserAllowsLinkUpdate
)
{
// update wanted or no stream in container storage available
xStream
=
GetGraphicReplacementStream
(
mpImp
->
nViewAspect
,
mxObj
,
&
mpImp
->
aMediaType
);
return
pResult
;
if
(
xStream
.
is
())
{
if
(
mpImp
->
pContainer
)
mpImp
->
pContainer
->
InsertGraphicStream
(
xStream
,
mpImp
->
aPersistName
,
mpImp
->
aMediaType
);
SvStream
*
pResult
=
::
utl
::
UcbStreamHelper
::
CreateStream
(
xStream
);
if
(
pResult
&&
bUpdate
)
mpImp
->
bNeedUpdate
=
sal_False
;
return
pResult
;
}
}
}
...
...
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