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
48ad2f61
Kaydet (Commit)
48ad2f61
authored
May 06, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, Convert some code to getProcessComponentContext
Change-Id: Ic59060818bf02a402610613a6bc97c5969a5c461
üst
9a0846b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
38 deletions
+34
-38
field2.cxx
vcl/source/control/field2.cxx
+1
-1
FilterConfigItem.cxx
vcl/source/filter/FilterConfigItem.cxx
+0
-1
graphicfilter.cxx
vcl/source/filter/graphicfilter.cxx
+33
-36
No files found.
vcl/source/control/field2.cxx
Dosyayı görüntüle @
48ad2f61
...
@@ -1568,7 +1568,7 @@ CalendarWrapper& DateFormatter::GetCalendarWrapper() const
...
@@ -1568,7 +1568,7 @@ CalendarWrapper& DateFormatter::GetCalendarWrapper() const
{
{
if
(
!
mpCalendarWrapper
)
if
(
!
mpCalendarWrapper
)
{
{
((
DateFormatter
*
)
this
)
->
mpCalendarWrapper
=
new
CalendarWrapper
(
comphelper
::
get
ComponentContext
(
comphelper
::
getProcessServiceFactory
()
)
);
((
DateFormatter
*
)
this
)
->
mpCalendarWrapper
=
new
CalendarWrapper
(
comphelper
::
get
ProcessComponentContext
(
)
);
mpCalendarWrapper
->
loadDefaultCalendar
(
GetLocale
()
);
mpCalendarWrapper
->
loadDefaultCalendar
(
GetLocale
()
);
}
}
...
...
vcl/source/filter/FilterConfigItem.cxx
Dosyayı görüntüle @
48ad2f61
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
using
namespace
::
utl
;
// getProcessServiceFactory
using
namespace
::
com
::
sun
::
star
::
lang
;
// XMultiServiceFactory
using
namespace
::
com
::
sun
::
star
::
lang
;
// XMultiServiceFactory
using
namespace
::
com
::
sun
::
star
::
beans
;
// PropertyValue
using
namespace
::
com
::
sun
::
star
::
beans
;
// PropertyValue
using
namespace
::
com
::
sun
::
star
::
uno
;
// Reference
using
namespace
::
com
::
sun
::
star
::
uno
;
// Reference
...
...
vcl/source/filter/graphicfilter.cxx
Dosyayı görüntüle @
48ad2f61
...
@@ -84,17 +84,17 @@ static ::osl::Mutex& getListMutex()
...
@@ -84,17 +84,17 @@ static ::osl::Mutex& getListMutex()
return
s_aListProtection
;
return
s_aListProtection
;
}
}
class
ImpFilterOutputStream
:
public
::
cppu
::
WeakImplHelper1
<
::
com
::
sun
::
star
::
io
::
XOutputStream
>
class
ImpFilterOutputStream
:
public
::
cppu
::
WeakImplHelper1
<
css
::
io
::
XOutputStream
>
{
{
protected
:
protected
:
SvStream
&
mrStm
;
SvStream
&
mrStm
;
virtual
void
SAL_CALL
writeBytes
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>&
rData
)
virtual
void
SAL_CALL
writeBytes
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
rData
)
throw
(
::
com
::
sun
::
star
::
io
::
NotConnectedException
,
::
com
::
sun
::
star
::
io
::
BufferSizeExceededException
,
::
com
::
sun
::
star
::
io
::
IOException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
io
::
IOException
,
css
::
uno
::
RuntimeException
)
{
mrStm
.
Write
(
rData
.
getConstArray
(),
rData
.
getLength
()
);
}
{
mrStm
.
Write
(
rData
.
getConstArray
(),
rData
.
getLength
()
);
}
virtual
void
SAL_CALL
flush
()
virtual
void
SAL_CALL
flush
()
throw
(
::
com
::
sun
::
star
::
io
::
NotConnectedException
,
::
com
::
sun
::
star
::
io
::
BufferSizeExceededException
,
::
com
::
sun
::
star
::
io
::
IOException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
throw
(
css
::
io
::
NotConnectedException
,
css
::
io
::
BufferSizeExceededException
,
css
::
io
::
IOException
,
css
::
uno
::
RuntimeException
)
{
mrStm
.
Flush
();
}
{
mrStm
.
Flush
();
}
virtual
void
SAL_CALL
closeOutput
()
throw
()
{}
virtual
void
SAL_CALL
closeOutput
()
throw
()
{}
...
@@ -113,16 +113,16 @@ static sal_Bool DirEntryExists( const INetURLObject& rObj )
...
@@ -113,16 +113,16 @@ static sal_Bool DirEntryExists( const INetURLObject& rObj )
try
try
{
{
::
ucbhelper
::
Content
aCnt
(
rObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
::
ucbhelper
::
Content
aCnt
(
rObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>
(),
css
::
uno
::
Reference
<
css
::
ucb
::
XCommandEnvironment
>
(),
comphelper
::
getProcessComponentContext
()
);
comphelper
::
getProcessComponentContext
()
);
bExists
=
aCnt
.
isDocument
();
bExists
=
aCnt
.
isDocument
();
}
}
catch
(
const
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
&
)
catch
(
const
css
::
ucb
::
CommandAbortedException
&
)
{
{
SAL_WARN
(
"svtools.filter"
,
"CommandAbortedException"
);
SAL_WARN
(
"svtools.filter"
,
"CommandAbortedException"
);
}
}
catch
(
const
::
com
::
sun
::
star
::
ucb
::
ContentCreationException
&
)
catch
(
const
css
::
ucb
::
ContentCreationException
&
)
{
{
SAL_WARN
(
"svtools.filter"
,
"ContentCreationException"
);
SAL_WARN
(
"svtools.filter"
,
"ContentCreationException"
);
}
}
...
@@ -138,13 +138,13 @@ static void KillDirEntry( const String& rMainUrl )
...
@@ -138,13 +138,13 @@ static void KillDirEntry( const String& rMainUrl )
try
try
{
{
::
ucbhelper
::
Content
aCnt
(
rMainUrl
,
::
ucbhelper
::
Content
aCnt
(
rMainUrl
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>
(),
css
::
uno
::
Reference
<
css
::
ucb
::
XCommandEnvironment
>
(),
comphelper
::
getProcessComponentContext
()
);
comphelper
::
getProcessComponentContext
()
);
aCnt
.
executeCommand
(
"delete"
,
aCnt
.
executeCommand
(
"delete"
,
::
com
::
sun
::
star
::
uno
::
makeAny
(
sal_Bool
(
sal_True
)
)
);
css
::
uno
::
makeAny
(
sal_Bool
(
sal_True
)
)
);
}
}
catch
(
const
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
&
)
catch
(
const
css
::
ucb
::
CommandAbortedException
&
)
{
{
SAL_WARN
(
"svtools.filter"
,
"CommandAbortedException"
);
SAL_WARN
(
"svtools.filter"
,
"CommandAbortedException"
);
}
}
...
@@ -892,7 +892,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
...
@@ -892,7 +892,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
if
(
(
nMode
==
1
)
||
(
nMode
==
2
)
)
if
(
(
nMode
==
1
)
||
(
nMode
==
2
)
)
{
{
GDIMetaFile
aMtf
(
rGraphic
.
GetGDIMetaFile
()
);
GDIMetaFile
aMtf
(
rGraphic
.
GetGDIMetaFile
()
);
::
com
::
sun
::
star
::
awt
::
Size
aDefaultSize
(
10000
,
10000
);
css
::
awt
::
Size
aDefaultSize
(
10000
,
10000
);
Size
aNewSize
(
OutputDevice
::
LogicToLogic
(
Size
(
nLogicalWidth
,
nLogicalHeight
),
MAP_100TH_MM
,
aMtf
.
GetPrefMapMode
()
)
);
Size
aNewSize
(
OutputDevice
::
LogicToLogic
(
Size
(
nLogicalWidth
,
nLogicalHeight
),
MAP_100TH_MM
,
aMtf
.
GetPrefMapMode
()
)
);
if
(
aNewSize
.
Width
()
&&
aNewSize
.
Height
()
)
if
(
aNewSize
.
Width
()
&&
aNewSize
.
Height
()
)
...
@@ -2007,41 +2007,38 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
...
@@ -2007,41 +2007,38 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
// do the normal GDIMetaFile export instead
// do the normal GDIMetaFile export instead
try
try
{
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xMgr
(
::
comphelper
::
getProcessServiceFactory
()
);
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
xContext
(
::
comphelper
::
getProcessComponentContext
()
);
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
xContext
(
::
comphelper
::
getProcessComponentContext
()
);
if
(
xMgr
.
is
()
)
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XDocumentHandler
>
xSaxWriter
(
{
xml
::
sax
::
Writer
::
create
(
xContext
),
uno
::
UNO_QUERY_THROW
);
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
xml
::
sax
::
XDocumentHandler
>
xSaxWriter
(
xml
::
sax
::
Writer
::
create
(
xContext
),
uno
::
UNO_QUERY_THROW
);
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
svg
::
XSVGWriter
>
xSVGWriter
(
xMgr
->
createInstance
(
css
::
uno
::
Reference
<
css
::
svg
::
XSVGWriter
>
xSVGWriter
(
OUString
(
"com.sun.star.svg.SVGWriter"
)
),
::
com
::
sun
::
star
::
uno
::
UNO_QUERY
);
xContext
->
getServiceManager
()
->
createInstanceWithContext
(
"com.sun.star.svg.SVGWriter"
,
xContext
),
css
::
uno
::
UNO_QUERY
);
if
(
xSaxWriter
.
is
()
&&
xSVGWriter
.
is
()
)
if
(
xSaxWriter
.
is
()
&&
xSVGWriter
.
is
()
)
{
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XActiveDataSource
>
xActiveDataSource
(
css
::
uno
::
Reference
<
css
::
io
::
XActiveDataSource
>
xActiveDataSource
(
xSaxWriter
,
::
com
::
sun
::
star
::
uno
::
UNO_QUERY
);
xSaxWriter
,
css
::
uno
::
UNO_QUERY
);
if
(
xActiveDataSource
.
is
()
)
if
(
xActiveDataSource
.
is
()
)
{
{
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
xStmIf
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
xStmIf
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
new
ImpFilterOutputStream
(
rOStm
)
)
);
static_cast
<
::
cppu
::
OWeakObject
*
>
(
new
ImpFilterOutputStream
(
rOStm
)
)
);
SvMemoryStream
aMemStm
(
65535
,
65535
);
SvMemoryStream
aMemStm
(
65535
,
65535
);
// #i119735# just use GetGDIMetaFile, it will create a buffer
d version of contained bitmap now automatically
// #i119735# just use GetGDIMetaFile, it will create a buffere
d version of contained bitmap now automatically
(
(
GDIMetaFile
&
)
aGraphic
.
GetGDIMetaFile
()
).
Write
(
aMemStm
);
(
(
GDIMetaFile
&
)
aGraphic
.
GetGDIMetaFile
()
).
Write
(
aMemStm
);
xActiveDataSource
->
setOutputStream
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XOutputStream
>
(
xActiveDataSource
->
setOutputStream
(
css
::
uno
::
Reference
<
css
::
io
::
XOutputStream
>
(
xStmIf
,
::
com
::
sun
::
star
::
uno
::
UNO_QUERY
)
);
xStmIf
,
css
::
uno
::
UNO_QUERY
)
);
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
aMtfSeq
(
(
sal_Int8
*
)
aMemStm
.
GetData
(),
aMemStm
.
Tell
()
);
css
::
uno
::
Sequence
<
sal_Int8
>
aMtfSeq
(
(
sal_Int8
*
)
aMemStm
.
GetData
(),
aMemStm
.
Tell
()
);
xSVGWriter
->
write
(
xSaxWriter
,
aMtfSeq
);
xSVGWriter
->
write
(
xSaxWriter
,
aMtfSeq
);
}
}
}
}
}
}
}
catch
(
const
::
com
::
sun
::
star
::
uno
::
Exception
&
)
catch
(
const
css
::
uno
::
Exception
&
)
{
{
nStatus
=
GRFILTER_IOERROR
;
nStatus
=
GRFILTER_IOERROR
;
}
}
...
...
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