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
3aa74a27
Kaydet (Commit)
3aa74a27
authored
May 02, 2012
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove obsolete READ_OLDVERS table autoformat code
üst
7e8c0bd7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
239 deletions
+3
-239
autoform.hxx
sc/inc/autoform.hxx
+0
-8
autoform.cxx
sc/source/core/tool/autoform.cxx
+1
-113
tblafmt.hxx
sw/inc/tblafmt.hxx
+0
-10
tblafmt.cxx
sw/source/core/doc/tblafmt.cxx
+2
-108
No files found.
sc/inc/autoform.hxx
Dosyayı görüntüle @
3aa74a27
...
...
@@ -255,10 +255,6 @@ public:
sal_Bool
Load
(
SvStream
&
rStream
,
const
ScAfVersions
&
rVersions
,
sal_uInt16
nVer
);
sal_Bool
Save
(
SvStream
&
rStream
,
sal_uInt16
fileVersion
);
#ifdef READ_OLDVERS
sal_Bool
LoadOld
(
SvStream
&
rStream
,
const
ScAfVersions
&
rVersions
);
#endif
};
...
...
@@ -320,10 +316,6 @@ public:
bool
Load
(
SvStream
&
rStream
,
const
ScAfVersions
&
rVersions
);
bool
Save
(
SvStream
&
rStream
,
sal_uInt16
fileVersion
);
#ifdef READ_OLDVERS
sal_Bool
LoadOld
(
SvStream
&
rStream
,
const
ScAfVersions
&
rVersions
);
#endif
};
class
SC_DLLPUBLIC
ScAutoFormat
...
...
sc/source/core/tool/autoform.cxx
Dosyayı görüntüle @
3aa74a27
...
...
@@ -26,11 +26,6 @@
*
************************************************************************/
#define READ_OLDVERS
#include "autoform.hxx"
#include <sfx2/app.hxx>
...
...
@@ -94,12 +89,6 @@ const sal_uInt16 AUTOFORMAT_ID = AUTOFORMAT_ID_31005;
const
sal_uInt16
AUTOFORMAT_DATA_ID
=
AUTOFORMAT_DATA_ID_31005
;
#ifdef READ_OLDVERS
const
sal_uInt16
AUTOFORMAT_OLD_ID_OLD
=
4201
;
const
sal_uInt16
AUTOFORMAT_OLD_DATA_ID
=
4202
;
const
sal_uInt16
AUTOFORMAT_OLD_ID_NEW
=
4203
;
#endif
namespace
{
/// Read an AutoFormatSwBlob from stream.
...
...
@@ -401,40 +390,6 @@ sal_Bool ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVe
return
(
rStream
.
GetError
()
==
0
);
}
#ifdef READ_OLDVERS
sal_Bool
ScAutoFormatDataField
::
LoadOld
(
SvStream
&
rStream
,
const
ScAfVersions
&
rVersions
)
{
SfxPoolItem
*
pNew
;
SvxOrientationItem
aOrientation
(
SVX_ORIENTATION_STANDARD
,
0
);
aNumFormat
.
Load
(
rStream
,
rStream
.
GetStreamCharSet
());
READ
(
aFont
,
SvxFontItem
,
rVersions
.
nFontVersion
)
READ
(
aHeight
,
SvxFontHeightItem
,
rVersions
.
nFontHeightVersion
)
READ
(
aWeight
,
SvxWeightItem
,
rVersions
.
nWeightVersion
)
READ
(
aPosture
,
SvxPostureItem
,
rVersions
.
nPostureVersion
)
READ
(
aUnderline
,
SvxUnderlineItem
,
rVersions
.
nUnderlineVersion
)
READ
(
aCrossedOut
,
SvxCrossedOutItem
,
rVersions
.
nCrossedOutVersion
)
READ
(
aContour
,
SvxContourItem
,
rVersions
.
nContourVersion
)
READ
(
aShadowed
,
SvxShadowedItem
,
rVersions
.
nShadowedVersion
)
READ
(
aColor
,
SvxColorItem
,
rVersions
.
nColorVersion
)
READ
(
aHorJustify
,
SvxHorJustifyItem
,
rVersions
.
nHorJustifyVersion
)
READ
(
aVerJustify
,
SvxVerJustifyItem
,
rVersions
.
nVerJustifyVersion
)
READ
(
aOrientation
,
SvxOrientationItem
,
rVersions
.
nOrientationVersion
)
pNew
=
aLinebreak
.
Create
(
rStream
,
rVersions
.
nBoolVersion
);
SetLinebreak
(
*
(
SfxBoolItem
*
)
pNew
);
delete
pNew
;
READ
(
aMargin
,
SvxMarginItem
,
rVersions
.
nMarginVersion
)
READ
(
aBox
,
SvxBoxItem
,
rVersions
.
nBoxVersion
)
READ
(
aBackground
,
SvxBrushItem
,
rVersions
.
nBrushVersion
)
aStacked
.
SetValue
(
aOrientation
.
IsStacked
()
);
aRotateAngle
.
SetValue
(
aOrientation
.
GetRotation
(
aRotateAngle
.
GetValue
()
)
);
return
(
rStream
.
GetError
()
==
0
);
}
#endif
sal_Bool
ScAutoFormatDataField
::
Save
(
SvStream
&
rStream
,
sal_uInt16
fileVersion
)
{
SvxOrientationItem
aOrientation
(
aRotateAngle
.
GetValue
(),
aStacked
.
GetValue
(),
0
);
...
...
@@ -849,34 +804,6 @@ bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
return
bRet
;
}
#ifdef READ_OLDVERS
sal_Bool
ScAutoFormatData
::
LoadOld
(
SvStream
&
rStream
,
const
ScAfVersions
&
rVersions
)
{
sal_Bool
bRet
=
true
;
sal_uInt16
nVal
=
0
;
rStream
>>
nVal
;
bRet
=
(
rStream
.
GetError
()
==
0
);
if
(
bRet
&&
(
nVal
==
AUTOFORMAT_OLD_DATA_ID
))
{
aName
=
rStream
.
ReadUniOrByteString
(
rStream
.
GetStreamCharSet
()
);
sal_Bool
b
;
rStream
>>
b
;
bIncludeFont
=
b
;
rStream
>>
b
;
bIncludeJustify
=
b
;
rStream
>>
b
;
bIncludeFrame
=
b
;
rStream
>>
b
;
bIncludeBackground
=
b
;
rStream
>>
b
;
bIncludeValueFormat
=
b
;
rStream
>>
b
;
bIncludeWidthHeight
=
b
;
bRet
=
0
==
rStream
.
GetError
();
for
(
sal_uInt16
i
=
0
;
bRet
&&
i
<
16
;
i
++
)
bRet
=
GetField
(
i
).
LoadOld
(
rStream
,
rVersions
);
}
else
bRet
=
false
;
return
bRet
;
}
#endif
bool
ScAutoFormatData
::
Save
(
SvStream
&
rStream
,
sal_uInt16
fileVersion
)
{
sal_uInt16
nVal
=
AUTOFORMAT_DATA_ID
;
...
...
@@ -1151,47 +1078,8 @@ bool ScAutoFormat::Load()
insert
(
pData
);
}
}
#ifdef READ_OLDVERS
else
{
if
(
AUTOFORMAT_OLD_ID_NEW
==
nVal
)
{
// alte Version der Versions laden
rStream
>>
m_aVersions
.
nFontVersion
;
rStream
>>
m_aVersions
.
nFontHeightVersion
;
rStream
>>
m_aVersions
.
nWeightVersion
;
rStream
>>
m_aVersions
.
nPostureVersion
;
rStream
>>
m_aVersions
.
nUnderlineVersion
;
rStream
>>
m_aVersions
.
nCrossedOutVersion
;
rStream
>>
m_aVersions
.
nContourVersion
;
rStream
>>
m_aVersions
.
nShadowedVersion
;
rStream
>>
m_aVersions
.
nColorVersion
;
rStream
>>
m_aVersions
.
nHorJustifyVersion
;
rStream
>>
m_aVersions
.
nVerJustifyVersion
;
rStream
>>
m_aVersions
.
nOrientationVersion
;
rStream
>>
m_aVersions
.
nBoolVersion
;
rStream
>>
m_aVersions
.
nMarginVersion
;
rStream
>>
m_aVersions
.
nBoxVersion
;
rStream
>>
m_aVersions
.
nBrushVersion
;
}
if
(
AUTOFORMAT_OLD_ID_OLD
==
nVal
||
AUTOFORMAT_OLD_ID_NEW
==
nVal
)
{
ScAutoFormatData
*
pData
;
sal_uInt16
nAnz
=
0
;
rStream
>>
nAnz
;
bRet
=
0
==
rStream
.
GetError
();
for
(
sal_uInt16
i
=
0
;
bRet
&&
(
i
<
nAnz
);
++
i
)
{
pData
=
new
ScAutoFormatData
();
bRet
=
pData
->
LoadOld
(
rStream
,
m_aVersions
);
insert
(
pData
);
}
}
else
bRet
=
false
;
}
#endif
bRet
=
false
;
}
}
mbSaveLater
=
false
;
...
...
sw/inc/tblafmt.hxx
Dosyayı görüntüle @
3aa74a27
...
...
@@ -190,11 +190,6 @@ public:
sal_Bool
Load
(
SvStream
&
rStream
,
const
SwAfVersions
&
rVersions
,
sal_uInt16
nVer
);
sal_Bool
Save
(
SvStream
&
rStream
,
sal_uInt16
fileVersion
)
const
;
sal_Bool
SaveVersionNo
(
SvStream
&
rStream
,
sal_uInt16
fileVersion
)
const
;
#ifdef READ_OLDVERS
// load old version.
sal_Bool
LoadOld
(
SvStream
&
rStream
,
sal_uInt16
aLoadVer
[]
);
#endif
};
/*
...
...
@@ -308,11 +303,6 @@ public:
sal_Bool
Load
(
SvStream
&
rStream
,
const
SwAfVersions
&
);
sal_Bool
Save
(
SvStream
&
rStream
,
sal_uInt16
fileVersion
)
const
;
#ifdef READ_OLDVERS
// Load old versions.
sal_Bool
LoadOld
(
SvStream
&
rStream
,
sal_uInt16
aLoadVer
[]
);
#endif
};
typedef
SwTableAutoFmt
*
SwTableAutoFmtPtr
;
...
...
sw/source/core/doc/tblafmt.cxx
Dosyayı görüntüle @
3aa74a27
...
...
@@ -43,8 +43,6 @@
#include <swtable.hxx>
#include <swtblfmt.hxx>
#include <com/sun/star/text/VertOrientation.hpp>
#define READ_OLDVERS // read the old version for a start
#include <swtypes.hxx>
#include <doc.hxx>
#include <poolfmt.hxx>
...
...
@@ -95,14 +93,6 @@ const sal_uInt16 AUTOFORMAT_ID = AUTOFORMAT_ID_31005;
const
sal_uInt16
AUTOFORMAT_DATA_ID
=
AUTOFORMAT_DATA_ID_31005
;
const
sal_uInt16
AUTOFORMAT_FILE_VERSION
=
SOFFICE_FILEFORMAT_50
;
#ifdef READ_OLDVERS
const
sal_uInt16
AUTOFORMAT_OLD_ID
=
8201
;
const
sal_uInt16
AUTOFORMAT_OLD_ID1
=
8301
;
const
sal_uInt16
AUTOFORMAT_OLD_DATA_ID
=
8202
;
#endif
SwBoxAutoFmt
*
SwTableAutoFmt
::
pDfltBoxAutoFmt
=
0
;
#define sAutoTblFmtName "autotbl.fmt"
...
...
@@ -516,38 +506,6 @@ sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, s
return
0
==
rStream
.
GetError
();
}
#ifdef READ_OLDVERS
sal_Bool
SwBoxAutoFmt
::
LoadOld
(
SvStream
&
rStream
,
sal_uInt16
aLoadVer
[]
)
{
SfxPoolItem
*
pNew
;
READ
(
aFont
,
SvxFontItem
,
0
)
if
(
rStream
.
GetStreamCharSet
()
==
aFont
.
GetCharSet
()
)
aFont
.
SetCharSet
(
::
osl_getThreadTextEncoding
());
READ
(
aHeight
,
SvxFontHeightItem
,
1
)
READ
(
aWeight
,
SvxWeightItem
,
2
)
READ
(
aPosture
,
SvxPostureItem
,
3
)
READ
(
aUnderline
,
SvxUnderlineItem
,
4
)
READ
(
aCrossedOut
,
SvxCrossedOutItem
,
5
)
READ
(
aContour
,
SvxContourItem
,
6
)
READ
(
aShadowed
,
SvxShadowedItem
,
7
)
READ
(
aColor
,
SvxColorItem
,
8
)
pNew
=
aAdjust
.
Create
(
rStream
,
aLoadVer
[
9
]
);
SetAdjust
(
*
(
SvxAdjustItem
*
)
pNew
);
delete
pNew
;
READ
(
aBox
,
SvxBoxItem
,
10
)
READ
(
aBackground
,
SvxBrushItem
,
11
)
return
0
==
rStream
.
GetError
();
}
#endif
sal_Bool
SwBoxAutoFmt
::
Save
(
SvStream
&
rStream
,
sal_uInt16
fileVersion
)
const
{
SvxOrientationItem
aOrientation
(
aRotateAngle
.
GetValue
(),
aStacked
.
GetValue
(),
0
);
...
...
@@ -1027,43 +985,6 @@ sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions
return
bRet
;
}
#ifdef READ_OLDVERS
sal_Bool
SwTableAutoFmt
::
LoadOld
(
SvStream
&
rStream
,
sal_uInt16
aLoadVer
[]
)
{
sal_Bool
bRet
=
sal_True
;
sal_uInt16
nVal
=
0
;
rStream
>>
nVal
;
bRet
=
0
==
rStream
.
GetError
();
if
(
bRet
&&
(
AUTOFORMAT_OLD_DATA_ID
==
nVal
))
{
sal_Bool
b
;
aName
=
rStream
.
ReadUniOrByteString
(
rStream
.
GetStreamCharSet
()
);
rStream
>>
b
;
bInclFont
=
b
;
rStream
>>
b
;
bInclJustify
=
b
;
rStream
>>
b
;
bInclFrame
=
b
;
rStream
>>
b
;
bInclBackground
=
b
;
bRet
=
(
rStream
.
GetError
()
==
0
);
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
SwBoxAutoFmt
*
pFmt
=
new
SwBoxAutoFmt
;
bRet
=
pFmt
->
LoadOld
(
rStream
,
aLoadVer
);
if
(
bRet
)
aBoxAutoFmt
[
i
]
=
pFmt
;
else
{
delete
pFmt
;
break
;
}
}
}
return
bRet
;
}
#endif
sal_Bool
SwTableAutoFmt
::
Save
(
SvStream
&
rStream
,
sal_uInt16
fileVersion
)
const
{
sal_uInt16
nVal
=
AUTOFORMAT_DATA_ID
;
...
...
@@ -1252,37 +1173,10 @@ sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream )
}
}
}
#ifdef READ_OLDVERS
else
if
(
AUTOFORMAT_OLD_ID
==
nVal
||
AUTOFORMAT_OLD_ID1
==
nVal
)
else
{
SwTableAutoFmt
*
pNew
;
sal_uInt16
nAnz
=
0
;
rStream
>>
nAnz
;
sal_uInt16
aArr
[
12
];
memset
(
aArr
,
0
,
12
*
sizeof
(
sal_uInt16
)
);
if
(
AUTOFORMAT_OLD_ID1
==
nVal
)
for
(
sal_uInt16
n
=
0
;
n
<
12
;
++
n
)
rStream
>>
aArr
[
n
];
bRet
=
0
==
rStream
.
GetError
();
for
(
sal_uInt16
i
=
0
;
i
<
nAnz
;
++
i
)
{
pNew
=
new
SwTableAutoFmt
(
aEmptyStr
);
bRet
=
pNew
->
LoadOld
(
rStream
,
aArr
);
if
(
bRet
)
{
Insert
(
pNew
,
Count
()
);
}
else
{
delete
pNew
;
break
;
}
}
bRet
=
false
;
}
#endif
}
}
return
bRet
;
...
...
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