summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-09-09 15:13:31 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2013-09-15 18:45:58 +0200
commitf356fd26a10112cc3c475b224d1b5f7486253ed2 (patch)
treeea8df7c1524136a703a176a94d0709fc5d070bfc /sw
parente37a33f5743ab8f3e31a919586842f6f8952d381 (diff)
CharBrd 10: Some documentation
Change-Id: I4c6c2cd4acf8ae4a759a662f92066ad63df74b3c
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx10
-rw-r--r--sw/source/core/inc/frmtool.hxx10
-rw-r--r--sw/source/core/inc/swfont.hxx13
-rw-r--r--sw/source/core/text/inftxt.hxx5
-rw-r--r--sw/source/ui/inc/chrdlgmodes.hxx2
-rw-r--r--sw/source/ui/inc/uitool.hxx24
-rw-r--r--sw/source/ui/utlui/uitool.cxx4
7 files changed, 50 insertions, 18 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 353cd63e254f..81a4aa2d63fb 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -359,6 +359,16 @@ protected:
sal_uInt32 m_nStartTime;
};
+/**
+ * Test whether the expected and actual borderline parameters are equal
+ * and assert if not.
+ *
+ * @param[in] rExpected expected borderline object
+ * @param[in] rActual actual borderline object
+ * @param[in] rSourceLine line from where the assertion is called
+ * Note: This method is the implementatition of CPPUNIT_ASSERT_BORDER_EQUAL, so
+ * use that macro instead.
+**/
inline void assertBorderEqual(
const table::BorderLine2& rExpected, const table::BorderLine2& rActual,
const CppUnit::SourceLine& rSourceLine )
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index b478f551b2cc..5519eb041f31 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -65,7 +65,15 @@ void SwAlignRect( SwRect &rRect, const ViewShell *pSh );
// Created declaration here to avoid <extern> declarations
void SwAlignGrfRect( SwRect *pGrfRect, const OutputDevice &rOut );
-// Paint character border using frame painting code
+/**
+ * Paint border around a run of characters using frame painting code.
+ *
+ * @param[in] rFont font object of actual text, which specify the border
+ * @param[in] rPaintArea rectangle area in which line portion takes place
+ * @param[in] bVerticalLayout corresponding text frame verticality
+ * @param[in] bJoinWithPrev leave border with which actual border joins to the previous portion
+ * @param[in] bJoinWithNext leave border with which actual border joins to the next portion
+**/
void PaintCharacterBorder(
const SwFont& rFont, const SwRect& rPaintArea, const bool bVerticalLayout,
const bool bJoinWithPrev, const bool bJoinWithNext );
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 4b9821be4bbb..f347d20c3c2d 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -370,7 +370,6 @@ public:
inline void Invalidate()
{ bFntChg = bOrgChg = sal_True; }
- // set/get borders
void SetTopBorder( const editeng::SvxBorderLine* pTopBorder );
void SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder );
void SetRightBorder( const editeng::SvxBorderLine* pRightBorder );
@@ -381,7 +380,7 @@ public:
const boost::optional<editeng::SvxBorderLine>& GetRightBorder() const { return m_aRightBorder; }
const boost::optional<editeng::SvxBorderLine>& GetLeftBorder() const { return m_aLeftBorder; }
- // Get borders which are at absolute positions
+ // Get absolute border correspond to the layout verticality and orientation.
const boost::optional<editeng::SvxBorderLine>& GetAbsTopBorder( const bool bVertLayout ) const;
const boost::optional<editeng::SvxBorderLine>& GetAbsBottomBorder( const bool bVertLayout ) const;
const boost::optional<editeng::SvxBorderLine>& GetAbsRightBorder( const bool bVertLayout ) const;
@@ -397,22 +396,22 @@ public:
sal_uInt16 GetRightBorderDist() const { return m_nRightBorderDist; }
sal_uInt16 GetLeftBorderDist() const { return m_nLeftBorderDist; }
- // Return with the border width plus spacing
+ // Return with the whole space which border holed (border width, spacing and shadow width)
sal_uInt16 GetTopBorderSpace() const;
sal_uInt16 GetBottomBorderSpace() const;
sal_uInt16 GetRightBorderSpace() const;
sal_uInt16 GetLeftBorderSpace() const;
+ /// Check whether font has any border on any side
bool HasBorder() const;
- // Shadow attributes
void SetShadowColor( const Color& rColor );
void SetShadowWidth( const sal_uInt16 nWidth );
void SetShadowLocation( const SvxShadowLocation aLocation );
- const Color& GetShadowColor() const { return m_aShadowColor; }
- sal_uInt16 GetShadowWidth() const { return m_nShadowWidth; }
- SvxShadowLocation GetShadowLocation() const { return m_aShadowLocation; }
+ const Color& GetShadowColor() const { return m_aShadowColor; }
+ sal_uInt16 GetShadowWidth() const { return m_nShadowWidth; }
+ SvxShadowLocation GetShadowLocation() const { return m_aShadowLocation; }
/**
* Get the absolute shadow location dependant from orientation.
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index df2ccc35de4a..4fadf2ad72ce 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -443,6 +443,11 @@ public:
void DrawViewOpt( const SwLinePortion &rPor, const MSHORT nWhich ) const;
void DrawBackBrush( const SwLinePortion &rPor ) const;
+ /**
+ * Draw character border around a line portion.
+ *
+ * @param[in] rPor line portion around which border have to be drawn.
+ **/
void DrawBorder( const SwLinePortion &rPor ) const;
void DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const;
diff --git a/sw/source/ui/inc/chrdlgmodes.hxx b/sw/source/ui/inc/chrdlgmodes.hxx
index 4cbf0071df5e..d60ff0f33696 100644
--- a/sw/source/ui/inc/chrdlgmodes.hxx
+++ b/sw/source/ui/inc/chrdlgmodes.hxx
@@ -10,7 +10,7 @@
#ifndef SW_CHAR_DLG_MODES_HXX
#define SW_CHAR_DLG_MODES_HXX
-//DialogModes:
+// DialogModes for SwCharDlg
#define DLG_CHAR_STD 0
#define DLG_CHAR_DRAW 1
#define DLG_CHAR_ENV 2
diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx
index 85387a243146..ecf178329e80 100644
--- a/sw/source/ui/inc/uitool.hxx
+++ b/sw/source/ui/inc/uitool.hxx
@@ -39,19 +39,29 @@ class SfxViewFrame;
// switch a metric
SW_DLLPUBLIC void SetMetric(MetricFormatter& rCtrl, FieldUnit eUnit);
-// fill BoxInfoAttribut
+// fill BoxInfo attribute
SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh);
// Modes for attribute conversion
#define CONV_ATTR_STD 1 // Standard character dialog
#define CONV_ATTR_ENV 2 // Character dialog opened from envelope dialog
-// Convert character specific attributes to general ones used by tab pages
-SW_DLLPUBLIC void ConvertAttrCharToGen(SfxItemSet& rSet, sal_uInt8 nMode);
-
-// Convert general attributes to the corresponding character attributes
-// This method is used after executed a character dialog
-SW_DLLPUBLIC void ConvertAttrGenToChar(SfxItemSet& rSet, sal_uInt8 nMode);
+/**
+ * Convert character specific attributes to general ones used by tab pages.
+ *
+ * @param[in|out] rSet the set in which character attributes are stored
+ * @param[in] nMode specify the dialog which will be called after conversion
+**/
+SW_DLLPUBLIC void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode);
+
+/**
+ * Convert general attributes to the corresponding character attributes.
+ * This method is used after executed a character dialog.
+ *
+ * @param[in|out] rSet the set in which character attributes are stored
+ * @param[in] nMode specify the dialog which was called before
+**/
+SW_DLLPUBLIC void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode);
// SfxItemSets <-> PageDesc
void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc );
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 455e738cc9e4..5409b2f9da5c 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -119,7 +119,7 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh)
rSet.Put(aBoxInfo);
}
-void ConvertAttrCharToGen(SfxItemSet& rSet, sal_uInt8 nMode)
+void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode)
{
// Background
{
@@ -159,7 +159,7 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, sal_uInt8 nMode)
}
}
-void ConvertAttrGenToChar(SfxItemSet& rSet, sal_uInt8 nMode)
+void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode)
{
// Background
{