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
96328945
Kaydet (Commit)
96328945
authored
Mar 14, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Ivan Timofeev
Mar 15, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert tools/table.hxx to std::map in ScEEParser class in SC module
üst
a13a9a04
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
16 deletions
+23
-16
htmlpars.cxx
sc/source/filter/html/htmlpars.cxx
+2
-1
eeparser.hxx
sc/source/filter/inc/eeparser.hxx
+5
-3
eeimpars.cxx
sc/source/filter/rtf/eeimpars.cxx
+16
-12
No files found.
sc/source/filter/html/htmlpars.cxx
Dosyayı görüntüle @
96328945
...
...
@@ -58,6 +58,7 @@
#include <vcl/svapp.hxx>
#include <tools/urlobj.hxx>
#include <tools/tenccvt.hxx>
#include <tools/table.hxx>
#include "htmlpars.hxx"
#include "global.hxx"
...
...
@@ -331,7 +332,7 @@ sal_uLong ScHTMLLayoutParser::Read( SvStream& rStream, const String& rBaseURL )
{
aSize
.
Width
()
=
*
pOff
-
nOff
;
aSize
=
pDefaultDev
->
PixelToLogic
(
aSize
,
MapMode
(
MAP_TWIP
)
);
pColWidths
->
Insert
(
j
-
1
,
(
void
*
)
aSize
.
Width
()
);
maColWidths
[
j
-
1
]
=
aSize
.
Width
(
);
nOff
=
*
pOff
;
}
return
nErr
;
...
...
sc/source/filter/inc/eeparser.hxx
Dosyayı görüntüle @
96328945
...
...
@@ -32,7 +32,6 @@
#include <tools/string.hxx>
#include <tools/gen.hxx>
#include <vcl/graph.hxx>
#include <tools/table.hxx>
#include <svl/itemset.hxx>
#include <editeng/editdata.hxx>
#include <address.hxx>
...
...
@@ -108,6 +107,8 @@ struct ScEEParseEntry
class
EditEngine
;
typedef
std
::
map
<
SCCOL
,
sal_uInt16
>
ColWidthsMap
;
class
ScEEParser
{
protected
:
...
...
@@ -116,7 +117,7 @@ protected:
SfxItemPool
*
pDocPool
;
::
std
::
vector
<
ScEEParseEntry
*
>
maList
;
ScEEParseEntry
*
pActEntry
;
Table
*
p
ColWidths
;
ColWidthsMap
ma
ColWidths
;
int
nLastToken
;
SCCOL
nColCnt
;
SCROW
nRowCnt
;
...
...
@@ -131,7 +132,8 @@ public:
virtual
sal_uLong
Read
(
SvStream
&
,
const
String
&
rBaseURL
)
=
0
;
Table
*
GetColWidths
()
const
{
return
pColWidths
;
}
const
ColWidthsMap
&
GetColWidths
()
const
{
return
maColWidths
;
}
ColWidthsMap
&
GetColWidths
()
{
return
maColWidths
;
}
void
GetDimensions
(
SCCOL
&
nCols
,
SCROW
&
nRows
)
const
{
nCols
=
nColMax
;
nRows
=
nRowMax
;
}
...
...
sc/source/filter/rtf/eeimpars.cxx
Dosyayı görüntüle @
96328945
...
...
@@ -52,6 +52,7 @@
#include <unotools/syslocale.hxx>
#include <unotools/charclass.hxx>
#include <comphelper/string.hxx>
#include <tools/table.hxx>
#include "eeimport.hxx"
#include "global.hxx"
...
...
@@ -431,14 +432,17 @@ void ScEEImport::WriteToDocument( sal_Bool bSizeColsRows, double nOutputFactor,
if
(
bSizeColsRows
)
{
// Spaltenbreiten
Table
*
p
ColWidths
=
mpParser
->
GetColWidths
();
if
(
pColWidths
->
Count
()
)
ColWidthsMap
&
r
ColWidths
=
mpParser
->
GetColWidths
();
if
(
!
rColWidths
.
empty
()
)
{
nProgress
=
0
;
pProgress
->
SetState
(
nProgress
,
nEndCol
-
nStartCol
+
1
);
for
(
SCCOL
nCol
=
nStartCol
;
nCol
<=
nEndCol
;
nCol
++
)
{
sal_uInt16
nWidth
=
(
sal_uInt16
)(
sal_uLong
)
pColWidths
->
Get
(
nCol
);
sal_uInt16
nWidth
=
0
;
ColWidthsMap
::
const_iterator
it
=
rColWidths
.
find
(
nCol
);
if
(
it
!=
rColWidths
.
end
()
)
nWidth
=
it
->
second
;
if
(
nWidth
)
mpDoc
->
SetColWidth
(
nCol
,
nTab
,
nWidth
);
pProgress
->
SetState
(
++
nProgress
);
...
...
@@ -513,20 +517,22 @@ sal_Bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEPa
nDir
=
pI
->
nDir
;
}
// Spaltenbreiten
Table
*
pColWidths
=
mpParser
->
GetColWidths
();
long
nThisWidth
=
(
long
)
pColWidths
->
Get
(
nCol
);
ColWidthsMap
&
rColWidths
=
mpParser
->
GetColWidths
();
long
nThisWidth
=
0
;
ColWidthsMap
::
const_iterator
it
=
rColWidths
.
find
(
nCol
);
if
(
it
!=
rColWidths
.
end
()
)
nThisWidth
=
it
->
second
;
long
nColWidths
=
nThisWidth
;
SCCOL
nColSpanCol
=
nCol
+
pE
->
nColOverlap
;
for
(
SCCOL
nC
=
nCol
+
1
;
nC
<
nColSpanCol
;
nC
++
)
{
nColWidths
+=
(
long
)
pColWidths
->
Get
(
nC
);
ColWidthsMap
::
const_iterator
it2
=
rColWidths
.
find
(
nC
);
if
(
it2
!=
rColWidths
.
end
()
)
nColWidths
+=
it2
->
second
;
}
if
(
nWidth
>
nColWidths
)
{
// Differenz nur in der ersten Spalte eintragen
if
(
nThisWidth
)
pColWidths
->
Replace
(
nCol
,
(
void
*
)(
nWidth
-
nColWidths
+
nThisWidth
)
);
else
pColWidths
->
Insert
(
nCol
,
(
void
*
)(
nWidth
-
nColWidths
)
);
rColWidths
[
nCol
]
=
nWidth
-
nColWidths
+
nThisWidth
;
}
// Zeilenhoehen, Differenz auf alle betroffenen Zeilen verteilen
SCROW
nRowSpan
=
pE
->
nRowOverlap
;
...
...
@@ -619,7 +625,6 @@ ScEEParser::ScEEParser( EditEngine* pEditP ) :
pEdit
(
pEditP
),
pPool
(
EditEngine
::
CreatePool
()
),
pDocPool
(
new
ScDocumentPool
),
pColWidths
(
new
Table
),
nLastToken
(
0
),
nColCnt
(
0
),
nRowCnt
(
0
),
...
...
@@ -636,7 +641,6 @@ ScEEParser::ScEEParser( EditEngine* pEditP ) :
ScEEParser
::~
ScEEParser
()
{
delete
pActEntry
;
delete
pColWidths
;
if
(
!
maList
.
empty
()
)
maList
.
clear
();
// Pool erst loeschen nachdem die Listen geloescht wurden
...
...
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