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
d6bf32ba
Kaydet (Commit)
d6bf32ba
authored
Ock 24, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make padmin ByteString free
üst
141c1c7b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
44 deletions
+42
-44
adddlg.cxx
padmin/source/adddlg.cxx
+36
-37
cmddlg.cxx
padmin/source/cmddlg.cxx
+2
-2
newppdlg.cxx
padmin/source/newppdlg.cxx
+3
-3
outdevgrind.cxx
vcl/workben/outdevgrind.cxx
+1
-2
No files found.
padmin/source/adddlg.cxx
Dosyayı görüntüle @
d6bf32ba
...
...
@@ -498,15 +498,15 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
// read defaults
aConfig
.
SetGroup
(
"Xprinter,PostScript"
);
Byte
String
aDefPageSize
(
aConfig
.
ReadKey
(
"PageSize"
)
);
Byte
String
aDefOrientation
(
aConfig
.
ReadKey
(
"Orientation"
)
);
Byte
String
aDefMarginLeft
(
aConfig
.
ReadKey
(
"MarginLeft"
)
);
Byte
String
aDefMarginRight
(
aConfig
.
ReadKey
(
"MarginRight"
)
);
Byte
String
aDefMarginTop
(
aConfig
.
ReadKey
(
"MarginTop"
)
);
Byte
String
aDefMarginBottom
(
aConfig
.
ReadKey
(
"MarginBottom"
)
);
Byte
String
aDefScale
(
aConfig
.
ReadKey
(
"Scale"
)
);
Byte
String
aDefCopies
(
aConfig
.
ReadKey
(
"Copies"
)
);
Byte
String
aDefDPI
(
aConfig
.
ReadKey
(
"DPI"
)
);
rtl
::
O
String
aDefPageSize
(
aConfig
.
ReadKey
(
"PageSize"
)
);
rtl
::
O
String
aDefOrientation
(
aConfig
.
ReadKey
(
"Orientation"
)
);
rtl
::
O
String
aDefMarginLeft
(
aConfig
.
ReadKey
(
"MarginLeft"
)
);
rtl
::
O
String
aDefMarginRight
(
aConfig
.
ReadKey
(
"MarginRight"
)
);
rtl
::
O
String
aDefMarginTop
(
aConfig
.
ReadKey
(
"MarginTop"
)
);
rtl
::
O
String
aDefMarginBottom
(
aConfig
.
ReadKey
(
"MarginBottom"
)
);
rtl
::
O
String
aDefScale
(
aConfig
.
ReadKey
(
"Scale"
)
);
rtl
::
O
String
aDefCopies
(
aConfig
.
ReadKey
(
"Copies"
)
);
rtl
::
O
String
aDefDPI
(
aConfig
.
ReadKey
(
"DPI"
)
);
using
comphelper
::
string
::
getToken
;
...
...
@@ -540,8 +540,8 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
// read the command
aConfig
.
SetGroup
(
"ports"
);
Byte
String
aCommand
(
aConfig
.
ReadKey
(
aPort
)
);
if
(
!
aCommand
.
Len
()
)
rtl
::
O
String
aCommand
(
aConfig
.
ReadKey
(
aPort
)
);
if
(
aCommand
.
isEmpty
()
)
{
String
aText
(
PaResId
(
RID_TXT_PRINTERWITHOUTCOMMAND
)
);
aText
.
SearchAndReplace
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"%s"
)
),
rtl
::
OStringToOUString
(
aPrinter
,
aEncoding
)
);
...
...
@@ -603,23 +603,22 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
aValue
=
aConfig
.
ReadKey
(
"Orientation"
,
aDefOrientation
);
if
(
!
aValue
.
isEmpty
())
aInfo
.
m_eOrientation
=
aValue
.
equalsIgnoreAsciiCase
(
"landscape"
)
==
COMPARE_EQUAL
?
orientation
::
Landscape
:
orientation
::
Portrait
;
aInfo
.
m_eOrientation
=
aValue
.
equalsIgnoreAsciiCase
L
(
RTL_CONSTASCII_STRINGPARAM
(
"landscape"
))
?
orientation
::
Landscape
:
orientation
::
Portrait
;
int
nGroupKeys
=
aConfig
.
GetKeyCount
();
for
(
int
nPPDKey
=
0
;
nPPDKey
<
nGroupKeys
;
nPPDKey
++
)
{
Byte
String
aPPDKey
(
aConfig
.
GetKeyName
(
nPPDKey
)
);
rtl
::
O
String
aPPDKey
(
aConfig
.
GetKeyName
(
nPPDKey
)
);
// ignore page region
// there are some ppd keys in old Xpdefaults that
// should never have been writte because they are defaults
// PageRegion leads to problems in conjunction
// with a not matching PageSize
if
(
aPPDKey
.
CompareTo
(
"PPD_"
,
4
)
==
COMPARE_EQUAL
&&
aPPDKey
!=
"PPD_PageRegion"
)
if
(
comphelper
::
string
::
matchL
(
aPPDKey
,
RTL_CONSTASCII_STRINGPARAM
(
"PPD_"
))
&&
!
aPPDKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"PPD_PageRegion"
)))
{
aValue
=
aConfig
.
ReadKey
(
nPPDKey
);
aPPDKey
.
Erase
(
0
,
4
);
const
PPDKey
*
pKey
=
aInfo
.
m_pParser
->
getKey
(
String
(
aPPDKey
,
RTL_TEXTENCODING_ISO_8859_1
)
);
aPPDKey
=
aPPDKey
.
copy
(
4
);
const
PPDKey
*
pKey
=
aInfo
.
m_pParser
->
getKey
(
rtl
::
OStringToOUString
(
aPPDKey
,
RTL_TEXTENCODING_ISO_8859_1
)
);
const
PPDValue
*
pValue
=
pKey
?
(
aValue
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"*nil"
))
?
NULL
:
pKey
->
getValue
(
rtl
::
OStringToOUString
(
aValue
,
RTL_TEXTENCODING_ISO_8859_1
))
)
:
NULL
;
if
(
pKey
)
aInfo
.
m_aContext
.
setValue
(
pKey
,
pValue
,
true
);
...
...
@@ -1097,40 +1096,40 @@ String AddPrinterDialog::uniquePrinterName( const String& rBase )
String
AddPrinterDialog
::
getOldPrinterLocation
()
{
static
const
char
*
pHome
=
getenv
(
"HOME"
);
String
aRet
;
ByteString
aFileName
;
rtl
::
OString
aFileName
;
rtl_TextEncoding
aEncoding
=
osl_getThreadTextEncoding
();
if
(
pHome
)
{
aFileName
=
pHome
;
aFileName
.
Append
(
"/.Xpdefaults"
);
if
(
access
(
aFileName
.
GetBuffer
(),
F_OK
)
)
aFileName
=
rtl
::
OStringBuffer
().
append
(
pHome
).
append
(
RTL_CONSTASCII_STRINGPARAM
(
"/.Xpdefaults"
)).
makeStringAndClear
();
if
(
access
(
aFileName
.
getStr
(),
F_OK
))
{
aFileName
=
pHome
;
aFileName
.
Append
(
"/.sversionrc"
);
Config
aSVer
(
String
(
aFileName
,
aEncoding
)
);
aFileName
=
rtl
::
OStringBuffer
().
append
(
pHome
).
append
(
RTL_CONSTASCII_STRINGPARAM
(
"/.sversionrc"
)).
makeStringAndClear
();
Config
aSVer
(
rtl
::
OStringToOUString
(
aFileName
,
aEncoding
));
aSVer
.
SetGroup
(
"Versions"
);
aFileName
=
aSVer
.
ReadKey
(
"StarOffice 5.2"
);
if
(
aFileName
.
Len
()
)
aFileName
.
Append
(
"/share/xp3/Xpdefaults"
);
if
(
!
aFileName
.
isEmpty
()
)
aFileName
=
aFileName
+
rtl
::
OString
(
RTL_CONSTASCII_STRINGPARAM
(
"/share/xp3/Xpdefaults"
)
);
else
if
(
(
aFileName
=
aSVer
.
ReadKey
(
"StarOffice 5.1"
)
).
Len
()
(
aFileName
=
aSVer
.
ReadKey
(
"StarOffice 5.1"
)
).
getLength
()
||
(
aFileName
=
aSVer
.
ReadKey
(
"StarOffice 5.0"
)
).
Len
()
(
aFileName
=
aSVer
.
ReadKey
(
"StarOffice 5.0"
)
).
getLength
()
||
(
aFileName
=
aSVer
.
ReadKey
(
"StarOffice 4.0"
)
).
Len
()
(
aFileName
=
aSVer
.
ReadKey
(
"StarOffice 4.0"
)
).
getLength
()
)
{
aFileName
.
Append
(
"/xp3/Xpdefaults"
);
aFileName
=
aFileName
+
rtl
::
OString
(
RTL_CONSTASCII_STRINGPARAM
(
"/xp3/Xpdefaults"
)
);
}
if
(
aFileName
.
Len
()
&&
access
(
aFileName
.
GetBuffer
(),
F_OK
)
)
aFileName
.
Erase
();
if
(
!
aFileName
.
isEmpty
()
&&
access
(
aFileName
.
getStr
(),
F_OK
)
)
aFileName
=
rtl
::
OString
();
}
}
if
(
aFileName
.
Len
()
)
aRet
=
String
(
aFileName
,
aEncoding
);
return
aRet
;
return
!
aFileName
.
isEmpty
()
?
rtl
::
OStringToOUString
(
aFileName
,
aEncoding
)
:
rtl
::
OUString
();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
padmin/source/cmddlg.cxx
Dosyayı görüntüle @
d6bf32ba
...
...
@@ -82,7 +82,7 @@ void CommandStore::getSystemPdfCommands( ::std::list< String >& rCommands )
int
nLen
=
strlen
(
pBuffer
);
if
(
pBuffer
[
nLen
-
1
]
==
'\n'
)
// strip newline
pBuffer
[
--
nLen
]
=
0
;
aCommand
=
String
(
ByteString
(
pBuffer
),
aEncoding
);
aCommand
=
rtl
::
OUString
(
pBuffer
,
nLen
,
aEncoding
);
if
(
(
(
aCommand
.
GetChar
(
0
)
==
'/'
)
||
(
aCommand
.
GetChar
(
0
)
==
'.'
&&
aCommand
.
GetChar
(
1
)
==
'/'
)
||
(
aCommand
.
GetChar
(
0
)
==
'.'
&&
aCommand
.
GetChar
(
1
)
==
'.'
&&
aCommand
.
GetChar
(
2
)
==
'/'
)
)
...
...
@@ -105,7 +105,7 @@ void CommandStore::getSystemPdfCommands( ::std::list< String >& rCommands )
int
nLen
=
strlen
(
pBuffer
);
if
(
pBuffer
[
nLen
-
1
]
==
'\n'
)
// strip newline
pBuffer
[
--
nLen
]
=
0
;
aCommand
=
String
(
ByteString
(
pBuffer
),
aEncoding
);
aCommand
=
rtl
::
OUString
(
pBuffer
,
nLen
,
aEncoding
);
if
(
(
(
aCommand
.
GetChar
(
0
)
==
'/'
)
||
(
aCommand
.
GetChar
(
0
)
==
'.'
&&
aCommand
.
GetChar
(
1
)
==
'/'
)
||
(
aCommand
.
GetChar
(
0
)
==
'.'
&&
aCommand
.
GetChar
(
1
)
==
'.'
&&
aCommand
.
GetChar
(
2
)
==
'/'
)
)
...
...
padmin/source/newppdlg.cxx
Dosyayı görüntüle @
d6bf32ba
...
...
@@ -80,9 +80,9 @@ PPDImportDialog::PPDImportDialog( Window* pParent ) :
m_aPathBox
.
SetText
(
rtl
::
OStringToOUString
(
rConfig
.
ReadKey
(
"LastDir"
),
RTL_TEXTENCODING_UTF8
)
);
for
(
sal_Int32
i
=
0
;
i
<
11
;
++
i
)
{
Byte
String
aEntry
(
rConfig
.
ReadKey
(
rtl
::
OString
::
valueOf
(
i
)));
if
(
aEntry
.
Len
()
)
m_aPathBox
.
InsertEntry
(
String
(
aEntry
,
RTL_TEXTENCODING_UTF8
)
);
rtl
::
O
String
aEntry
(
rConfig
.
ReadKey
(
rtl
::
OString
::
valueOf
(
i
)));
if
(
!
aEntry
.
isEmpty
()
)
m_aPathBox
.
InsertEntry
(
rtl
::
OStringToOUString
(
aEntry
,
RTL_TEXTENCODING_UTF8
)
);
}
m_aOKBtn
.
SetClickHdl
(
LINK
(
this
,
PPDImportDialog
,
ClickBtnHdl
)
);
...
...
vcl/workben/outdevgrind.cxx
Dosyayı görüntüle @
d6bf32ba
...
...
@@ -123,8 +123,7 @@ void setupMethodStubs( functor_vector_type& res )
aPoly3
.
Rotate
(
aPoly3
.
GetBoundRect
().
Center
(),
900
);
const
String
aString
(
ByteString
(
"This is a test"
),
RTL_TEXTENCODING_ASCII_US
);
const
String
aString
(
RTL_CONSTASCII_USTRINGPARAM
(
"This is a test"
));
const
LineInfo
aLineInfo
(
LINE_SOLID
,
5
);
// unfortunately, VDevs have inaccessible copy constructors
...
...
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