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
1e27efd9
Kaydet (Commit)
1e27efd9
authored
Şub 03, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More on ScStrCollection/StrData elimination.
üst
0ec4b391
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
25 deletions
+25
-25
docsh.cxx
sc/source/ui/docshell/docsh.cxx
+3
-3
docsh8.cxx
sc/source/ui/docshell/docsh8.cxx
+20
-20
docsh.hxx
sc/source/ui/inc/docsh.hxx
+2
-2
No files found.
sc/source/ui/docshell/docsh.cxx
Dosyayı görüntüle @
1e27efd9
...
...
@@ -2204,10 +2204,10 @@ sal_Bool ScDocShell::ConvertTo( SfxMedium &rMed )
WaitObject
aWait
(
GetActiveDialogParent
()
);
// HACK damit Sba geoffnetes TempFile ueberschreiben kann
rMed
.
CloseOutStream
();
sal_B
ool
bHasMemo
=
false
;
b
ool
bHasMemo
=
false
;
sal_uLong
eError
=
DBaseExport
(
rMed
.
GetPhysicalName
(),
ScGlobal
::
GetCharsetValue
(
sCharSet
),
bHasMemo
);
sal_uLong
eError
=
DBaseExport
(
rMed
.
GetPhysicalName
(),
ScGlobal
::
GetCharsetValue
(
sCharSet
),
bHasMemo
);
if
(
eError
!=
eERR_OK
&&
(
eError
&
ERRCODE_WARNING_MASK
)
)
{
...
...
sc/source/ui/docshell/docsh8.cxx
Dosyayı görüntüle @
1e27efd9
...
...
@@ -87,6 +87,7 @@
#include "docparam.hxx"
#include <vector>
#include <boost/unordered_set.hpp>
using
namespace
com
::
sun
::
star
;
using
::
std
::
vector
;
...
...
@@ -480,28 +481,27 @@ sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet
return
nErr
;
}
// -----------------------------------------------------------------------
namespace
{
inline
sal_B
ool
IsAsciiDigit
(
sal_Unicode
c
)
inline
b
ool
IsAsciiDigit
(
sal_Unicode
c
)
{
return
0x30
<=
c
&&
c
<=
0x39
;
}
inline
sal_B
ool
IsAsciiAlpha
(
sal_Unicode
c
)
inline
b
ool
IsAsciiAlpha
(
sal_Unicode
c
)
{
return
(
0x41
<=
c
&&
c
<=
0x5a
)
||
(
0x61
<=
c
&&
c
<=
0x7a
);
}
void
lcl_GetColumnTypes
(
ScDocShell
&
rDocShell
,
const
ScRange
&
rDataRange
,
sal_Bool
bHasFieldNames
,
rtl
::
OUString
*
pColNames
,
sal_Int32
*
pColTypes
,
sal_Int32
*
pColLengths
,
sal_Int32
*
pColScales
,
sal_Bool
&
bHasMemo
,
CharSet
eCharSet
)
void
lcl_GetColumnTypes
(
ScDocShell
&
rDocShell
,
const
ScRange
&
rDataRange
,
bool
bHasFieldNames
,
rtl
::
OUString
*
pColNames
,
sal_Int32
*
pColTypes
,
sal_Int32
*
pColLengths
,
sal_Int32
*
pColScales
,
bool
&
bHasMemo
,
CharSet
eCharSet
)
{
// updating of column titles didn't work in 5.2 and isn't always wanted
// (saving normally shouldn't modify the document)
//! read flag from configuration
sal_B
ool
bUpdateTitles
=
false
;
b
ool
bUpdateTitles
=
false
;
ScDocument
*
pDoc
=
rDocShell
.
GetDocument
();
SvNumberFormatter
*
pNumFmt
=
pDoc
->
GetFormatTable
();
...
...
@@ -512,14 +512,15 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
SCCOL
nLastCol
=
rDataRange
.
aEnd
.
Col
();
SCROW
nLastRow
=
rDataRange
.
aEnd
.
Row
();
ScStrCollection
aFieldNamesCollection
;
typedef
boost
::
unordered_set
<
rtl
::
OUString
,
rtl
::
OUStringHash
>
StrSetType
;
StrSetType
aFieldNames
;
long
nField
=
0
;
SCROW
nFirstDataRow
=
(
bHasFieldNames
?
nFirstRow
+
1
:
nFirstRow
);
for
(
SCCOL
nCol
=
nFirstCol
;
nCol
<=
nLastCol
;
nCol
++
)
{
sal_B
ool
bTypeDefined
=
false
;
sal_B
ool
bPrecDefined
=
false
;
b
ool
bTypeDefined
=
false
;
b
ool
bPrecDefined
=
false
;
sal_Int32
nFieldLen
=
0
;
sal_Int32
nPrecision
=
0
;
sal_Int32
nDbType
=
sdbc
::
DataType
::
SQLNULL
;
...
...
@@ -602,8 +603,8 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
aFieldName
=
aTmpStr
;
if
(
aFieldName
.
Len
()
>
10
)
aFieldName
.
Erase
(
10
);
StrData
*
pStrData
=
new
StrData
(
aFieldName
);
if
(
!
aFieldNamesCollection
.
Insert
(
pStrData
)
)
if
(
!
aFieldNames
.
insert
(
aFieldName
).
second
)
{
// doppelter Feldname, numerisch erweitern
sal_uInt16
nSub
=
1
;
String
aFixPart
(
aFieldName
);
...
...
@@ -615,8 +616,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
aFixPart
.
Erase
(
10
-
aVarPart
.
Len
()
);
aFieldName
=
aFixPart
;
aFieldName
+=
aVarPart
;
pStrData
->
SetString
(
aFieldName
);
}
while
(
!
aFieldNamesCollection
.
Insert
(
pStrData
)
);
}
while
(
!
aFieldNames
.
insert
(
aFieldName
).
second
);
}
}
else
...
...
@@ -661,8 +661,8 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
}
}
}
sal_B
ool
bSdbLenAdjusted
=
false
;
sal_B
ool
bSdbLenBad
=
false
;
b
ool
bSdbLenAdjusted
=
false
;
b
ool
bSdbLenBad
=
false
;
// Feldlaenge
if
(
nDbType
==
sdbc
::
DataType
::
VARCHAR
&&
!
nFieldLen
)
{
// maximale Feldbreite bestimmen
...
...
@@ -767,7 +767,6 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
}
}
inline
void
lcl_getLongVarCharEditString
(
rtl
::
OUString
&
rString
,
const
ScBaseCell
*
pCell
,
ScFieldEditEngine
&
rEditEngine
)
{
...
...
@@ -785,8 +784,9 @@ inline void lcl_getLongVarCharString( rtl::OUString& rString, ScBaseCell* pCell,
ScCellFormat
::
GetString
(
pCell
,
nFormat
,
rString
,
&
pColor
,
rNumFmt
);
}
}
sal_uLong
ScDocShell
::
DBaseExport
(
const
String
&
rFullFileName
,
CharSet
eCharSet
,
sal_B
ool
&
bHasMemo
)
sal_uLong
ScDocShell
::
DBaseExport
(
const
rtl
::
OUString
&
rFullFileName
,
CharSet
eCharSet
,
b
ool
&
bHasMemo
)
{
// remove the file so the dBase driver doesn't find an invalid file
INetURLObject
aDeleteObj
(
rFullFileName
,
INET_PROT_FILE
);
...
...
sc/source/ui/inc/docsh.hxx
Dosyayı görüntüle @
1e27efd9
...
...
@@ -148,8 +148,8 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
SC_DLLPRIVATE
sal_uLong
DBaseImport
(
const
String
&
rFullFileName
,
CharSet
eCharSet
,
ScColWidthParam
aColWidthParam
[
MAXCOLCOUNT
],
ScFlatBoolRowSegments
&
rRowHeightsRecalc
);
SC_DLLPRIVATE
sal_uLong
DBaseExport
(
const
String
&
rFullFileName
,
CharSet
eCharSet
,
sal_B
ool
&
bHasMemo
);
SC_DLLPRIVATE
sal_uLong
DBaseExport
(
const
rtl
::
OUString
&
rFullFileName
,
CharSet
eCharSet
,
b
ool
&
bHasMemo
);
SC_DLLPRIVATE
static
bool
MoveFile
(
const
INetURLObject
&
rSource
,
const
INetURLObject
&
rDest
);
SC_DLLPRIVATE
static
bool
KillFile
(
const
INetURLObject
&
rURL
);
...
...
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