[Libreoffice-commits] core.git: 5 commits - basebmp/README libreofficekit/source sd/source sw/qa sw/source writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Sep 28 00:28:22 PDT 2015
basebmp/README | 2
libreofficekit/source/gtk/lokdocview.cxx | 28 +++----
libreofficekit/source/gtk/tilebuffer.cxx | 11 ++-
libreofficekit/source/gtk/tilebuffer.hxx | 3
sd/source/ui/view/viewshel.cxx | 14 +--
sw/qa/extras/ooxmlimport/data/tdf90153.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 6 +
sw/source/core/inc/txtfrm.hxx | 92 +++++++++++++-------------
sw/source/core/text/frmform.cxx | 2
sw/source/core/text/txtcache.cxx | 10 +-
sw/source/core/text/txtfrm.cxx | 54 +++++++--------
sw/source/core/text/txtftn.cxx | 16 ++--
writerfilter/source/dmapper/GraphicImport.cxx | 8 +-
13 files changed, 132 insertions(+), 114 deletions(-)
New commits:
commit 0067b4df75cdbeb325024cd2b66e3d64fe8b3fcd
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Sep 28 09:06:10 2015 +0200
libreofficekit: fix mismatched free() / delete
Change-Id: I60eb53d4bf9943fd52e0a9d8e3574a7d1cc027e0
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index d96436b..8d218f4 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -314,7 +314,7 @@ signalKey (GtkWidget* pWidget, GdkEventKey* pEvent)
pLOEvent->m_nKeyEvent = LOK_KEYEVENT_KEYUP;
pLOEvent->m_nCharCode = nCharCode;
pLOEvent->m_nKeyCode = nKeyCode;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
}
@@ -325,7 +325,7 @@ signalKey (GtkWidget* pWidget, GdkEventKey* pEvent)
pLOEvent->m_nKeyEvent = LOK_KEYEVENT_KEYINPUT;
pLOEvent->m_nCharCode = nCharCode;
pLOEvent->m_nKeyCode = nKeyCode;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
}
@@ -951,7 +951,7 @@ lok_doc_view_signal_button(GtkWidget* pWidget, GdkEventButton* pEvent)
pLOEvent->m_nSetGraphicSelectionType = LOK_SETGRAPHICSELECTION_END;
pLOEvent->m_nSetGraphicSelectionX = pixelToTwip(pEvent->x, priv->m_fZoom);
pLOEvent->m_nSetGraphicSelectionY = pixelToTwip(pEvent->y, priv->m_fZoom);
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -970,7 +970,7 @@ lok_doc_view_signal_button(GtkWidget* pWidget, GdkEventButton* pEvent)
pLOEvent->m_nSetGraphicSelectionType = LOK_SETGRAPHICSELECTION_END;
pLOEvent->m_nSetGraphicSelectionX = pixelToTwip(pEvent->x, priv->m_fZoom);
pLOEvent->m_nSetGraphicSelectionY = pixelToTwip(pEvent->y, priv->m_fZoom);
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -1019,7 +1019,7 @@ lok_doc_view_signal_button(GtkWidget* pWidget, GdkEventButton* pEvent)
pLOEvent->m_nSetGraphicSelectionType = LOK_SETGRAPHICSELECTION_START;
pLOEvent->m_nSetGraphicSelectionX = pixelToTwip(priv->m_aGraphicHandleRects[i].x + priv->m_aGraphicHandleRects[i].width / 2, priv->m_fZoom);
pLOEvent->m_nSetGraphicSelectionY = pixelToTwip(priv->m_aGraphicHandleRects[i].y + priv->m_aGraphicHandleRects[i].height / 2, priv->m_fZoom);
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -1047,7 +1047,7 @@ lok_doc_view_signal_button(GtkWidget* pWidget, GdkEventButton* pEvent)
pLOEvent->m_nPostMouseEventX = pixelToTwip(pEvent->x, priv->m_fZoom);
pLOEvent->m_nPostMouseEventY = pixelToTwip(pEvent->y, priv->m_fZoom);
pLOEvent->m_nPostMouseEventCount = nCount;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -1065,7 +1065,7 @@ lok_doc_view_signal_button(GtkWidget* pWidget, GdkEventButton* pEvent)
pLOEvent->m_nPostMouseEventX = pixelToTwip(pEvent->x, priv->m_fZoom);
pLOEvent->m_nPostMouseEventY = pixelToTwip(pEvent->y, priv->m_fZoom);
pLOEvent->m_nPostMouseEventCount = nCount;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -1153,7 +1153,7 @@ lok_doc_view_signal_motion (GtkWidget* pWidget, GdkEventMotion* pEvent)
pLOEvent->m_nSetGraphicSelectionType = LOK_SETGRAPHICSELECTION_START;
pLOEvent->m_nSetGraphicSelectionX = pixelToTwip(pEvent->x, priv->m_fZoom);
pLOEvent->m_nSetGraphicSelectionY = pixelToTwip(pEvent->y, priv->m_fZoom);
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -1169,7 +1169,7 @@ lok_doc_view_signal_motion (GtkWidget* pWidget, GdkEventMotion* pEvent)
pLOEvent->m_nPostMouseEventX = pixelToTwip(pEvent->x, priv->m_fZoom);
pLOEvent->m_nPostMouseEventY = pixelToTwip(pEvent->y, priv->m_fZoom);
pLOEvent->m_nPostMouseEventCount = 1;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -1891,7 +1891,7 @@ lok_doc_view_open_document (LOKDocView* pDocView,
pLOEvent->m_pPath = pPath;
priv->m_aDocPath = pPath;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -1953,7 +1953,7 @@ lok_doc_view_set_part (LOKDocView* pDocView, int nPart)
LOEvent* pLOEvent = new LOEvent(LOK_SET_PART);
pLOEvent->m_nPart = nPart;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -1975,7 +1975,7 @@ lok_doc_view_set_partmode(LOKDocView* pDocView,
GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
LOEvent* pLOEvent = new LOEvent(LOK_SET_PARTMODE);
pLOEvent->m_nPartMode = nPartMode;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -1997,7 +1997,7 @@ lok_doc_view_set_edit(LOKDocView* pDocView,
GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
LOEvent* pLOEvent = new LOEvent(LOK_SET_EDIT);
pLOEvent->m_bEdit = bEdit;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
@@ -2022,7 +2022,7 @@ lok_doc_view_post_command (LOKDocView* pDocView,
pLOEvent->m_pCommand = pCommand;
pLOEvent->m_pArguments = g_strdup(pArguments);
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
g_object_unref(task);
}
diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx
index 75c3d0d..091d33a 100644
--- a/libreofficekit/source/gtk/tilebuffer.cxx
+++ b/libreofficekit/source/gtk/tilebuffer.cxx
@@ -67,7 +67,7 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task,
pLOEvent->m_nPaintTileX = x;
pLOEvent->m_nPaintTileY = y;
pLOEvent->m_fPaintTileZoom = fZoom;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(lokThreadPool, g_object_ref(task), NULL);
}
}
@@ -83,7 +83,7 @@ Tile& TileBuffer::getTile(int x, int y, float fZoom, GTask* task,
pLOEvent->m_nPaintTileX = x;
pLOEvent->m_nPaintTileY = y;
pLOEvent->m_fPaintTileZoom = fZoom;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(lokThreadPool, g_object_ref(task), NULL);
return m_mTiles[index];
}
@@ -93,7 +93,7 @@ Tile& TileBuffer::getTile(int x, int y, float fZoom, GTask* task,
pLOEvent->m_nPaintTileX = x;
pLOEvent->m_nPaintTileY = y;
pLOEvent->m_fPaintTileZoom = fZoom;
- g_task_set_task_data(task, pLOEvent, g_free);
+ g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
g_thread_pool_push(lokThreadPool, g_object_ref(task), NULL);
return m_DummyTile;
}
@@ -101,5 +101,10 @@ Tile& TileBuffer::getTile(int x, int y, float fZoom, GTask* task,
return m_mTiles[index];
}
+void LOEvent::destroy(void* pMemory)
+{
+ LOEvent* pLOEvent = static_cast<LOEvent*>(pMemory);
+ delete pLOEvent;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/libreofficekit/source/gtk/tilebuffer.hxx b/libreofficekit/source/gtk/tilebuffer.hxx
index 750ff79..5a989fc 100644
--- a/libreofficekit/source/gtk/tilebuffer.hxx
+++ b/libreofficekit/source/gtk/tilebuffer.hxx
@@ -235,6 +235,9 @@ struct LOEvent
, m_nSetGraphicSelectionY(0)
{
}
+
+ /// Wrapper around delete to help GLib.
+ static void destroy(void* pMemory);
};
#endif // INCLUDED_TILEBUFFER_HXX
commit 6a9f985ea698355f38c1681c1eb276f8b9dd859c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Sep 28 09:05:18 2015 +0200
sd tiled rendering: avoid passing explicit 0 vcl::Window
Seen as dereferenced in svx for Impress table handling, and doing some
logic <-> pixel conversion -- and mpActiveWindow not being 0 in that
case.
Change-Id: I7f7c41a7d366704f6f8b9a7971f763c6661c8799
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index a582896..de5ebb1 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -506,7 +506,7 @@ void ViewShell::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
Point aPoint = mpActiveWindow->GetPointerPosPixel();
mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel());
- MouseButtonDown(rMouseEvent, 0);
+ MouseButtonDown(rMouseEvent, mpActiveWindow);
mpActiveWindow->SetPointerPosPixel(aPoint);
}
@@ -519,7 +519,7 @@ void ViewShell::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
Point aPoint = mpActiveWindow->GetPointerPosPixel();
mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel());
- MouseButtonUp(rMouseEvent, 0);
+ MouseButtonUp(rMouseEvent, mpActiveWindow);
mpActiveWindow->SetPointerPosPixel(aPoint);
}
@@ -532,7 +532,7 @@ void ViewShell::LogicMouseMove(const MouseEvent& rMouseEvent)
Point aPoint = mpActiveWindow->GetPointerPosPixel();
mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel());
- MouseMove(rMouseEvent, 0);
+ MouseMove(rMouseEvent, mpActiveWindow);
mpActiveWindow->SetPointerPosPixel(aPoint);
}
@@ -616,16 +616,16 @@ void ViewShell::SetGraphicMm100Position(bool bStart, const Point& rPosition)
if (bStart)
{
MouseEvent aClickEvent(rPosition, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT);
- MouseButtonDown(aClickEvent, 0);
+ MouseButtonDown(aClickEvent, mpActiveWindow);
MouseEvent aMoveEvent(Point(rPosition.getX(), rPosition.getY()), 0, MouseEventModifiers::SIMPLEMOVE, MOUSE_LEFT);
- MouseMove(aMoveEvent, 0);
+ MouseMove(aMoveEvent, mpActiveWindow);
}
else
{
MouseEvent aMoveEvent(Point(rPosition.getX(), rPosition.getY()), 0, MouseEventModifiers::SIMPLEMOVE, MOUSE_LEFT);
- MouseMove(aMoveEvent, 0);
+ MouseMove(aMoveEvent, mpActiveWindow);
MouseEvent aClickEvent(rPosition, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT);
- MouseButtonUp(aClickEvent, 0);
+ MouseButtonUp(aClickEvent, mpActiveWindow);
}
}
commit b54966401d9af466120e05daa81f1ec47a43353b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Sep 28 09:04:20 2015 +0200
basebmp: -headless -> --headless
Change-Id: Iedabcbd3c2582472f56f003ab30298f656f2ac46
diff --git a/basebmp/README b/basebmp/README
index 7087cea..fb93f51 100644
--- a/basebmp/README
+++ b/basebmp/README
@@ -4,6 +4,6 @@ Provides algorithms and data types for bitmap graphics e.g. line and fill
polygon scan conversion, bitmap format iterators, and a SalGraphics-compatible
software renderer
-Used for example for wmf / svm files. E.g. used when you do -headless, and
+Used for example for wmf / svm files. E.g. used when you do --headless, and
have no DISPLAY set - it's an all-software backend for the LibO graphic
backend. also see [git:vcl/headless].
commit 358666e4204364ce915ee95372dc6f2fca545253
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Sep 28 09:03:13 2015 +0200
tdf#90153 DOCX import: fix default sw TextFrame roundtrip
The AnchorType of the shape was at-paragraph, which does not allow
line-level VertOrientRelation (which is correct, it would be undefined,
what line of the paragraph should be the used).
Fix this by changing the AnchorType to at-character in the line-level
case, which brings the filter in sync with the DOC one.
With this, import of a DOCX file that was created by inserting a
TextFrame into an empty document is roundtripped without shifting the
shape up considerably.
Change-Id: I6d85c38be859d6e730584f2349c857b87496a1d4
diff --git a/sw/qa/extras/ooxmlimport/data/tdf90153.docx b/sw/qa/extras/ooxmlimport/data/tdf90153.docx
new file mode 100644
index 0000000..decbfa2
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf90153.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 4f41751..b85af74 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2840,6 +2840,12 @@ DECLARE_OOXMLIMPORT_TEST(testTdf92124, "tdf92124.docx")
CPPUNIT_ASSERT(aSuffix.isEmpty());
}
+DECLARE_OOXMLIMPORT_TEST(testTdf90153, "tdf90153.docx")
+{
+ // This was at-para, so the line-level VertOrientRelation was lost, resulting in an incorrect vertical position.
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 4720f89..8161e55 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -816,8 +816,12 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
// If we are here, this is a drawingML shape. For those, only dmapper (and not oox) knows the anchoring infos (just like for Writer pictures).
// But they aren't Writer pictures, either (which are already handled above).
uno::Reference< beans::XPropertySet > xShapeProps(m_xShape, uno::UNO_QUERY_THROW);
- // This needs to be AT_PARAGRAPH and not AT_CHARACTER, otherwise shape will move when the user inserts a new paragraph.
- xShapeProps->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AT_PARAGRAPH));
+
+ // This needs to be AT_PARAGRAPH by default and not AT_CHARACTER, otherwise shape will move when the user inserts a new paragraph.
+ text::TextContentAnchorType eAnchorType = text::TextContentAnchorType_AT_PARAGRAPH;
+ if (m_pImpl->nVertRelation == text::RelOrientation::TEXT_LINE)
+ eAnchorType = text::TextContentAnchorType_AT_CHARACTER;
+ xShapeProps->setPropertyValue("AnchorType", uno::makeAny(eAnchorType));
//only the position orientation is handled in applyPosition()
m_pImpl->applyPosition(xShapeProps);
commit cb9832ef0ce2b48cbbc5e77024ddb5f933872960
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Sep 28 09:00:48 2015 +0200
sw: prefix members of SwTextFrm
Change-Id: I6eb284d1858c0ea6576e172b2ac8368e8458b4e8
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 3d4fa5a..72446da 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -60,8 +60,8 @@ class SwTextFrm: public SwContentFrm
static long nMinPrtLine; // This Line must not be underrun when printing
// Hack for table cells stretching multiple pages
- sal_uLong nAllLines :24; // Line count for the Paint (including nThisLines)
- sal_uLong nThisLines :8; // Count of Lines of the Frame
+ sal_uLong mnAllLines :24; // Line count for the Paint (including nThisLines)
+ sal_uLong mnThisLines :8; // Count of Lines of the Frame
// The x position for flys anchored at this paragraph.
// These values are calculated in SwTextFrm::CalcBaseOfstForFly()
@@ -78,9 +78,9 @@ class SwTextFrm: public SwContentFrm
// It is NOT used for the determination of printing area.
SwTwips mnAdditionalFirstLineOffset;
- sal_Int32 nOfst; // Is the offset in the Content (character count)
+ sal_Int32 mnOffset; // Is the offset in the Content (character count)
- sal_uInt16 nCacheIdx; // Index into the cache, USHRT_MAX if there's definitely no fitting object in the cache
+ sal_uInt16 mnCacheIndex; // Index into the cache, USHRT_MAX if there's definitely no fitting object in the cache
// Separates the Master and creates a Follow or adjusts the data in the Follow
void _AdjustFollow( SwTextFormatter &rLine, const sal_Int32 nOffset,
@@ -102,17 +102,17 @@ class SwTextFrm: public SwContentFrm
void FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrmBreak,
const sal_Int32 nStrLen, const bool bDummy );
- bool bLocked : 1; // In the Format?
- bool bWidow : 1; // Are we a Widow?
- bool bJustWidow : 1; // Did we just request to be a Widow?
- bool bEmpty : 1; // Are we an empty paragraph?
- bool bInFootnoteConnect : 1; // Is in Connect at the moment
- bool bFootnote : 1; // Has at least one footnote
- bool bRepaint : 1; // TextFrm: Repaint is ready to be fetched
- bool bBlinkPor : 1; // Contains Blink Portions
- bool bFieldFollow : 1; // Start with Field rest of the Master
- bool bHasAnimation : 1; // Contains animated SwGrfNumPortion
- bool bIsSwapped : 1; // during text formatting we swap the
+ bool mbLocked : 1; // In the Format?
+ bool mbWidow : 1; // Are we a Widow?
+ bool mbJustWidow : 1; // Did we just request to be a Widow?
+ bool mbEmpty : 1; // Are we an empty paragraph?
+ bool mbInFootnoteConnect : 1; // Is in Connect at the moment
+ bool mbFootnote : 1; // Has at least one footnote
+ bool mbRepaint : 1; // TextFrm: Repaint is ready to be fetched
+ bool mbHasBlinkPortions : 1; // Contains Blink Portions
+ bool mbFieldFollow : 1; // Start with Field rest of the Master
+ bool mbHasAnimation : 1; // Contains animated SwGrfNumPortion
+ bool mbIsSwapped : 1; // during text formatting we swap the
// width and height for vertical formatting
// OD 14.03.2003 #i11760# - flag to control, if follow is formatted in
// method <CalcFollow(..)>.
@@ -121,12 +121,12 @@ class SwTextFrm: public SwContentFrm
bool mbFollowFormatAllowed : 1;
void ResetPreps();
- inline void Lock() { bLocked = true; }
- inline void Unlock() { bLocked = false; }
- inline void SetWidow( const bool bNew ) { bWidow = bNew; }
- inline void SetJustWidow( const bool bNew ) { bJustWidow = bNew; }
- inline void SetEmpty( const bool bNew ) { bEmpty = bNew; }
- inline void SetFieldFollow( const bool bNew ) { bFieldFollow = bNew; }
+ inline void Lock() { mbLocked = true; }
+ inline void Unlock() { mbLocked = false; }
+ inline void SetWidow( const bool bNew ) { mbWidow = bNew; }
+ inline void SetJustWidow( const bool bNew ) { mbJustWidow = bNew; }
+ inline void SetEmpty( const bool bNew ) { mbEmpty = bNew; }
+ inline void SetFieldFollow( const bool bNew ) { mbFieldFollow = bNew; }
bool IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const;
@@ -309,10 +309,10 @@ public:
/// Methods to manage the FollowFrame
SwContentFrm *SplitFrm( const sal_Int32 nTextPos );
SwContentFrm *JoinFrm();
- inline sal_Int32 GetOfst() const { return nOfst; }
+ inline sal_Int32 GetOfst() const { return mnOffset; }
void _SetOfst( const sal_Int32 nNewOfst );
inline void SetOfst ( const sal_Int32 nNewOfst );
- inline void ManipOfst ( const sal_Int32 nNewOfst ){ nOfst = nNewOfst; }
+ inline void ManipOfst ( const sal_Int32 nNewOfst ){ mnOffset = nNewOfst; }
SwTextFrm *GetFrmAtPos ( const SwPosition &rPos);
inline const SwTextFrm *GetFrmAtPos ( const SwPosition &rPos) const;
SwTextFrm& GetFrmAtOfst( const sal_Int32 nOfst );
@@ -378,26 +378,26 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwTextFrm)
// Locking
- inline bool IsLocked() const { return bLocked; }
+ inline bool IsLocked() const { return mbLocked; }
- inline bool IsWidow() const { return bWidow; }
- inline bool IsJustWidow() const { return bJustWidow; }
- inline bool IsEmpty() const { return bEmpty; }
- inline bool HasFootnote() const { return bFootnote; }
- inline bool IsInFootnoteConnect()const { return bInFootnoteConnect;}
- inline bool IsFieldFollow() const { return bFieldFollow;}
+ inline bool IsWidow() const { return mbWidow; }
+ inline bool IsJustWidow() const { return mbJustWidow; }
+ inline bool IsEmpty() const { return mbEmpty; }
+ inline bool HasFootnote() const { return mbFootnote; }
+ inline bool IsInFootnoteConnect()const { return mbInFootnoteConnect;}
+ inline bool IsFieldFollow() const { return mbFieldFollow;}
inline void SetRepaint() const;
inline void ResetRepaint() const;
- inline bool HasRepaint() const { return bRepaint; }
+ inline bool HasRepaint() const { return mbRepaint; }
inline void SetBlinkPor() const;
inline void ResetBlinkPor() const;
- inline bool HasBlinkPor() const { return bBlinkPor; }
+ inline bool HasBlinkPor() const { return mbHasBlinkPortions; }
inline void SetAnimation() const
- { const_cast<SwTextFrm*>(this)->bHasAnimation = true; }
- inline bool HasAnimation() const { return bHasAnimation; }
+ { const_cast<SwTextFrm*>(this)->mbHasAnimation = true; }
+ inline bool HasAnimation() const { return mbHasAnimation; }
- inline bool IsSwapped() const { return bIsSwapped; }
+ inline bool IsSwapped() const { return mbIsSwapped; }
/// Does the Frm have a local footnote (in this Frm or Follow)?
#ifdef DBG_UTIL
@@ -456,7 +456,7 @@ public:
SwTextFrm* GetFormatted( bool bForceQuickFormat = false );
/// Will be moved soon
- inline void SetFootnote( const bool bNew ) { bFootnote = bNew; }
+ inline void SetFootnote( const bool bNew ) { mbFootnote = bNew; }
/// Respect the Follows
inline bool IsInside( const sal_Int32 nPos ) const;
@@ -472,8 +472,8 @@ public:
static long GetMinPrtLine() { return nMinPrtLine; }
- inline sal_uInt16 GetCacheIdx() const { return nCacheIdx; }
- inline void SetCacheIdx( const sal_uInt16 nNew ) { nCacheIdx = nNew; }
+ inline sal_uInt16 GetCacheIdx() const { return mnCacheIndex; }
+ inline void SetCacheIdx( const sal_uInt16 nNew ) { mnCacheIndex = nNew; }
/// Removes the Line information from the Cache
void ClearPara();
@@ -524,8 +524,8 @@ public:
sal_uInt16 GetLineCount( sal_Int32 nPos );
/// For displaying the line numbers
- sal_uLong GetAllLines() const { return nAllLines; }
- sal_uLong GetThisLines() const { return nThisLines;}
+ sal_uLong GetAllLines() const { return mnAllLines; }
+ sal_uLong GetThisLines() const { return mnThisLines;}
void RecalcAllLines();
/// Stops the animations within numberings
@@ -670,7 +670,7 @@ inline const SwParaPortion *SwTextFrm::GetPara() const
inline bool SwTextFrm::HasPara() const
{
- return nCacheIdx!=USHRT_MAX && _HasPara();
+ return mnCacheIndex!=USHRT_MAX && _HasPara();
}
inline SwTwips SwTextFrm::GrowTst( const SwTwips nGrow )
@@ -716,26 +716,26 @@ inline const SwTextFrm *SwTextFrm::GetFrmAtPos( const SwPosition &rPos) const
inline void SwTextFrm::SetOfst( const sal_Int32 nNewOfst )
{
- if ( nOfst != nNewOfst )
+ if ( mnOffset != nNewOfst )
_SetOfst( nNewOfst );
}
inline void SwTextFrm::SetRepaint() const
{
- const_cast<SwTextFrm*>(this)->bRepaint = true;
+ const_cast<SwTextFrm*>(this)->mbRepaint = true;
}
inline void SwTextFrm::ResetRepaint() const
{
- const_cast<SwTextFrm*>(this)->bRepaint = false;
+ const_cast<SwTextFrm*>(this)->mbRepaint = false;
}
inline void SwTextFrm::SetBlinkPor() const
{
- const_cast<SwTextFrm*>(this)->bBlinkPor = true;
+ const_cast<SwTextFrm*>(this)->mbHasBlinkPortions = true;
}
inline void SwTextFrm::ResetBlinkPor() const
{
- const_cast<SwTextFrm*>(this)->bBlinkPor = false;
+ const_cast<SwTextFrm*>(this)->mbHasBlinkPortions = false;
}
class TemporarySwap {
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 9ff3f4d..35876fc 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -746,7 +746,7 @@ void SwTextFrm::_SetOfst( const sal_Int32 nNewOfst )
// We do not need to invalidate out Follow.
// We are a Follow, get formatted right away and call
// SetOfst() from there
- nOfst = nNewOfst;
+ mnOffset = nNewOfst;
SwParaPortion *pPara = GetPara();
if( pPara )
{
diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx
index 389cb67..8988947 100644
--- a/sw/source/core/text/txtcache.cxx
+++ b/sw/source/core/text/txtcache.cxx
@@ -72,7 +72,7 @@ bool SwTextFrm::_HasPara() const
return true;
}
else
- const_cast<SwTextFrm*>(this)->nCacheIdx = USHRT_MAX;
+ const_cast<SwTextFrm*>(this)->mnCacheIndex = USHRT_MAX;
return false;
}
@@ -86,7 +86,7 @@ SwParaPortion *SwTextFrm::GetPara()
if ( pLine )
return pLine->GetPara();
else
- nCacheIdx = USHRT_MAX;
+ mnCacheIndex = USHRT_MAX;
}
return 0;
}
@@ -104,7 +104,7 @@ void SwTextFrm::ClearPara()
pTextLine->SetPara( 0 );
}
else
- nCacheIdx = USHRT_MAX;
+ mnCacheIndex = USHRT_MAX;
}
}
@@ -124,14 +124,14 @@ void SwTextFrm::SetPara( SwParaPortion *pNew, bool bDelete )
else
{
OSL_ENSURE( !pNew, "+SetPara: Losing SwParaPortion" );
- nCacheIdx = USHRT_MAX;
+ mnCacheIndex = USHRT_MAX;
}
}
else if ( pNew )
{ // Insert a new one
SwTextLine *pTextLine = new SwTextLine( this, pNew );
if ( SwTextFrm::GetTextCache()->Insert( pTextLine ) )
- nCacheIdx = pTextLine->GetCachePos();
+ mnCacheIndex = pTextLine->GetCachePos();
else
{
OSL_FAIL( "+SetPara: InsertCache failed." );
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 2e2e590..e4488ec 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -83,7 +83,7 @@ TYPEINIT1( SwTextFrm, SwContentFrm );
/// Switches width and height of the text frame
void SwTextFrm::SwapWidthAndHeight()
{
- if ( ! bIsSwapped )
+ if ( ! mbIsSwapped )
{
const long nPrtOfstX = Prt().Pos().X();
Prt().Pos().X() = Prt().Pos().Y();
@@ -110,7 +110,7 @@ void SwTextFrm::SwapWidthAndHeight()
Prt().Width( Prt().Height() );
Prt().Height( nPrtWidth );
- bIsSwapped = ! bIsSwapped;
+ mbIsSwapped = ! mbIsSwapped;
}
/**
@@ -139,7 +139,7 @@ void SwTextFrm::SwitchHorizontalToVertical( SwRect& rRect ) const
rRect.Left(Frm().Left() + nOfstY);
else
{
- if ( bIsSwapped )
+ if ( mbIsSwapped )
rRect.Left( Frm().Left() + Frm().Height() - nOfstY );
else
// frame is rotated
@@ -164,7 +164,7 @@ void SwTextFrm::SwitchHorizontalToVertical( Point& rPoint ) const
rPoint.X() = Frm().Left() + nOfstY;
else
{
- if ( bIsSwapped )
+ if ( mbIsSwapped )
rPoint.X() = Frm().Left() + Frm().Height() - nOfstY;
else
// calc rotated coords
@@ -198,7 +198,7 @@ void SwTextFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const
nOfstX = rRect.Left() - Frm().Left();
else
{
- if ( bIsSwapped )
+ if ( mbIsSwapped )
nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() );
else
nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() );
@@ -228,7 +228,7 @@ void SwTextFrm::SwitchVerticalToHorizontal( Point& rPoint ) const
nOfstX = rPoint.X() - Frm().Left();
else
{
- if ( bIsSwapped )
+ if ( mbIsSwapped )
nOfstX = Frm().Left() + Frm().Height() - rPoint.X();
else
nOfstX = Frm().Left() + Frm().Width() - rPoint.X();
@@ -351,26 +351,26 @@ void SwTextFrm::Init()
SwTextFrm::SwTextFrm(SwTextNode * const pNode, SwFrm* pSib )
: SwContentFrm( pNode, pSib )
- , nAllLines( 0 )
- , nThisLines( 0 )
+ , mnAllLines( 0 )
+ , mnThisLines( 0 )
, mnFlyAnchorOfst( 0 )
, mnFlyAnchorOfstNoWrap( 0 )
, mnFootnoteLine( 0 )
, mnHeightOfLastLine( 0 ) // OD 2004-03-17 #i11860#
, mnAdditionalFirstLineOffset( 0 )
- , nOfst( 0 )
- , nCacheIdx( USHRT_MAX )
- , bLocked( false )
- , bWidow( false )
- , bJustWidow( false )
- , bEmpty( false )
- , bInFootnoteConnect( false )
- , bFootnote( false )
- , bRepaint( false )
- , bBlinkPor( false )
- , bFieldFollow( false )
- , bHasAnimation( false )
- , bIsSwapped( false )
+ , mnOffset( 0 )
+ , mnCacheIndex( USHRT_MAX )
+ , mbLocked( false )
+ , mbWidow( false )
+ , mbJustWidow( false )
+ , mbEmpty( false )
+ , mbInFootnoteConnect( false )
+ , mbFootnote( false )
+ , mbRepaint( false )
+ , mbHasBlinkPortions( false )
+ , mbFieldFollow( false )
+ , mbHasAnimation( false )
+ , mbIsSwapped( false )
, mbFollowFormatAllowed( true ) // OD 14.03.2003 #i11760#
{
mnFrmType = FRM_TXT;
@@ -2468,13 +2468,13 @@ void SwTextFrm::ChgThisLines()
else if ( rInf.IsCountBlankLines() )
nNew = 1;
- if ( nNew != nThisLines )
+ if ( nNew != mnThisLines )
{
if ( !IsInTab() && GetAttrSet()->GetLineNumber().IsCount() )
{
- nAllLines -= nThisLines;
- nThisLines = nNew;
- nAllLines += nThisLines;
+ mnAllLines -= mnThisLines;
+ mnThisLines = nNew;
+ mnAllLines += mnThisLines;
SwFrm *pNxt = GetNextContentFrm();
while( pNxt && pNxt->IsInTab() )
{
@@ -2493,7 +2493,7 @@ void SwTextFrm::ChgThisLines()
}
}
else // Paragraphs which are not counted should not manipulate the AllLines.
- nThisLines = nNew;
+ mnThisLines = nNew;
}
}
@@ -2537,7 +2537,7 @@ void SwTextFrm::RecalcAllLines()
if ( nOld != nNewNum )
{
- nAllLines = nNewNum;
+ mnAllLines = nNewNum;
SwContentFrm *pNxt = GetNextContentFrm();
while ( pNxt &&
(pNxt->IsInTab() || pNxt->IsInDocBody() != IsInDocBody()) )
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 4eff487..4cc60f3 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -86,7 +86,7 @@ void SwTextFrm::CalcFootnoteFlag( sal_Int32 nStop )// For testing the SplitFrm
void SwTextFrm::CalcFootnoteFlag()
#endif
{
- bFootnote = false;
+ mbFootnote = false;
const SwpHints *pHints = GetTextNode()->GetpSwpHints();
if( !pHints )
@@ -111,7 +111,7 @@ void SwTextFrm::CalcFootnoteFlag()
break;
if( GetOfst() <= nIdx )
{
- bFootnote = true;
+ mbFootnote = true;
break;
}
}
@@ -584,8 +584,8 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL
OSL_ENSURE( !IsVertical() || !IsSwapped(),
"SwTextFrm::ConnectFootnote with swapped frame" );
- bFootnote = true;
- bInFootnoteConnect = true; // Just reset!
+ mbFootnote = true;
+ mbInFootnoteConnect = true; // Just reset!
const bool bEnd = pFootnote->GetFootnote().IsEndNote();
// We want to store this value, because it is needed as a fallback
@@ -647,7 +647,7 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL
}
else if( pSrcFrm != this )
SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this );
- bInFootnoteConnect = false;
+ mbInFootnoteConnect = false;
return;
}
else if( pSrcFrm )
@@ -668,7 +668,7 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL
pBoss->AppendFootnote( this, pFootnote );
else if( pSrcFrm != this )
SwFootnoteBossFrm::ChangeFootnoteRef( pSrcFrm, pFootnote, this );
- bInFootnoteConnect = false;
+ mbInFootnoteConnect = false;
return;
}
@@ -710,7 +710,7 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL
// So that we don't miss anything
pSh->InvalidateWindows( pCont->Frm() );
}
- bInFootnoteConnect = false;
+ mbInFootnoteConnect = false;
return;
}
else
@@ -781,7 +781,7 @@ void SwTextFrm::ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadL
nRstHeight = GetRstHeight();
(void)nRstHeight;
#endif
- bInFootnoteConnect = false;
+ mbInFootnoteConnect = false;
return;
}
More information about the Libreoffice-commits
mailing list