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
55c03ebd
Kaydet (Commit)
55c03ebd
authored
Şub 13, 2012
tarafından
Nicolas Christener
Kaydeden (comit)
Jan Holesovsky
Şub 27, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
translate german comments
üst
037d14ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
35 deletions
+30
-35
colfrm.cxx
sw/source/core/layout/colfrm.cxx
+30
-35
No files found.
sw/source/core/layout/colfrm.cxx
Dosyayı görüntüle @
55c03ebd
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
#include "frmtool.hxx"
#include "frmtool.hxx"
#include "colfrm.hxx"
#include "colfrm.hxx"
#include "pagefrm.hxx"
#include "pagefrm.hxx"
#include "bodyfrm.hxx" // ColumnFrms
jetzt mit
BodyFrm
#include "bodyfrm.hxx" // ColumnFrms
now with
BodyFrm
#include "rootfrm.hxx" // wg. RemoveFtns
#include "rootfrm.hxx" // wg. RemoveFtns
#include "sectfrm.hxx" // wg. FtnAtEnd-Flag
#include "sectfrm.hxx" // wg. FtnAtEnd-Flag
#include "switerator.hxx"
#include "switerator.hxx"
...
@@ -60,7 +60,7 @@ SwColumnFrm::SwColumnFrm( SwFrmFmt *pFmt, SwFrm* pSib ):
...
@@ -60,7 +60,7 @@ SwColumnFrm::SwColumnFrm( SwFrmFmt *pFmt, SwFrm* pSib ):
{
{
nType
=
FRMC_COLUMN
;
nType
=
FRMC_COLUMN
;
SwBodyFrm
*
pColBody
=
new
SwBodyFrm
(
pFmt
->
GetDoc
()
->
GetDfltFrmFmt
(),
pSib
);
SwBodyFrm
*
pColBody
=
new
SwBodyFrm
(
pFmt
->
GetDoc
()
->
GetDfltFrmFmt
(),
pSib
);
pColBody
->
InsertBehind
(
this
,
0
);
// ColumnFrms
jetzt mit
BodyFrm
pColBody
->
InsertBehind
(
this
,
0
);
// ColumnFrms
now with
BodyFrm
SetMaxFtnHeight
(
LONG_MAX
);
SetMaxFtnHeight
(
LONG_MAX
);
}
}
...
@@ -70,8 +70,8 @@ SwColumnFrm::~SwColumnFrm()
...
@@ -70,8 +70,8 @@ SwColumnFrm::~SwColumnFrm()
SwDoc
*
pDoc
;
SwDoc
*
pDoc
;
if
(
!
(
pDoc
=
pFmt
->
GetDoc
())
->
IsInDtor
()
&&
pFmt
->
IsLastDepend
()
)
if
(
!
(
pDoc
=
pFmt
->
GetDoc
())
->
IsInDtor
()
&&
pFmt
->
IsLastDepend
()
)
{
{
//I
ch bin der einzige, weg mit dem F
ormat.
//I
'm the only one, delete the f
ormat.
//
Vorher ummelden, damit die Basisklasse noch klarkomm
t.
//
Get default format before, so the base class can cope with i
t.
pDoc
->
GetDfltFrmFmt
()
->
Add
(
this
);
pDoc
->
GetDfltFrmFmt
()
->
Add
(
this
);
pDoc
->
DelFrmFmt
(
pFmt
);
pDoc
->
DelFrmFmt
(
pFmt
);
}
}
...
@@ -100,7 +100,7 @@ void MA_FASTCALL lcl_RemoveColumns( SwLayoutFrm *pCont, sal_uInt16 nCnt )
...
@@ -100,7 +100,7 @@ void MA_FASTCALL lcl_RemoveColumns( SwLayoutFrm *pCont, sal_uInt16 nCnt )
{
{
SwColumnFrm
*
pTmp
=
(
SwColumnFrm
*
)
pColumn
->
GetPrev
();
SwColumnFrm
*
pTmp
=
(
SwColumnFrm
*
)
pColumn
->
GetPrev
();
pColumn
->
Cut
();
pColumn
->
Cut
();
delete
pColumn
;
//
Format wird ggf. im DTor mit vernichtet
.
delete
pColumn
;
//
format is going to be destroyed in the DTor if needed
.
pColumn
=
pTmp
;
pColumn
=
pTmp
;
}
}
}
}
...
@@ -128,11 +128,10 @@ static sal_Bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
...
@@ -128,11 +128,10 @@ static sal_Bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
SwDoc
*
pDoc
=
pCont
->
GetFmt
()
->
GetDoc
();
SwDoc
*
pDoc
=
pCont
->
GetFmt
()
->
GetDoc
();
const
sal_Bool
bMod
=
pDoc
->
IsModified
();
const
sal_Bool
bMod
=
pDoc
->
IsModified
();
//Format sollen soweit moeglich geshared werden. Wenn es also schon einen
//Formats should be shared whenever possible. If a neighbour already has
//Nachbarn mit den selben Spalteneinstellungen gibt, so koennen die
//the same column settings we can add them to the same format.
//Spalten an die selben Formate gehaengt werden.
//The neighbour can be searched using the format, however the owner of the
//Der Nachbar kann ueber das Format gesucht werden, wer der Owner des Attributes
//attribute depends on the frame type.
//ist, ist allerdings vom Frametyp abhaengig.
SwLayoutFrm
*
pAttrOwner
=
pCont
;
SwLayoutFrm
*
pAttrOwner
=
pCont
;
if
(
pCont
->
IsBodyFrm
()
)
if
(
pCont
->
IsBodyFrm
()
)
pAttrOwner
=
pCont
->
FindPageFrm
();
pAttrOwner
=
pCont
->
FindPageFrm
();
...
@@ -228,24 +227,22 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
...
@@ -228,24 +227,22 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
else
else
bAtEnd
=
sal_False
;
bAtEnd
=
sal_False
;
//
Einstellung der Spaltenbreiten ist nur bei neuen Formaten notwendig
.
//
Setting the column width is only needed for new formats
.
sal_Bool
bAdjustAttributes
=
nOldNum
!=
rOld
.
GetNumCols
();
sal_Bool
bAdjustAttributes
=
nOldNum
!=
rOld
.
GetNumCols
();
//Wenn die Spaltenanzahl unterschiedlich ist, wird der Inhalt
//The content is saved and restored if the column count is different.
//gesichert und restored.
SwFrm
*
pSave
=
0
;
SwFrm
*
pSave
=
0
;
if
(
nOldNum
!=
nNewNum
||
bChgFtn
)
if
(
nOldNum
!=
nNewNum
||
bChgFtn
)
{
{
SwDoc
*
pDoc
=
GetFmt
()
->
GetDoc
();
SwDoc
*
pDoc
=
GetFmt
()
->
GetDoc
();
OSL_ENSURE
(
pDoc
,
"FrmFmt
gibt kein Dokument her
."
);
OSL_ENSURE
(
pDoc
,
"FrmFmt
doesn't return a document
."
);
// SaveCntnt w
uerde auch den Inhalt der Fussnotencontainer aufsaugen
// SaveCntnt w
ould also suck up the content of the footnote container
//
und im normalen Textfluss unterbringen
.
//
and store it within the normal text flow
.
if
(
IsPageBodyFrm
()
)
if
(
IsPageBodyFrm
()
)
pDoc
->
GetCurrentLayout
()
->
RemoveFtns
(
(
SwPageFrm
*
)
GetUpper
(),
sal_True
,
sal_False
);
//swmod 080218
pDoc
->
GetCurrentLayout
()
->
RemoveFtns
(
(
SwPageFrm
*
)
GetUpper
(),
sal_True
,
sal_False
);
//swmod 080218
pSave
=
::
SaveCntnt
(
this
);
pSave
=
::
SaveCntnt
(
this
);
//Wenn Spalten existieren, jetzt aber eine Spaltenanzahl von
//If columns exist, they get deleted if a column count of 0 or 1 is requested.
//0 oder eins gewuenscht ist, so werden die Spalten einfach vernichtet.
if
(
nNewNum
==
1
&&
!
bAtEnd
)
if
(
nNewNum
==
1
&&
!
bAtEnd
)
{
{
::
lcl_RemoveColumns
(
this
,
nOldNum
);
::
lcl_RemoveColumns
(
this
,
nOldNum
);
...
@@ -296,11 +293,11 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
...
@@ -296,11 +293,11 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
}
}
}
}
//
Sodele, jetzt koennen die Spalten bequem eingestellt werden
.
//
The columns can now be easily adjusted
.
AdjustColumns
(
&
rNew
,
bAdjustAttributes
);
AdjustColumns
(
&
rNew
,
bAdjustAttributes
);
//
Erst jetzt den Inhalt restaurieren. Ein frueheres Restaurieren wuerde
//
Don't restore the content before. An earlier restore would trigger useless
//
unnuetzte Aktionen beim Einstellen zur Folge haben
.
//
actions during setup
.
if
(
pSave
)
if
(
pSave
)
{
{
OSL_ENSURE
(
Lower
()
&&
Lower
()
->
IsLayoutFrm
()
&&
OSL_ENSURE
(
Lower
()
&&
Lower
()
->
IsLayoutFrm
()
&&
...
@@ -329,9 +326,8 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
...
@@ -329,9 +326,8 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
SwRectFn
fnRect
=
bVert
?
(
IsVertLR
()
?
fnRectVertL2R
:
fnRectVert
)
:
fnRectHori
;
SwRectFn
fnRect
=
bVert
?
(
IsVertLR
()
?
fnRectVertL2R
:
fnRectVert
)
:
fnRectHori
;
//Ist ein Pointer da, oder sollen wir die Attribute einstellen,
//If we have a pointer or we have to configure an attribute, we set the
//so stellen wir auf jeden Fall die Spaltenbreiten ein. Andernfalls
//column widths in any case. Otherwise we check if a configuration is needed.
//checken wir, ob eine Einstellung notwendig ist.
if
(
!
pAttr
)
if
(
!
pAttr
)
{
{
pAttr
=
&
GetFmt
()
->
GetCol
();
pAttr
=
&
GetFmt
()
->
GetCol
();
...
@@ -347,9 +343,8 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
...
@@ -347,9 +343,8 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
}
}
}
}
//Sodele, jetzt koennen die Spalten bequem eingestellt werden.
//The columns can now be easily adjusted.
//Die Breiten werden mitgezaehlt, damit wir dem letzten den Rest geben
//The widths get counted so we can give the reminder to the last one.
//koennen.
SwTwips
nAvail
=
(
Prt
().
*
fnRect
->
fnGetWidth
)();
SwTwips
nAvail
=
(
Prt
().
*
fnRect
->
fnGetWidth
)();
const
sal_Bool
bLine
=
pAttr
->
GetLineAdj
()
!=
COLADJ_NONE
;
const
sal_Bool
bLine
=
pAttr
->
GetLineAdj
()
!=
COLADJ_NONE
;
const
sal_uInt16
nMin
=
bLine
?
sal_uInt16
(
20
+
(
pAttr
->
GetLineWidth
()
/
2
)
)
:
0
;
const
sal_uInt16
nMin
=
bLine
?
sal_uInt16
(
20
+
(
pAttr
->
GetLineWidth
()
/
2
)
)
:
0
;
...
@@ -377,10 +372,10 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
...
@@ -377,10 +372,10 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
pCol
->
ChgSize
(
aColSz
);
pCol
->
ChgSize
(
aColSz
);
//
Hierdurch werden die ColumnBodyFrms von Seitenspalten angepasst u
nd
//
With this, the ColumnBodyFrms from page columns gets adjusted a
nd
//
ihr bFixHeight-Flag wird gesetzt, damit sie nicht schrumpfen/wachsen
.
//
their bFixHeight flag is set so they won't shrink/grow
.
//
Bei Rahmenspalten hingegen soll das Flag _nicht_ gesetzt werden,
//
Don't use the flag with border columns because BodyFrms in border
//
da BodyFrms in Rahmenspalten durchaus wachsen/schrumpfen duerfen
.
//
columns can grow/shrink
.
if
(
IsBodyFrm
()
)
if
(
IsBodyFrm
()
)
((
SwLayoutFrm
*
)
pCol
)
->
Lower
()
->
ChgSize
(
aColSz
);
((
SwLayoutFrm
*
)
pCol
)
->
Lower
()
->
ChgSize
(
aColSz
);
...
@@ -393,10 +388,10 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
...
@@ -393,10 +388,10 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
const
SwAttrSet
*
pSet
=
pCol
->
GetAttrSet
();
const
SwAttrSet
*
pSet
=
pCol
->
GetAttrSet
();
SvxLRSpaceItem
aLR
(
pSet
->
GetLRSpace
()
);
SvxLRSpaceItem
aLR
(
pSet
->
GetLRSpace
()
);
//
Damit die Trennlinien Platz finden, muessen sie hier
//
In order to have enough space for the separation lines, we have to
//
Beruecksichtigung finden. Ueberall wo zwei Spalten aufeinanderstossen
//
take them into account here. Every time two columns meet we
//
wird jeweils rechts bzw. links ein Sicherheitsabstand von 20 plus
//
calculate a clearance of 20 + half the pen width on the left or
//
der halben Penbreite einkalkuliert
.
//
right side, respectively
.
const
sal_uInt16
nLeft
=
pC
->
GetLeft
();
const
sal_uInt16
nLeft
=
pC
->
GetLeft
();
const
sal_uInt16
nRight
=
pC
->
GetRight
();
const
sal_uInt16
nRight
=
pC
->
GetRight
();
...
...
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