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
6f83e628
Kaydet (Commit)
6f83e628
authored
Eki 14, 2010
tarafından
Vladimir Glazunov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
CWS-TOOLING: integrate CWS impress201
üst
8c29ce3c
f208c330
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
10 deletions
+27
-10
graphiccollector.cxx
sdext/source/minimizer/graphiccollector.cxx
+4
-4
graphiccollector.hxx
sdext/source/minimizer/graphiccollector.hxx
+2
-3
impoptimizer.cxx
sdext/source/minimizer/impoptimizer.cxx
+21
-3
No files found.
sdext/source/minimizer/graphiccollector.cxx
Dosyayı görüntüle @
6f83e628
...
@@ -70,7 +70,7 @@ const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentCo
...
@@ -70,7 +70,7 @@ const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentCo
return
aDeviceInfo
;
return
aDeviceInfo
;
}
}
void
ImpAddEntity
(
std
::
vector
<
GraphicCollector
::
GraphicEntity
>&
rGraphicEntities
,
Reference
<
XGraphic
>&
rxGraphic
,
const
GraphicSettings
&
rGraphicSettings
,
const
GraphicCollector
::
GraphicUser
&
rUser
)
void
ImpAddEntity
(
std
::
vector
<
GraphicCollector
::
GraphicEntity
>&
rGraphicEntities
,
const
GraphicSettings
&
rGraphicSettings
,
const
GraphicCollector
::
GraphicUser
&
rUser
)
{
{
const
rtl
::
OUString
aGraphicURL
(
rUser
.
maGraphicURL
);
const
rtl
::
OUString
aGraphicURL
(
rUser
.
maGraphicURL
);
const
rtl
::
OUString
sPackageURL
(
OUString
::
createFromAscii
(
"vnd.sun.star.GraphicObject:"
)
);
const
rtl
::
OUString
sPackageURL
(
OUString
::
createFromAscii
(
"vnd.sun.star.GraphicObject:"
)
);
...
@@ -93,7 +93,7 @@ void ImpAddEntity( std::vector< GraphicCollector::GraphicEntity >& rGraphicEntit
...
@@ -93,7 +93,7 @@ void ImpAddEntity( std::vector< GraphicCollector::GraphicEntity >& rGraphicEntit
}
}
if
(
aIter
==
rGraphicEntities
.
end
()
)
if
(
aIter
==
rGraphicEntities
.
end
()
)
{
{
GraphicCollector
::
GraphicEntity
aEntity
(
r
xGraphic
,
r
User
);
GraphicCollector
::
GraphicEntity
aEntity
(
rUser
);
rGraphicEntities
.
push_back
(
aEntity
);
rGraphicEntities
.
push_back
(
aEntity
);
}
}
}
}
...
@@ -133,7 +133,7 @@ void ImpAddGraphicEntity( const Reference< XComponentContext >& rxMSF, Reference
...
@@ -133,7 +133,7 @@ void ImpAddGraphicEntity( const Reference< XComponentContext >& rxMSF, Reference
}
}
aUser
.
maGraphicCropLogic
=
aGraphicCropLogic
;
aUser
.
maGraphicCropLogic
=
aGraphicCropLogic
;
aUser
.
maLogicalSize
=
aLogicalSize
;
aUser
.
maLogicalSize
=
aLogicalSize
;
ImpAddEntity
(
rGraphicEntities
,
xGraphic
,
rGraphicSettings
,
aUser
);
ImpAddEntity
(
rGraphicEntities
,
rGraphicSettings
,
aUser
);
}
}
}
}
...
@@ -198,7 +198,7 @@ void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const
...
@@ -198,7 +198,7 @@ void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const
aUser
.
mbFillBitmap
=
sal_True
;
aUser
.
mbFillBitmap
=
sal_True
;
aUser
.
maLogicalSize
=
aLogicalSize
;
aUser
.
maLogicalSize
=
aLogicalSize
;
aUser
.
mxPagePropertySet
=
rxPagePropertySet
;
aUser
.
mxPagePropertySet
=
rxPagePropertySet
;
ImpAddEntity
(
rGraphicEntities
,
xGraphic
,
rGraphicSettings
,
aUser
);
ImpAddEntity
(
rGraphicEntities
,
rGraphicSettings
,
aUser
);
}
}
}
}
}
}
...
...
sdext/source/minimizer/graphiccollector.hxx
Dosyayı görüntüle @
6f83e628
...
@@ -76,14 +76,13 @@ class GraphicCollector
...
@@ -76,14 +76,13 @@ class GraphicCollector
struct
GraphicEntity
struct
GraphicEntity
{
{
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
graphic
::
XGraphic
>
mxGraphic
;
// the corresponding XGraphic of the Shape
com
::
sun
::
star
::
awt
::
Size
maLogicalSize
;
// the biggest logical size the graphic will be displayed
com
::
sun
::
star
::
awt
::
Size
maLogicalSize
;
// the biggest logical size the graphic will be displayed
sal_Bool
mbRemoveCropArea
;
//
sal_Bool
mbRemoveCropArea
;
//
com
::
sun
::
star
::
text
::
GraphicCrop
maGraphicCropLogic
;
com
::
sun
::
star
::
text
::
GraphicCrop
maGraphicCropLogic
;
std
::
vector
<
GraphicUser
>
maUser
;
std
::
vector
<
GraphicUser
>
maUser
;
GraphicEntity
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
graphic
::
XGraphic
>&
xGraphic
,
const
GraphicUser
&
rUser
)
GraphicEntity
(
const
GraphicUser
&
rUser
)
:
m
xGraphic
(
xGraphic
),
m
aLogicalSize
(
rUser
.
maLogicalSize
),
mbRemoveCropArea
(
sal_False
),
maGraphicCropLogic
(
0
,
0
,
0
,
0
)
{
maUser
.
push_back
(
rUser
);
};
:
maLogicalSize
(
rUser
.
maLogicalSize
),
mbRemoveCropArea
(
sal_False
),
maGraphicCropLogic
(
0
,
0
,
0
,
0
)
{
maUser
.
push_back
(
rUser
);
};
};
};
static
const
com
::
sun
::
star
::
awt
::
DeviceInfo
&
GetDeviceInfo
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>&
rxFact
);
static
const
com
::
sun
::
star
::
awt
::
DeviceInfo
&
GetDeviceInfo
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>&
rxFact
);
...
...
sdext/source/minimizer/impoptimizer.cxx
Dosyayı görüntüle @
6f83e628
...
@@ -409,12 +409,28 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
...
@@ -409,12 +409,28 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
rOptimizer
.
SetStatusValue
(
TK_Progress
,
Any
(
static_cast
<
sal_Int32
>
(
nProgress
)
)
);
rOptimizer
.
SetStatusValue
(
TK_Progress
,
Any
(
static_cast
<
sal_Int32
>
(
nProgress
)
)
);
rOptimizer
.
DispatchStatus
();
rOptimizer
.
DispatchStatus
();
if
(
aGraphicIter
->
maUser
.
size
()
)
{
GraphicSettings
aGraphicSettings
(
rGraphicSettings
);
GraphicSettings
aGraphicSettings
(
rGraphicSettings
);
aGraphicSettings
.
mbRemoveCropArea
=
aGraphicIter
->
mbRemoveCropArea
;
aGraphicSettings
.
mbRemoveCropArea
=
aGraphicIter
->
mbRemoveCropArea
;
Reference
<
XPropertySet
>
xNewGraphicPropertySet
(
aGraphicIter
->
mxGraphic
,
UNO_QUERY_THROW
);
Reference
<
XGraphic
>
xGraphic
;
awt
::
Size
aSize100thMM
(
GraphicCollector
::
GetOriginalSize
(
rxMSF
,
aGraphicIter
->
mxGraphic
)
);
if
(
aGraphicIter
->
maUser
[
0
].
mbFillBitmap
&&
aGraphicIter
->
maUser
[
0
].
mxPropertySet
.
is
()
)
Reference
<
XGraphic
>
xNewGraphic
(
ImpCompressGraphic
(
rxMSF
,
aGraphicIter
->
mxGraphic
,
aGraphicIter
->
maLogicalSize
,
aGraphicIter
->
maGraphicCropLogic
,
aGraphicSettings
)
);
{
Reference
<
XBitmap
>
xFillBitmap
;
if
(
aGraphicIter
->
maUser
[
0
].
mxPropertySet
->
getPropertyValue
(
TKGet
(
TK_FillBitmap
)
)
>>=
xFillBitmap
)
xGraphic
=
Reference
<
XGraphic
>
(
xFillBitmap
,
UNO_QUERY_THROW
);
}
else
if
(
aGraphicIter
->
maUser
[
0
].
mxShape
.
is
()
)
{
Reference
<
XPropertySet
>
xShapePropertySet
(
aGraphicIter
->
maUser
[
0
].
mxShape
,
UNO_QUERY_THROW
);
xShapePropertySet
->
getPropertyValue
(
TKGet
(
TK_Graphic
)
)
>>=
xGraphic
;
}
if
(
xGraphic
.
is
()
)
{
Reference
<
XPropertySet
>
xNewGraphicPropertySet
(
xGraphic
,
UNO_QUERY_THROW
);
awt
::
Size
aSize100thMM
(
GraphicCollector
::
GetOriginalSize
(
rxMSF
,
xGraphic
)
);
Reference
<
XGraphic
>
xNewGraphic
(
ImpCompressGraphic
(
rxMSF
,
xGraphic
,
aGraphicIter
->
maLogicalSize
,
aGraphicIter
->
maGraphicCropLogic
,
aGraphicSettings
)
);
if
(
xNewGraphic
.
is
()
)
if
(
xNewGraphic
.
is
()
)
{
{
// applying graphic to each user
// applying graphic to each user
...
@@ -471,6 +487,8 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
...
@@ -471,6 +487,8 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
aGraphicUserIter
++
;
aGraphicUserIter
++
;
}
}
}
}
}
}
aGraphicIter
++
;
aGraphicIter
++
;
}
}
}
}
...
...
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