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
47c4daf0
Kaydet (Commit)
47c4daf0
authored
Agu 24, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert SgaObjKind to scoped enum
Change-Id: I1bc1244646db661f181d4224d81f12d613976362
üst
bd4526b5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
66 additions
and
66 deletions
+66
-66
galmisc.hxx
include/svx/galmisc.hxx
+8
-8
galobj.hxx
svx/inc/galobj.hxx
+5
-5
galbrws2.cxx
svx/source/gallery2/galbrws2.cxx
+10
-10
galexpl.cxx
svx/source/gallery2/galexpl.cxx
+2
-2
galmisc.cxx
svx/source/gallery2/galmisc.cxx
+8
-8
galobj.cxx
svx/source/gallery2/galobj.cxx
+2
-2
galtheme.cxx
svx/source/gallery2/galtheme.cxx
+28
-28
unogalitem.cxx
svx/source/unogallery/unogalitem.cxx
+3
-3
No files found.
include/svx/galmisc.hxx
Dosyayı görüntüle @
47c4daf0
...
...
@@ -50,15 +50,15 @@ struct ExchangeData
}
};
enum
SgaObjKind
enum
class
SgaObjKind
{
SGA_OBJ_
NONE
=
0
,
// abstract object
SGA_OBJ_BMP
=
1
,
// bitmap object
S
GA_OBJ_SOUND
=
2
,
// sound object
SGA_OBJ_VIDEO
=
3
,
// video object
SGA_OBJ_ANIM
=
4
,
// animation object
S
GA_OBJ_SVDRAW
=
5
,
// Svdraw object
SGA_OBJ_INET
=
6
// graphics from the internet
NONE
=
0
,
// abstract object
Bitmap
=
1
,
// bitmap object
S
ound
=
2
,
// sound object
Video
=
3
,
// video object
Animation
=
4
,
// animation object
S
vDraw
=
5
,
// Svdraw object
Inet
=
6
// graphics from the internet
};
#define IV_IMAPINFO (sal_uInt32('S')*0x00000001+sal_uInt32('D')*0x00000100+sal_uInt32('U')*0x00010000+sal_uInt32('D')*0x01000000)
...
...
svx/inc/galobj.hxx
Dosyayı görüntüle @
47c4daf0
...
...
@@ -100,7 +100,7 @@ public:
SgaObjectSound
(
const
INetURLObject
&
rURL
);
virtual
~
SgaObjectSound
();
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
GA_OBJ_SOUND
;
}
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
gaObjKind
::
Sound
;
}
virtual
BitmapEx
GetThumbBmp
()
const
override
;
};
...
...
@@ -126,7 +126,7 @@ public:
SgaObjectSvDraw
(
SvStream
&
rIStm
,
const
INetURLObject
&
rURL
);
virtual
~
SgaObjectSvDraw
()
{};
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
GA_OBJ_SVDRAW
;
}
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
gaObjKind
::
SvDraw
;
}
};
class
SgaObjectBmp
:
public
SgaObject
...
...
@@ -147,7 +147,7 @@ public:
SgaObjectBmp
(
const
Graphic
&
rGraphic
,
const
INetURLObject
&
rURL
,
const
OUString
&
rFormat
);
virtual
~
SgaObjectBmp
()
{};
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
GA_OBJ_BMP
;
}
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
gaObjKind
::
Bitmap
;
}
};
class
SgaObjectAnim
:
public
SgaObjectBmp
...
...
@@ -159,7 +159,7 @@ public:
virtual
~
SgaObjectAnim
()
{};
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
GA_OBJ_ANIM
;
}
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
gaObjKind
::
Animation
;
}
};
class
SgaObjectINet
:
public
SgaObjectAnim
...
...
@@ -171,7 +171,7 @@ public:
virtual
~
SgaObjectINet
()
{};
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
GA_OBJ_INET
;
}
virtual
SgaObjKind
GetObjKind
()
const
override
{
return
S
gaObjKind
::
Inet
;
}
};
#endif
...
...
svx/source/gallery2/galbrws2.cxx
Dosyayı görüntüle @
47c4daf0
...
...
@@ -242,7 +242,7 @@ void GalleryThemePopup::ExecutePopup( vcl::Window *pWindow, const ::Point &aPos
const_cast
<
GalleryTheme
*
>
(
mpTheme
)
->
GetURL
(
mnObjectPos
,
aURL
);
const
bool
bValidURL
=
(
aURL
.
GetProtocol
()
!=
INetProtocol
::
NotValid
);
mpPopupMenu
->
EnableItem
(
MN_ADD
,
bValidURL
&&
S
GA_OBJ_SOUND
!=
eObjKind
);
mpPopupMenu
->
EnableItem
(
MN_ADD
,
bValidURL
&&
S
gaObjKind
::
Sound
!=
eObjKind
);
mpPopupMenu
->
EnableItem
(
MN_PREVIEW
,
bValidURL
);
...
...
@@ -303,7 +303,7 @@ void GalleryThemePopup::ExecutePopup( vcl::Window *pWindow, const ::Point &aPos
{}
}
if
(
!
mpBackgroundPopup
->
GetItemCount
()
||
(
eObjKind
==
S
GA_OBJ_SVDRAW
)
||
(
eObjKind
==
SGA_OBJ_SOUND
)
)
if
(
!
mpBackgroundPopup
->
GetItemCount
()
||
(
eObjKind
==
S
gaObjKind
::
SvDraw
)
||
(
eObjKind
==
SgaObjKind
::
Sound
)
)
mpPopupMenu
->
EnableItem
(
MN_BACKGROUND
,
false
);
else
{
...
...
@@ -815,7 +815,7 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
mpPreview
->
SetGraphic
(
aGraphic
);
mpPreview
->
Show
();
if
(
mpCurTheme
&&
mpCurTheme
->
GetObjectKind
(
nPos
)
==
S
GA_OBJ_SOUND
)
if
(
mpCurTheme
&&
mpCurTheme
->
GetObjectKind
(
nPos
)
==
S
gaObjKind
::
Sound
)
GalleryPreview
::
PreviewMedia
(
mpCurTheme
->
GetObjectURL
(
nPos
)
);
maViewBox
->
EnableItem
(
TBX_ID_ICON
,
false
);
...
...
@@ -888,7 +888,7 @@ void GalleryBrowser2::Travel( GalleryBrowserTravel eTravel )
mpCurTheme
->
GetGraphic
(
nPos
,
aGraphic
);
mpPreview
->
SetGraphic
(
aGraphic
);
if
(
S
GA_OBJ_SOUND
==
mpCurTheme
->
GetObjectKind
(
nPos
)
)
if
(
S
gaObjKind
::
Sound
==
mpCurTheme
->
GetObjectKind
(
nPos
)
)
GalleryPreview
::
PreviewMedia
(
mpCurTheme
->
GetObjectURL
(
nPos
)
);
mpPreview
->
Invalidate
();
...
...
@@ -1060,15 +1060,15 @@ void GalleryBrowser2::Dispatch(
switch
(
mpCurTheme
->
GetObjectKind
(
mnCurActionPos
)
)
{
case
S
GA_OBJ_BMP
:
case
S
GA_OBJ_ANIM
:
case
S
GA_OBJ_INET
:
case
S
gaObjKind
:
:
Bitmap
:
case
S
gaObjKind
:
:
Animation
:
case
S
gaObjKind
:
:
Inet
:
// TODO drawing objects are inserted as drawings only via drag&drop
case
S
GA_OBJ_SVDRAW
:
case
S
gaObjKind
:
:
SvDraw
:
nType
=
css
::
gallery
::
GalleryItemType
::
GRAPHIC
;
break
;
case
S
GA_OBJ_SOUND
:
case
S
gaObjKind
:
:
Sound
:
nType
=
css
::
gallery
::
GalleryItemType
::
MEDIA
;
break
;
...
...
@@ -1271,7 +1271,7 @@ OUString GalleryBrowser2::GetFilterName() const
{
const
SgaObjKind
eObjKind
=
mpCurTheme
->
GetObjectKind
(
mnCurActionPos
);
if
(
(
S
GA_OBJ_BMP
==
eObjKind
)
||
(
SGA_OBJ_ANIM
==
eObjKind
)
)
if
(
(
S
gaObjKind
::
Bitmap
==
eObjKind
)
||
(
SgaObjKind
::
Animation
==
eObjKind
)
)
{
GraphicFilter
&
rFilter
=
GraphicFilter
::
GetGraphicFilter
();
INetURLObject
aURL
;
...
...
svx/source/gallery2/galexpl.cxx
Dosyayı görüntüle @
47c4daf0
...
...
@@ -183,7 +183,7 @@ sal_uInt32 GalleryExplorer::GetSdrObjCount( const OUString& rThemeName )
if
(
pTheme
)
{
for
(
sal_uInt32
i
=
0
,
nCount
=
pTheme
->
GetObjectCount
();
i
<
nCount
;
i
++
)
if
(
S
GA_OBJ_SVDRAW
==
pTheme
->
GetObjectKind
(
i
)
)
if
(
S
gaObjKind
::
SvDraw
==
pTheme
->
GetObjectKind
(
i
)
)
nRet
++
;
pGal
->
ReleaseTheme
(
pTheme
,
aListener
);
...
...
@@ -214,7 +214,7 @@ bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uInt32 nSdrMode
{
for
(
sal_uInt32
i
=
0
,
nCount
=
pTheme
->
GetObjectCount
(),
nActPos
=
0
;
(
i
<
nCount
)
&&
!
bRet
;
i
++
)
{
if
(
S
GA_OBJ_SVDRAW
==
pTheme
->
GetObjectKind
(
i
)
)
if
(
S
gaObjKind
::
SvDraw
==
pTheme
->
GetObjectKind
(
i
)
)
{
if
(
nActPos
++
==
nSdrModelPos
)
{
...
...
svx/source/gallery2/galmisc.cxx
Dosyayı görüntüle @
47c4daf0
...
...
@@ -419,7 +419,7 @@ void GalleryTransferable::InitData( bool bLazy )
{
switch
(
meObjectKind
)
{
case
S
GA_OBJ_SVDRAW
:
case
S
gaObjKind
:
:
SvDraw
:
{
if
(
!
bLazy
)
{
...
...
@@ -445,10 +445,10 @@ void GalleryTransferable::InitData( bool bLazy )
}
break
;
case
S
GA_OBJ_ANIM
:
case
S
GA_OBJ_BMP
:
case
S
GA_OBJ_INET
:
case
S
GA_OBJ_SOUND
:
case
S
gaObjKind
:
:
Animation
:
case
S
gaObjKind
:
:
Bitmap
:
case
S
gaObjKind
:
:
Inet
:
case
S
gaObjKind
:
:
Sound
:
{
if
(
!
mpURL
)
{
...
...
@@ -461,7 +461,7 @@ void GalleryTransferable::InitData( bool bLazy )
}
}
if
(
(
S
GA_OBJ_SOUND
!=
meObjectKind
)
&&
!
mpGraphicObject
)
if
(
(
S
gaObjKind
::
Sound
!=
meObjectKind
)
&&
!
mpGraphicObject
)
{
Graphic
aGraphic
;
...
...
@@ -479,7 +479,7 @@ void GalleryTransferable::InitData( bool bLazy )
void
GalleryTransferable
::
AddSupportedFormats
()
{
if
(
S
GA_OBJ_SVDRAW
==
meObjectKind
)
if
(
S
gaObjKind
::
SvDraw
==
meObjectKind
)
{
AddFormat
(
SotClipboardFormatId
::
DRAWING
);
AddFormat
(
SotClipboardFormatId
::
SVXB
);
...
...
@@ -516,7 +516,7 @@ bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, cons
InitData
(
false
);
if
(
(
SotClipboardFormatId
::
DRAWING
==
nFormat
)
&&
(
S
GA_OBJ_SVDRAW
==
meObjectKind
)
)
if
(
(
SotClipboardFormatId
::
DRAWING
==
nFormat
)
&&
(
S
gaObjKind
::
SvDraw
==
meObjectKind
)
)
{
bRet
=
(
mxModelStream
.
Is
()
&&
SetObject
(
&
mxModelStream
,
SotClipboardFormatId
::
NONE
,
rFlavor
)
);
}
...
...
svx/source/gallery2/galobj.cxx
Dosyayı görüntüle @
47c4daf0
...
...
@@ -55,7 +55,7 @@ BitmapEx SgaObject::createPreviewBitmapEx(const Size& rSizePixel) const
if
(
rSizePixel
.
Width
()
&&
rSizePixel
.
Height
())
{
if
(
S
GA_OBJ_SOUND
==
GetObjKind
())
if
(
S
gaObjKind
::
Sound
==
GetObjKind
())
{
aRetval
=
GAL_RES
(
RID_SVXBMP_GALLERY_MEDIA
);
}
...
...
@@ -171,7 +171,7 @@ void SgaObject::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
static
const
sal_uInt32
nInventor
=
COMPAT_FORMAT
(
'S'
,
'G'
,
'A'
,
'3'
);
rOut
.
WriteUInt32
(
nInventor
).
WriteUInt16
(
0x0004
).
WriteUInt16
(
GetVersion
()
).
WriteUInt16
(
GetObjKind
()
);
rOut
.
WriteUInt32
(
nInventor
).
WriteUInt16
(
0x0004
).
WriteUInt16
(
GetVersion
()
).
WriteUInt16
(
(
sal_uInt16
)
GetObjKind
()
);
rOut
.
WriteBool
(
bIsThumbBmp
);
if
(
bIsThumbBmp
)
...
...
svx/source/gallery2/galtheme.cxx
Dosyayı görüntüle @
47c4daf0
...
...
@@ -166,11 +166,11 @@ SgaObject* GalleryTheme::ImplReadSgaObject( GalleryObject* pEntry )
switch
(
pEntry
->
eObjKind
)
{
case
S
GA_OBJ_BMP
:
pSgaObj
=
new
SgaObjectBmp
();
break
;
case
S
GA_OBJ_ANIM
:
pSgaObj
=
new
SgaObjectAnim
();
break
;
case
S
GA_OBJ_INET
:
pSgaObj
=
new
SgaObjectINet
();
break
;
case
S
GA_OBJ_SVDRAW
:
pSgaObj
=
new
SgaObjectSvDraw
();
break
;
case
S
GA_OBJ_SOUND
:
pSgaObj
=
new
SgaObjectSound
();
break
;
case
S
gaObjKind
:
:
Bitmap
:
pSgaObj
=
new
SgaObjectBmp
();
break
;
case
S
gaObjKind
:
:
Animation
:
pSgaObj
=
new
SgaObjectAnim
();
break
;
case
S
gaObjKind
:
:
Inet
:
pSgaObj
=
new
SgaObjectINet
();
break
;
case
S
gaObjKind
:
:
SvDraw
:
pSgaObj
=
new
SgaObjectSvDraw
();
break
;
case
S
gaObjKind
:
:
Sound
:
pSgaObj
=
new
SgaObjectSound
();
break
;
default
:
break
;
...
...
@@ -286,7 +286,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ConvertDat
do
{
// get URL
if
(
S
GA_OBJ_SVDRAW
==
eObjKind
)
if
(
S
gaObjKind
::
SvDraw
==
eObjKind
)
{
OUString
aFileName
(
"gallery/svdraw/dd"
);
aNewURL
=
INetURLObject
(
aFileName
+=
OUString
::
number
(
++
nNextNumber
%
99999999
),
INetProtocol
::
PrivSoffice
);
...
...
@@ -467,7 +467,7 @@ bool GalleryTheme::RemoveObject( size_t nPos )
if
(
pEntry
)
{
if
(
S
GA_OBJ_SVDRAW
==
pEntry
->
eObjKind
)
if
(
S
gaObjKind
::
SvDraw
==
pEntry
->
eObjKind
)
aSvDrawStorageRef
->
Remove
(
pEntry
->
aURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
)
);
Broadcast
(
GalleryHint
(
GalleryHintType
::
CLOSE_OBJECT
,
GetName
(),
reinterpret_cast
<
sal_uIntPtr
>
(
pEntry
)
)
);
...
...
@@ -534,12 +534,12 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
rActualizeLink
.
Call
(
aURL
);
// SvDraw objects will be updated later
if
(
pEntry
->
eObjKind
!=
S
GA_OBJ_SVDRAW
)
if
(
pEntry
->
eObjKind
!=
S
gaObjKind
::
SvDraw
)
{
// Still a function should be implemented,
// which assigns files to the relevant entry.
// insert graphics as graphic objects into the gallery
if
(
pEntry
->
eObjKind
==
S
GA_OBJ_SOUND
)
if
(
pEntry
->
eObjKind
==
S
gaObjKind
::
Sound
)
{
SgaObjectSound
aObjSound
(
aURL
);
if
(
!
InsertObject
(
aObjSound
)
)
...
...
@@ -553,7 +553,7 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
{
std
::
unique_ptr
<
SgaObject
>
pNewObj
;
if
(
S
GA_OBJ_INET
==
pEntry
->
eObjKind
)
if
(
S
gaObjKind
::
Inet
==
pEntry
->
eObjKind
)
pNewObj
.
reset
(
static_cast
<
SgaObject
*>
(
new
SgaObjectINet
(
aGraphic
,
aURL
,
aFormat
)));
else
if
(
aGraphic
.
IsAnimated
()
)
pNewObj
.
reset
(
static_cast
<
SgaObject
*>
(
new
SgaObjectAnim
(
aGraphic
,
aURL
,
aFormat
)));
...
...
@@ -622,11 +622,11 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
switch
(
pEntry
->
eObjKind
)
{
case
S
GA_OBJ_BMP
:
pObj
.
reset
(
new
SgaObjectBmp
());
break
;
case
S
GA_OBJ_ANIM
:
pObj
.
reset
(
new
SgaObjectAnim
());
break
;
case
S
GA_OBJ_INET
:
pObj
.
reset
(
new
SgaObjectINet
());
break
;
case
S
GA_OBJ_SVDRAW
:
pObj
.
reset
(
new
SgaObjectSvDraw
());
break
;
case
S
GA_OBJ_SOUND
:
pObj
.
reset
(
new
SgaObjectSound
());
break
;
case
S
gaObjKind
:
:
Bitmap
:
pObj
.
reset
(
new
SgaObjectBmp
());
break
;
case
S
gaObjKind
:
:
Animation
:
pObj
.
reset
(
new
SgaObjectAnim
());
break
;
case
S
gaObjKind
:
:
Inet
:
pObj
.
reset
(
new
SgaObjectINet
());
break
;
case
S
gaObjKind
:
:
SvDraw
:
pObj
.
reset
(
new
SgaObjectSvDraw
());
break
;
case
S
gaObjKind
:
:
Sound
:
pObj
.
reset
(
new
SgaObjectSound
());
break
;
default
:
break
;
...
...
@@ -777,16 +777,16 @@ bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, bool bProgre
switch
(
pObject
->
eObjKind
)
{
case
S
GA_OBJ_BMP
:
case
S
GA_OBJ_ANIM
:
case
S
GA_OBJ_INET
:
case
S
gaObjKind
:
:
Bitmap
:
case
S
gaObjKind
:
:
Animation
:
case
S
gaObjKind
:
:
Inet
:
{
OUString
aFilterDummy
;
bRet
=
(
GalleryGraphicImport
(
aURL
,
rGraphic
,
aFilterDummy
,
bProgress
)
!=
GalleryGraphicImportRet
::
IMPORT_NONE
);
}
break
;
case
S
GA_OBJ_SVDRAW
:
case
S
gaObjKind
:
:
SvDraw
:
{
SvxGalleryDrawModel
aModel
;
...
...
@@ -815,7 +815,7 @@ bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, bool bProgre
}
break
;
case
S
GA_OBJ_SOUND
:
case
S
gaObjKind
:
:
Sound
:
{
SgaObject
*
pObj
=
AcquireObject
(
nPos
);
...
...
@@ -883,7 +883,7 @@ bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPo
nExportFormat
=
ConvertDataFormat
::
SVM
;
}
const
INetURLObject
aURL
(
ImplCreateUniqueURL
(
S
GA_OBJ_BMP
,
nExportFormat
)
);
const
INetURLObject
aURL
(
ImplCreateUniqueURL
(
S
gaObjKind
::
Bitmap
,
nExportFormat
)
);
std
::
unique_ptr
<
SvStream
>
pOStm
(
::
utl
::
UcbStreamHelper
::
CreateStream
(
aURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
StreamMode
::
WRITE
|
StreamMode
::
TRUNC
));
if
(
pOStm
)
...
...
@@ -926,7 +926,7 @@ bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool )
const
GalleryObject
*
pObject
=
ImplGetGalleryObject
(
nPos
);
bool
bRet
=
false
;
if
(
pObject
&&
(
S
GA_OBJ_SVDRAW
==
pObject
->
eObjKind
)
)
if
(
pObject
&&
(
S
gaObjKind
::
SvDraw
==
pObject
->
eObjKind
)
)
{
const
INetURLObject
aURL
(
ImplGetURL
(
pObject
)
);
tools
::
SvRef
<
SotStorage
>
xStor
(
GetSvDrawStorage
()
);
...
...
@@ -950,7 +950,7 @@ bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool )
bool
GalleryTheme
::
InsertModel
(
const
FmFormModel
&
rModel
,
sal_uIntPtr
nInsertPos
)
{
INetURLObject
aURL
(
ImplCreateUniqueURL
(
S
GA_OBJ_SVDRAW
)
);
INetURLObject
aURL
(
ImplCreateUniqueURL
(
S
gaObjKind
::
SvDraw
)
);
tools
::
SvRef
<
SotStorage
>
xStor
(
GetSvDrawStorage
()
);
bool
bRet
=
false
;
...
...
@@ -998,7 +998,7 @@ bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, tools::SvRef<SotStorageStre
const
GalleryObject
*
pObject
=
ImplGetGalleryObject
(
nPos
);
bool
bRet
=
false
;
if
(
pObject
&&
(
S
GA_OBJ_SVDRAW
==
pObject
->
eObjKind
)
)
if
(
pObject
&&
(
S
gaObjKind
::
SvDraw
==
pObject
->
eObjKind
)
)
{
const
INetURLObject
aURL
(
ImplGetURL
(
pObject
)
);
tools
::
SvRef
<
SotStorage
>
xStor
(
GetSvDrawStorage
()
);
...
...
@@ -1046,7 +1046,7 @@ bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, tools::SvRef<SotStorageStre
bool
GalleryTheme
::
InsertModelStream
(
const
tools
::
SvRef
<
SotStorageStream
>&
rxModelStream
,
sal_uIntPtr
nInsertPos
)
{
INetURLObject
aURL
(
ImplCreateUniqueURL
(
S
GA_OBJ_SVDRAW
)
);
INetURLObject
aURL
(
ImplCreateUniqueURL
(
S
gaObjKind
::
SvDraw
)
);
tools
::
SvRef
<
SotStorage
>
xStor
(
GetSvDrawStorage
()
);
bool
bRet
=
false
;
...
...
@@ -1294,7 +1294,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
const
GalleryObject
*
pObj
=
ImplGetGalleryObject
(
i
);
OUString
aPath
;
if
(
S
GA_OBJ_SVDRAW
==
pObj
->
eObjKind
)
if
(
S
gaObjKind
::
SvDraw
==
pObj
->
eObjKind
)
{
aPath
=
GetSvDrawStreamNameFromURL
(
pObj
->
aURL
);
bRel
=
false
;
...
...
@@ -1339,7 +1339,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
rOStm
.
WriteBool
(
bRel
);
write_uInt16_lenPrefixed_uInt8s_FromOUString
(
rOStm
,
aPath
,
RTL_TEXTENCODING_UTF8
);
rOStm
.
WriteUInt32
(
pObj
->
nOffset
).
WriteUInt16
(
pObj
->
eObjKind
);
rOStm
.
WriteUInt32
(
pObj
->
nOffset
).
WriteUInt16
(
(
sal_uInt16
)
pObj
->
eObjKind
);
}
// more recently, a 512-byte reserve buffer is written,
...
...
@@ -1447,7 +1447,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
}
else
{
if
(
S
GA_OBJ_SVDRAW
==
pObj
->
eObjKind
)
if
(
S
gaObjKind
::
SvDraw
==
pObj
->
eObjKind
)
{
OUString
aDummyURL
(
"gallery/svdraw/"
);
pObj
->
aURL
=
INetURLObject
(
aDummyURL
+=
aFileName
,
INetProtocol
::
PrivSoffice
);
...
...
svx/source/unogallery/unogalitem.cxx
Dosyayı görüntüle @
47c4daf0
...
...
@@ -182,12 +182,12 @@ sal_Int8 SAL_CALL GalleryItem::getType()
{
switch
(
implGetObject
()
->
eObjKind
)
{
case
S
GA_OBJ_SOUND
:
case
S
GA_OBJ_VIDEO
:
case
S
gaObjKind
:
:
Sound
:
case
S
gaObjKind
:
:
Video
:
nRet
=
gallery
::
GalleryItemType
::
MEDIA
;
break
;
case
S
GA_OBJ_SVDRAW
:
case
S
gaObjKind
:
:
SvDraw
:
nRet
=
gallery
::
GalleryItemType
::
DRAWING
;
break
;
...
...
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