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
91a418d2
Kaydet (Commit)
91a418d2
authored
Agu 21, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ByteString->rtl::OString
üst
dbfa0518
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
98 deletions
+103
-98
tcommuni.cxx
automation/source/testtool/tcommuni.cxx
+8
-9
dialogs.cxx
basic/source/app/dialogs.cxx
+8
-10
sanedlg.cxx
extensions/source/scanner/sanedlg.cxx
+29
-23
adddlg.cxx
padmin/source/adddlg.cxx
+43
-41
pptin.cxx
sd/source/filter/ppt/pptin.cxx
+4
-4
mieclip.cxx
sfx2/source/bastyp/mieclip.cxx
+11
-11
No files found.
automation/source/testtool/tcommuni.cxx
Dosyayı görüntüle @
91a418d2
...
@@ -117,13 +117,12 @@ sal_Bool CommunicationManagerClientViaSocketTT::KillApplication()
...
@@ -117,13 +117,12 @@ sal_Bool CommunicationManagerClientViaSocketTT::KillApplication()
#define GETSET(aVar, KeyName, Dafault) \
#define GETSET(aVar, KeyName, Dafault) \
aVar = aConf.ReadKey(KeyName,"No Entry"); \
aVar = aConf.ReadKey(KeyName,"No Entry"); \
if (
aVar.CompareTo("No Entry") == COMPARE_EQUAL
) \
if (
aVar.equalsL(RTL_CONSTASCII_STRINGPARAM("No Entry"))
) \
{ \
{ \
aVar =
ByteString(Dafault);
\
aVar =
Dafault;
\
aConf.WriteKey(KeyName, aVar); \
aConf.WriteKey(KeyName, aVar); \
}
}
String
GetHostConfig
()
String
GetHostConfig
()
{
{
String
aHostToTalk
;
String
aHostToTalk
;
...
@@ -138,12 +137,12 @@ String GetHostConfig()
...
@@ -138,12 +137,12 @@ String GetHostConfig()
return
Application
::
GetCommandLineParam
(
i
).
Copy
(
6
);
return
Application
::
GetCommandLineParam
(
i
).
Copy
(
6
);
}
}
Byte
String
abHostToTalk
;
rtl
::
O
String
abHostToTalk
;
Config
aConf
(
Config
::
GetConfigName
(
Config
::
GetDefDirectory
(),
CUniString
(
"testtool"
)
));
Config
aConf
(
Config
::
GetConfigName
(
Config
::
GetDefDirectory
(),
CUniString
(
"testtool"
)
));
aConf
.
SetGroup
(
"Communication"
);
aConf
.
SetGroup
(
"Communication"
);
GETSET
(
abHostToTalk
,
"Host"
,
DEFAULT_HOST
);
GETSET
(
abHostToTalk
,
"Host"
,
DEFAULT_HOST
);
return
UniString
(
abHostToTalk
,
RTL_TEXTENCODING_UTF8
);
return
rtl
::
OStringToOUString
(
abHostToTalk
,
RTL_TEXTENCODING_UTF8
);
}
}
...
@@ -164,13 +163,13 @@ sal_uLong GetTTPortConfig()
...
@@ -164,13 +163,13 @@ sal_uLong GetTTPortConfig()
}
}
}
}
Byte
String
abPortToTalk
;
rtl
::
O
String
abPortToTalk
;
Config
aConf
(
Config
::
GetConfigName
(
Config
::
GetDefDirectory
(),
CUniString
(
"testtool"
)
));
Config
aConf
(
Config
::
GetConfigName
(
Config
::
GetDefDirectory
(),
CUniString
(
"testtool"
)
));
aConf
.
SetGroup
(
"Communication"
);
aConf
.
SetGroup
(
"Communication"
);
GETSET
(
abPortToTalk
,
"TTPort"
,
GETSET
(
abPortToTalk
,
"TTPort"
,
rtl
::
OString
::
valueOf
(
static_cast
<
sal_Int32
>
(
TESTTOOL_DEFAULT_PORT
))
);
rtl
::
OString
::
valueOf
(
static_cast
<
sal_Int32
>
(
TESTTOOL_DEFAULT_PORT
))
);
return
(
sal_uLong
)
abPortToTalk
.
T
oInt32
();
return
(
sal_uLong
)
abPortToTalk
.
t
oInt32
();
}
}
...
@@ -191,13 +190,13 @@ sal_uLong GetUnoPortConfig()
...
@@ -191,13 +190,13 @@ sal_uLong GetUnoPortConfig()
}
}
}
}
Byte
String
abPortToTalk
;
rtl
::
O
String
abPortToTalk
;
Config
aConf
(
Config
::
GetConfigName
(
Config
::
GetDefDirectory
(),
CUniString
(
"testtool"
)
));
Config
aConf
(
Config
::
GetConfigName
(
Config
::
GetDefDirectory
(),
CUniString
(
"testtool"
)
));
aConf
.
SetGroup
(
"Communication"
);
aConf
.
SetGroup
(
"Communication"
);
GETSET
(
abPortToTalk
,
"UnoPort"
,
GETSET
(
abPortToTalk
,
"UnoPort"
,
rtl
::
OString
::
valueOf
(
static_cast
<
sal_Int32
>
(
UNO_DEFAULT_PORT
))
);
rtl
::
OString
::
valueOf
(
static_cast
<
sal_Int32
>
(
UNO_DEFAULT_PORT
))
);
return
(
sal_uLong
)
abPortToTalk
.
T
oInt32
();
return
(
sal_uLong
)
abPortToTalk
.
t
oInt32
();
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
basic/source/app/dialogs.cxx
Dosyayı görüntüle @
91a418d2
...
@@ -515,12 +515,10 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig )
...
@@ -515,12 +515,10 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig )
aNFCRPort
.
SetUseThousandSep
(
sal_False
);
aNFCRPort
.
SetUseThousandSep
(
sal_False
);
ByteString
aTemp
;
aConfig
.
SetGroup
(
"Crashreporter"
);
aConfig
.
SetGroup
(
"Crashreporter"
);
aTemp
=
aConfig
.
ReadKey
(
"UseProxy"
,
"false"
);
rtl
::
OString
aTemp
=
aConfig
.
ReadKey
(
"UseProxy"
,
"false"
);
if
(
aTemp
.
EqualsIgnoreCaseAscii
(
"true"
)
||
aTemp
.
Equals
(
"1"
)
)
if
(
aTemp
.
equalsIgnoreAsciiCase
(
"true"
)
||
aTemp
.
equals
(
"1"
)
)
aCBUseProxy
.
Check
();
aCBUseProxy
.
Check
();
else
else
aCBUseProxy
.
Check
(
sal_False
);
aCBUseProxy
.
Check
(
sal_False
);
...
@@ -529,13 +527,13 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig )
...
@@ -529,13 +527,13 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig )
LINK
(
this
,
CrashreportOptions
,
CheckProxy
).
Call
(
NULL
);
// call once to initialize
LINK
(
this
,
CrashreportOptions
,
CheckProxy
).
Call
(
NULL
);
// call once to initialize
aTemp
=
aConfig
.
ReadKey
(
"ProxyServer"
);
aTemp
=
aConfig
.
ReadKey
(
"ProxyServer"
);
aEDCRHost
.
SetText
(
String
(
aTemp
,
RTL_TEXTENCODING_UTF8
)
);
aEDCRHost
.
SetText
(
rtl
::
OStringToOUString
(
aTemp
,
RTL_TEXTENCODING_UTF8
)
);
aTemp
=
aConfig
.
ReadKey
(
"ProxyPort"
,
"8080"
);
aTemp
=
aConfig
.
ReadKey
(
"ProxyPort"
,
"8080"
);
aNFCRPort
.
SetValue
(
aTemp
.
ToInt32
()
);
aNFCRPort
.
SetValue
(
aTemp
.
toInt32
()
);
aTemp
=
aConfig
.
ReadKey
(
"AllowContact"
,
"false"
);
aTemp
=
aConfig
.
ReadKey
(
"AllowContact"
,
"false"
);
if
(
aTemp
.
EqualsIgnoreCaseAscii
(
"true"
)
||
aTemp
.
Equals
(
"1"
)
)
if
(
aTemp
.
equalsIgnoreAsciiCase
(
"true"
)
||
aTemp
.
equals
(
"1"
)
)
aCBAllowContact
.
Check
();
aCBAllowContact
.
Check
();
else
else
aCBAllowContact
.
Check
(
sal_False
);
aCBAllowContact
.
Check
(
sal_False
);
...
@@ -544,7 +542,7 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig )
...
@@ -544,7 +542,7 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig )
LINK
(
this
,
CrashreportOptions
,
CheckResponse
).
Call
(
NULL
);
// call once to initialize
LINK
(
this
,
CrashreportOptions
,
CheckResponse
).
Call
(
NULL
);
// call once to initialize
aTemp
=
aConfig
.
ReadKey
(
"ReturnAddress"
);
aTemp
=
aConfig
.
ReadKey
(
"ReturnAddress"
);
aEDEMail
.
SetText
(
String
(
aTemp
,
RTL_TEXTENCODING_UTF8
)
);
aEDEMail
.
SetText
(
rtl
::
OStringToOUString
(
aTemp
,
RTL_TEXTENCODING_UTF8
)
);
}
}
...
@@ -659,8 +657,8 @@ void MiscOptions::Save( Config &aConfig )
...
@@ -659,8 +657,8 @@ void MiscOptions::Save( Config &aConfig )
rtl
::
OString
::
valueOf
(
static_cast
<
sal_Int32
>
(
aServerTimeout
.
GetTime
().
GetTime
())));
rtl
::
OString
::
valueOf
(
static_cast
<
sal_Int32
>
(
aServerTimeout
.
GetTime
().
GetTime
())));
aConfig
.
SetGroup
(
"LRU"
);
aConfig
.
SetGroup
(
"LRU"
);
Byte
String
aTemp
=
aConfig
.
ReadKey
(
"MaxLRU"
,
"4"
);
rtl
::
O
String
aTemp
=
aConfig
.
ReadKey
(
"MaxLRU"
,
"4"
);
sal_uInt16
nOldMaxLRU
=
(
sal_uInt16
)
aTemp
.
T
oInt32
();
sal_uInt16
nOldMaxLRU
=
(
sal_uInt16
)
aTemp
.
t
oInt32
();
sal_uInt16
n
;
sal_uInt16
n
;
for
(
n
=
nOldMaxLRU
;
n
>
aTFMaxLRU
.
GetValue
()
;
n
--
)
for
(
n
=
nOldMaxLRU
;
n
>
aTFMaxLRU
.
GetValue
()
;
n
--
)
{
{
...
...
extensions/source/scanner/sanedlg.cxx
Dosyayı görüntüle @
91a418d2
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include <math.h>
#include <math.h>
#include <sal/macros.h>
#include <sal/macros.h>
#include <rtl/strbuf.hxx>
#include <rtl/strbuf.hxx>
#include <comphelper/string.hxx>
ResId
SaneResId
(
sal_uInt32
nID
)
ResId
SaneResId
(
sal_uInt32
nID
)
{
{
...
@@ -1196,36 +1197,41 @@ sal_Bool SaneDlg::LoadState()
...
@@ -1196,36 +1197,41 @@ sal_Bool SaneDlg::LoadState()
if
(
mrSane
.
IsOpen
()
)
if
(
mrSane
.
IsOpen
()
)
{
{
int
iMax
=
aConfig
.
GetKeyCount
();
int
iMax
=
aConfig
.
GetKeyCount
();
for
(
i
=
0
;
i
<
iMax
;
i
++
)
for
(
i
=
0
;
i
<
iMax
;
++
i
)
{
{
aString
=
aConfig
.
GetKeyName
(
i
);
aString
=
aConfig
.
GetKeyName
(
i
);
Byte
String
aValue
=
aConfig
.
ReadKey
(
i
);
rtl
::
O
String
aValue
=
aConfig
.
ReadKey
(
i
);
int
nOption
=
mrSane
.
GetOptionByName
(
aString
.
GetBuffer
()
);
int
nOption
=
mrSane
.
GetOptionByName
(
aString
.
GetBuffer
()
);
if
(
nOption
!=
-
1
)
if
(
nOption
==
-
1
)
continue
;
using
comphelper
::
string
::
matchL
;
if
(
matchL
(
aValue
,
RTL_CONSTASCII_USTRINGPARAM
(
"BOOL="
)))
{
{
if
(
aValue
.
CompareTo
(
"BOOL="
,
5
)
==
COMPARE_EQUAL
)
aValue
=
aValue
.
copy
(
RTL_CONSTASCII_LENGTH
(
"BOOL="
));
{
sal_Bool
aBOOL
=
(
sal_Bool
)
aValue
.
toInt32
();
aValue
.
Erase
(
0
,
5
);
mrSane
.
SetOptionValue
(
nOption
,
aBOOL
);
sal_Bool
aBOOL
=
(
sal_Bool
)
aValue
.
ToInt32
();
}
mrSane
.
SetOptionValue
(
nOption
,
aBOOL
);
else
if
(
matchL
(
aValue
,
RTL_CONSTASCII_USTRINGPARAM
(
"STRING="
)))
}
{
else
if
(
aValue
.
CompareTo
(
"STRING="
,
7
)
==
COMPARE_EQUAL
)
aValue
=
aValue
.
copy
(
RTL_CONSTASCII_LENGTH
(
"STRING="
));
{
mrSane
.
SetOptionValue
(
nOption
,
rtl
::
OStringToOUString
(
aValue
,
osl_getThreadTextEncoding
())
);
aValue
.
Erase
(
0
,
7
);
}
mrSane
.
SetOptionValue
(
nOption
,
String
(
aValue
,
osl_getThreadTextEncoding
()
)
);
else
if
(
matchL
(
aValue
,
RTL_CONSTASCII_USTRINGPARAM
(
"NUMERIC="
)))
}
{
else
if
(
aValue
.
CompareTo
(
"NUMERIC="
,
8
)
==
COMPARE_EQUAL
)
aValue
=
aValue
.
copy
(
RTL_CONSTASCII_LENGTH
(
"NUMERIC="
));
sal_Int32
nIndex
=
0
;
int
n
=
0
;
do
{
{
aValue
.
Erase
(
0
,
8
);
rtl
::
OString
aSub
=
aValue
.
getToken
(
0
,
':'
,
nIndex
);
int
nMax
=
aValue
.
GetTokenCount
(
':'
);
double
fValue
=
0.0
;
double
fValue
=
0.0
;
for
(
int
n
=
0
;
n
<
nMax
;
n
++
)
sscanf
(
aSub
.
getStr
(),
"%lg"
,
&
fValue
);
{
SetAdjustedNumericalValue
(
aString
.
GetBuffer
(),
fValue
,
n
++
);
ByteString
aSub
=
aValue
.
GetToken
(
n
,
':'
);
sscanf
(
aSub
.
GetBuffer
(),
"%lg"
,
&
fValue
);
SetAdjustedNumericalValue
(
aString
.
GetBuffer
(),
fValue
,
n
);
}
}
}
while
(
nIndex
>=
0
);
}
}
}
}
}
}
...
...
padmin/source/adddlg.cxx
Dosyayı görüntüle @
91a418d2
...
@@ -36,11 +36,11 @@
...
@@ -36,11 +36,11 @@
#include "vcl/msgbox.hxx"
#include "vcl/msgbox.hxx"
#include "vcl/strhelper.hxx"
#include "vcl/strhelper.hxx"
#include "osl/thread.h"
#include <osl/thread.h>
#include <rtl/strbuf.hxx>
#include <comphelper/string.hxx>
#include <boost/unordered_set.hpp>
#include <boost/unordered_set.hpp>
using
namespace
psp
;
using
namespace
psp
;
using
namespace
padmin
;
using
namespace
padmin
;
using
namespace
std
;
using
namespace
std
;
...
@@ -507,29 +507,31 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
...
@@ -507,29 +507,31 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
ByteString
aDefCopies
(
aConfig
.
ReadKey
(
"Copies"
)
);
ByteString
aDefCopies
(
aConfig
.
ReadKey
(
"Copies"
)
);
ByteString
aDefDPI
(
aConfig
.
ReadKey
(
"DPI"
)
);
ByteString
aDefDPI
(
aConfig
.
ReadKey
(
"DPI"
)
);
using
comphelper
::
string
::
getToken
;
aConfig
.
SetGroup
(
"devices"
);
aConfig
.
SetGroup
(
"devices"
);
int
nDevices
=
aConfig
.
GetKeyCount
();
int
nDevices
=
aConfig
.
GetKeyCount
();
for
(
int
nKey
=
0
;
nKey
<
nDevices
;
nKey
++
)
for
(
int
nKey
=
0
;
nKey
<
nDevices
;
nKey
++
)
{
{
aConfig
.
SetGroup
(
"devices"
);
aConfig
.
SetGroup
(
"devices"
);
ByteString
aPrinter
(
aConfig
.
GetKeyName
(
nKey
)
);
rtl
::
OString
aPrinter
(
aConfig
.
GetKeyName
(
nKey
)
);
ByteString
aValue
(
aConfig
.
ReadKey
(
aPrinter
)
);
rtl
::
OString
aValue
(
aConfig
.
ReadKey
(
aPrinter
)
);
ByteString
aPort
(
aValue
.
GetToken
(
1
,
','
)
);
rtl
::
OString
aPort
(
getToken
(
aValue
,
1
,
','
)
);
ByteString
aDriver
(
aValue
.
GetToken
(
0
,
' '
)
);
rtl
::
OString
aDriver
(
getToken
(
aValue
,
0
,
' '
)
);
ByteString
aPS
(
aValue
.
GetToken
(
0
,
','
).
GetToken
(
1
,
' '
)
);
rtl
::
OString
aPS
(
getToken
(
getToken
(
aValue
,
0
,
','
),
1
,
' '
)
);
ByteString
aNewDriver
(
aDriver
);
rtl
::
OString
aNewDriver
(
aDriver
);
if
(
aDriver
==
"GENERIC"
)
if
(
aDriver
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"GENERIC"
))
)
aNewDriver
=
"SGENPRT"
;
aNewDriver
=
rtl
::
OString
(
RTL_CONSTASCII_STRINGPARAM
(
"SGENPRT"
))
;
if
(
aPS
!=
"PostScript"
)
if
(
aPS
!=
"PostScript"
)
continue
;
continue
;
const
PPDParser
*
pParser
=
PPDParser
::
getParser
(
String
(
aNewDriver
,
aEncoding
)
);
const
PPDParser
*
pParser
=
PPDParser
::
getParser
(
rtl
::
OStringToOUString
(
aNewDriver
,
aEncoding
)
);
if
(
pParser
==
NULL
)
if
(
pParser
==
NULL
)
{
{
String
aText
(
PaResId
(
RID_TXT_DRIVERDOESNOTEXIST
)
);
String
aText
(
PaResId
(
RID_TXT_DRIVERDOESNOTEXIST
)
);
aText
.
SearchAndReplace
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"%s1"
)
),
String
(
aPrinter
,
aEncoding
)
);
aText
.
SearchAndReplace
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"%s1"
)
),
rtl
::
OStringToOUString
(
aPrinter
,
aEncoding
)
);
aText
.
SearchAndReplace
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"%s2"
)
),
String
(
aDriver
,
aEncoding
)
);
aText
.
SearchAndReplace
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"%s2"
)
),
rtl
::
OStringToOUString
(
aDriver
,
aEncoding
)
);
InfoBox
aBox
(
this
,
aText
);
InfoBox
aBox
(
this
,
aText
);
aBox
.
Execute
();
aBox
.
Execute
();
continue
;
continue
;
...
@@ -541,66 +543,66 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
...
@@ -541,66 +543,66 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
if
(
!
aCommand
.
Len
()
)
if
(
!
aCommand
.
Len
()
)
{
{
String
aText
(
PaResId
(
RID_TXT_PRINTERWITHOUTCOMMAND
)
);
String
aText
(
PaResId
(
RID_TXT_PRINTERWITHOUTCOMMAND
)
);
aText
.
SearchAndReplace
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"%s"
)
),
String
(
aPrinter
,
aEncoding
)
);
aText
.
SearchAndReplace
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"%s"
)
),
rtl
::
OStringToOUString
(
aPrinter
,
aEncoding
)
);
InfoBox
aBox
(
this
,
aText
);
InfoBox
aBox
(
this
,
aText
);
aBox
.
Execute
();
aBox
.
Execute
();
continue
;
continue
;
}
}
String
aUPrinter
(
AddPrinterDialog
::
uniquePrinterName
(
String
(
aPrinter
,
aEncoding
)
)
);
String
aUPrinter
(
AddPrinterDialog
::
uniquePrinterName
(
rtl
::
OStringToOUString
(
aPrinter
,
aEncoding
)
)
);
PrinterInfo
aInfo
;
PrinterInfo
aInfo
;
aInfo
.
m_aDriverName
=
String
(
aNewDriver
,
aEncoding
);
aInfo
.
m_aDriverName
=
rtl
::
OStringToOUString
(
aNewDriver
,
aEncoding
);
aInfo
.
m_pParser
=
pParser
;
aInfo
.
m_pParser
=
pParser
;
aInfo
.
m_aContext
.
setParser
(
pParser
);
aInfo
.
m_aContext
.
setParser
(
pParser
);
aInfo
.
m_aPrinterName
=
aUPrinter
;
aInfo
.
m_aPrinterName
=
aUPrinter
;
aInfo
.
m_aCommand
=
String
(
aCommand
,
aEncoding
);
aInfo
.
m_aCommand
=
rtl
::
OStringToOUString
(
aCommand
,
aEncoding
);
// read the printer settings
// read the printer settings
ByteString
aGroup
(
aDriver
);
rtl
::
OStringBuffer
aGroup
(
aDriver
);
aGroup
+=
",PostScript,"
;
aGroup
.
append
(
RTL_CONSTASCII_STRINGPARAM
(
",PostScript,"
))
;
aGroup
+=
aPort
;
aGroup
.
append
(
aPort
)
;
aConfig
.
SetGroup
(
aGroup
);
aConfig
.
SetGroup
(
aGroup
.
makeStringAndClear
()
);
aValue
=
aConfig
.
ReadKey
(
"PageSize"
,
aDefPageSize
);
aValue
=
aConfig
.
ReadKey
(
"PageSize"
,
aDefPageSize
);
int
nLeft
,
nRight
,
nTop
,
nBottom
;
int
nLeft
,
nRight
,
nTop
,
nBottom
;
if
(
aValue
.
Len
()
&&
if
(
aValue
.
getLength
()
&&
aInfo
.
m_pParser
->
getMargins
(
String
(
aValue
,
aEncoding
),
aInfo
.
m_pParser
->
getMargins
(
rtl
::
OStringToOUString
(
aValue
,
aEncoding
),
nLeft
,
nRight
,
nTop
,
nBottom
)
)
nLeft
,
nRight
,
nTop
,
nBottom
)
)
{
{
const
PPDKey
*
pKey
=
aInfo
.
m_pParser
->
getKey
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"PageSize"
)
)
);
const
PPDKey
*
pKey
=
aInfo
.
m_pParser
->
getKey
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"PageSize"
)
)
);
const
PPDValue
*
pValue
=
pKey
?
pKey
->
getValue
(
String
(
aValue
,
aEncoding
)
)
:
NULL
;
const
PPDValue
*
pValue
=
pKey
?
pKey
->
getValue
(
rtl
::
OStringToOUString
(
aValue
,
aEncoding
)
)
:
NULL
;
if
(
pKey
&&
pValue
)
if
(
pKey
&&
pValue
)
aInfo
.
m_aContext
.
setValue
(
pKey
,
pValue
);
aInfo
.
m_aContext
.
setValue
(
pKey
,
pValue
);
aValue
=
aConfig
.
ReadKey
(
"MarginLeft"
,
aDefMarginLeft
);
aValue
=
aConfig
.
ReadKey
(
"MarginLeft"
,
aDefMarginLeft
);
if
(
aValue
.
Len
()
)
if
(
!
aValue
.
isEmpty
()
)
aInfo
.
m_nLeftMarginAdjust
=
aValue
.
T
oInt32
()
-
(
int
)((
double
)
nLeft
*
35.27777778
);
aInfo
.
m_nLeftMarginAdjust
=
aValue
.
t
oInt32
()
-
(
int
)((
double
)
nLeft
*
35.27777778
);
aValue
=
aConfig
.
ReadKey
(
"MarginRight"
,
aDefMarginRight
);
aValue
=
aConfig
.
ReadKey
(
"MarginRight"
,
aDefMarginRight
);
if
(
aValue
.
Len
()
)
if
(
!
aValue
.
isEmpty
()
)
aInfo
.
m_nRightMarginAdjust
=
aValue
.
T
oInt32
()
-
(
int
)((
double
)
nRight
*
35.27777778
);
aInfo
.
m_nRightMarginAdjust
=
aValue
.
t
oInt32
()
-
(
int
)((
double
)
nRight
*
35.27777778
);
aValue
=
aConfig
.
ReadKey
(
"MarginTop"
,
aDefMarginTop
);
aValue
=
aConfig
.
ReadKey
(
"MarginTop"
,
aDefMarginTop
);
if
(
aValue
.
Len
()
)
if
(
!
aValue
.
isEmpty
()
)
aInfo
.
m_nTopMarginAdjust
=
aValue
.
T
oInt32
()
-
(
int
)((
double
)
nTop
*
35.27777778
);
aInfo
.
m_nTopMarginAdjust
=
aValue
.
t
oInt32
()
-
(
int
)((
double
)
nTop
*
35.27777778
);
aValue
=
aConfig
.
ReadKey
(
"MarginBottom"
,
aDefMarginBottom
);
aValue
=
aConfig
.
ReadKey
(
"MarginBottom"
,
aDefMarginBottom
);
if
(
aValue
.
Len
()
)
if
(
!
aValue
.
isEmpty
()
)
aInfo
.
m_nBottomMarginAdjust
=
aValue
.
T
oInt32
()
-
(
int
)((
double
)
nBottom
*
35.27777778
);
aInfo
.
m_nBottomMarginAdjust
=
aValue
.
t
oInt32
()
-
(
int
)((
double
)
nBottom
*
35.27777778
);
}
}
aValue
=
aConfig
.
ReadKey
(
"Copies"
,
aDefScale
);
aValue
=
aConfig
.
ReadKey
(
"Copies"
,
aDefScale
);
if
(
aValue
.
Len
()
)
if
(
!
aValue
.
isEmpty
()
)
aInfo
.
m_nCopies
=
aValue
.
T
oInt32
();
aInfo
.
m_nCopies
=
aValue
.
t
oInt32
();
aValue
=
aConfig
.
ReadKey
(
"Comment"
);
aValue
=
aConfig
.
ReadKey
(
"Comment"
);
aInfo
.
m_aComment
=
String
(
aValue
,
aEncoding
);
aInfo
.
m_aComment
=
rtl
::
OStringToOUString
(
aValue
,
aEncoding
);
aValue
=
aConfig
.
ReadKey
(
"Level"
);
aValue
=
aConfig
.
ReadKey
(
"Level"
);
if
(
aValue
.
Len
()
)
if
(
!
aValue
.
isEmpty
()
)
aInfo
.
m_nPSLevel
=
aValue
.
T
oInt32
();
aInfo
.
m_nPSLevel
=
aValue
.
t
oInt32
();
aValue
=
aConfig
.
ReadKey
(
"Orientation"
,
aDefOrientation
);
aValue
=
aConfig
.
ReadKey
(
"Orientation"
,
aDefOrientation
);
if
(
aValue
.
Len
()
)
if
(
!
aValue
.
isEmpty
()
)
aInfo
.
m_eOrientation
=
aValue
.
CompareIgnoreCaseToAscii
(
"landscape"
)
==
COMPARE_EQUAL
?
orientation
::
Landscape
:
orientation
::
Portrait
;
aInfo
.
m_eOrientation
=
aValue
.
equalsIgnoreAsciiCase
(
"landscape"
)
==
COMPARE_EQUAL
?
orientation
::
Landscape
:
orientation
::
Portrait
;
int
nGroupKeys
=
aConfig
.
GetKeyCount
();
int
nGroupKeys
=
aConfig
.
GetKeyCount
();
for
(
int
nPPDKey
=
0
;
nPPDKey
<
nGroupKeys
;
nPPDKey
++
)
for
(
int
nPPDKey
=
0
;
nPPDKey
<
nGroupKeys
;
nPPDKey
++
)
{
{
...
@@ -617,7 +619,7 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
...
@@ -617,7 +619,7 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
aValue
=
aConfig
.
ReadKey
(
nPPDKey
);
aValue
=
aConfig
.
ReadKey
(
nPPDKey
);
aPPDKey
.
Erase
(
0
,
4
);
aPPDKey
.
Erase
(
0
,
4
);
const
PPDKey
*
pKey
=
aInfo
.
m_pParser
->
getKey
(
String
(
aPPDKey
,
RTL_TEXTENCODING_ISO_8859_1
)
);
const
PPDKey
*
pKey
=
aInfo
.
m_pParser
->
getKey
(
String
(
aPPDKey
,
RTL_TEXTENCODING_ISO_8859_1
)
);
const
PPDValue
*
pValue
=
pKey
?
(
aValue
.
Equals
(
"*nil"
)
?
NULL
:
pKey
->
getValue
(
String
(
aValue
,
RTL_TEXTENCODING_ISO_8859_1
)
)
)
:
NULL
;
const
PPDValue
*
pValue
=
pKey
?
(
aValue
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"*nil"
))
?
NULL
:
pKey
->
getValue
(
rtl
::
OStringToOUString
(
aValue
,
RTL_TEXTENCODING_ISO_8859_1
)
)
)
:
NULL
;
if
(
pKey
)
if
(
pKey
)
aInfo
.
m_aContext
.
setValue
(
pKey
,
pValue
,
true
);
aInfo
.
m_aContext
.
setValue
(
pKey
,
pValue
,
true
);
}
}
...
...
sd/source/filter/ppt/pptin.cxx
Dosyayı görüntüle @
91a418d2
...
@@ -433,13 +433,13 @@ sal_Bool ImplSdPPTImport::Import()
...
@@ -433,13 +433,13 @@ sal_Bool ImplSdPPTImport::Import()
{
{
sal_uInt32
nPageNumber
=
0
;
sal_uInt32
nPageNumber
=
0
;
String
aString
(
pHyperlink
->
aSubAdress
);
String
aString
(
pHyperlink
->
aSubAdress
);
Byte
String
aStringAry
[
3
];
rtl
::
O
String
aStringAry
[
3
];
sal_uInt16
nTokenCount
=
aString
.
GetTokenCount
(
','
);
sal_uInt16
nTokenCount
=
aString
.
GetTokenCount
(
','
);
if
(
nTokenCount
>
3
)
if
(
nTokenCount
>
3
)
nTokenCount
=
3
;
nTokenCount
=
3
;
sal_uInt16
nToken
;
sal_uInt16
nToken
;
for
(
nToken
=
0
;
nToken
<
nTokenCount
;
nToken
++
)
for
(
nToken
=
0
;
nToken
<
nTokenCount
;
nToken
++
)
aStringAry
[
nToken
]
=
ByteString
(
aString
.
GetToken
(
nToken
,
(
sal_Unicode
)
','
),
RTL_TEXTENCODING_UTF8
);
aStringAry
[
nToken
]
=
rtl
::
OUStringToOString
(
aString
.
GetToken
(
nToken
,
(
sal_Unicode
)
','
),
RTL_TEXTENCODING_UTF8
);
sal_Bool
bSucceeded
=
sal_False
;
sal_Bool
bSucceeded
=
sal_False
;
...
@@ -448,7 +448,7 @@ sal_Bool ImplSdPPTImport::Import()
...
@@ -448,7 +448,7 @@ sal_Bool ImplSdPPTImport::Import()
{
{
if
(
comphelper
::
string
::
isAsciiDecimalString
(
aStringAry
[
nToken
]))
if
(
comphelper
::
string
::
isAsciiDecimalString
(
aStringAry
[
nToken
]))
{
{
sal_Int32
nNumber
=
aStringAry
[
nToken
].
T
oInt32
();
sal_Int32
nNumber
=
aStringAry
[
nToken
].
t
oInt32
();
if
(
nNumber
&
~
0xff
)
if
(
nNumber
&
~
0xff
)
{
{
PptSlidePersistList
*
pPageList
=
GetPageList
(
PPT_SLIDEPAGE
);
PptSlidePersistList
*
pPageList
=
GetPageList
(
PPT_SLIDEPAGE
);
...
@@ -486,7 +486,7 @@ sal_Bool ImplSdPPTImport::Import()
...
@@ -486,7 +486,7 @@ sal_Bool ImplSdPPTImport::Import()
{
{
if
(
comphelper
::
string
::
isAsciiDecimalString
(
aStringAry
[
nToken
]))
if
(
comphelper
::
string
::
isAsciiDecimalString
(
aStringAry
[
nToken
]))
{
{
sal_Int32
nNumber
=
aStringAry
[
nToken
].
T
oInt32
();
sal_Int32
nNumber
=
aStringAry
[
nToken
].
t
oInt32
();
if
(
(
nNumber
&
~
0xff
)
==
0
)
if
(
(
nNumber
&
~
0xff
)
==
0
)
{
{
nPageNumber
=
(
sal_uInt32
)
nNumber
-
1
;
nPageNumber
=
(
sal_uInt32
)
nNumber
-
1
;
...
...
sfx2/source/bastyp/mieclip.cxx
Dosyayı görüntüle @
91a418d2
...
@@ -48,27 +48,27 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
...
@@ -48,27 +48,27 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
if
(
pStrm
)
if
(
pStrm
)
delete
pStrm
,
pStrm
=
0
;
delete
pStrm
,
pStrm
=
0
;
Byte
String
sLine
,
sVersion
;
rtl
::
O
String
sLine
,
sVersion
;
sal_uIntPtr
nStt
=
0
,
nEnd
=
0
;
sal_uIntPtr
nStt
=
0
,
nEnd
=
0
;
sal_
uInt16
nIndex
=
0
;
sal_
Int32
nIndex
=
0
;
rStream
.
Seek
(
STREAM_SEEK_TO_BEGIN
);
rStream
.
Seek
(
STREAM_SEEK_TO_BEGIN
);
rStream
.
ResetError
();
rStream
.
ResetError
();
if
(
rStream
.
ReadLine
(
sLine
)
&&
if
(
rStream
.
ReadLine
(
sLine
)
&&
sLine
.
G
etToken
(
0
,
':'
,
nIndex
)
==
"Version"
)
sLine
.
g
etToken
(
0
,
':'
,
nIndex
)
==
"Version"
)
{
{
sVersion
=
sLine
.
C
opy
(
nIndex
);
sVersion
=
sLine
.
c
opy
(
nIndex
);
while
(
rStream
.
ReadLine
(
sLine
)
)
while
(
rStream
.
ReadLine
(
sLine
)
)
{
{
nIndex
=
0
;
nIndex
=
0
;
ByteString
sTmp
(
sLine
.
GetToken
(
0
,
':'
,
nIndex
)
);
rtl
::
OString
sTmp
(
sLine
.
getToken
(
0
,
':'
,
nIndex
)
);
if
(
sTmp
==
"StartHTML"
)
if
(
sTmp
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"StartHTML"
))
)
nStt
=
(
sal_uIntPtr
)(
sLine
.
Erase
(
0
,
nIndex
).
T
oInt32
());
nStt
=
(
sal_uIntPtr
)(
sLine
.
copy
(
nIndex
).
t
oInt32
());
else
if
(
sTmp
==
"EndHTML"
)
else
if
(
sTmp
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"EndHTML"
))
)
nEnd
=
(
sal_uIntPtr
)(
sLine
.
Erase
(
0
,
nIndex
).
T
oInt32
());
nEnd
=
(
sal_uIntPtr
)(
sLine
.
copy
(
nIndex
).
t
oInt32
());
else
if
(
sTmp
==
"SourceURL"
)
else
if
(
sTmp
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"SourceURL"
))
)
sBaseURL
=
S
tring
(
S2U
(
sLine
.
Erase
(
0
,
nIndex
)
));
sBaseURL
=
S
2U
(
sLine
.
copy
(
nIndex
));
if
(
nEnd
&&
nStt
&&
if
(
nEnd
&&
nStt
&&
(
sBaseURL
.
Len
()
||
rStream
.
Tell
()
>=
nStt
))
(
sBaseURL
.
Len
()
||
rStream
.
Tell
()
>=
nStt
))
...
...
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