Hello Tamás,
On Tue, 2013-05-28 at 18:16 +0200, Zolnai Tamás wrote:
As some of list members know I am not a beginner with LO. I have
already done some work mostly with localization (kill sdf and refactor
\clean l10ntools). Additionally I have added a little feature which is
visible from the side of the users too (limitbox in Base).
It will be great to have you working on the characters borders!
On the summer, I will wrok with Writer, making possible using
character borders. It sounds simple, but it has more sides. The first
thing that comes to mind about character border is a simple four-sided
border with the given color, width and style.
[...]
Well that is only the use case and it isn't that complex: if we can draw
the 4 borders, then any other case is pretty simple ;)
You should better see your task as the following steps:
* Change the Character properties UI to add the existing "Borders"
page.
* Write the borders definition into the SwFmt.
* Change the layout to paint the borders. Borders will influence the
line height and spacing between characters. This part will probably be
the trickiest one. The code to paint borders is already implemented, but
changing the layout requires you to understand it first ;)
* Persist the borders to the various filters. There is no
specification to do here as even ODF specifies these borders.
I added a bit detailed description of this feature, just to see
what territories it touch. So if anybody has ideas\advices about
painting lines\borders, adding new character attributes, extending
filters or anything linked with them, than - as the phrase goes - feel
free to write me.
I think Miklos planned to have a kick-starting session with you: we'll
be able to discuss the details there. I once had a patch for the first
step, you'll find it attached, although I'm not sure it's still useful.
--
Cedric
commit 932ff3d1703b2b21d1c544815867bc803b5b92b2
Merge: 4a111ea a36dd99
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
Date: Thu Aug 11 09:33:35 2011 +0200
On master: WIP Character borders
diff --cc cui/source/tabpages/border.cxx
index 98aeae8,98aeae8..457b671
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@@ -1134,7 -1134,7 +1134,7 @@@ IMPL_LINK( SvxBorderTabPage, LinesChang
sal_uInt16 nValid = VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT;
//fuer Rahmen und Absatz wird das Edit disabled, wenn keine Border gesetzt ist
-- if(nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_PARA))
++ if(nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_PARA|SW_BORDER_MODE_CHAR))
{
if(bLineSet)
{
diff --cc svx/inc/svx/flagsdef.hxx
index 2b1b30d,2b1b30d..2692e08
--- a/svx/inc/svx/flagsdef.hxx
+++ b/svx/inc/svx/flagsdef.hxx
@@@ -35,6 -35,6 +35,7 @@@
#define SW_BORDER_MODE_PARA 0x01
#define SW_BORDER_MODE_TABLE 0x02
#define SW_BORDER_MODE_FRAME 0x04
++#define SW_BORDER_MODE_CHAR 0x08
// flags for SvxBackgroundTabPage
#define SVX_SHOW_SELECTOR 0x01
diff --cc sw/inc/hintids.hxx
index afd57f3,afd57f3..1eac3d1
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@@ -96,8 -96,8 +96,9 @@@ RES_CHRATR_BEGIN = HINT_BEGIN
RES_CHRATR_RELIEF, // 36
RES_CHRATR_HIDDEN, // 37
RES_CHRATR_OVERLINE, // 38
-- RES_CHRATR_DUMMY1, // 39
-- RES_CHRATR_DUMMY2, // 40
++ RES_CHRATR_BORDER, // 39
++ RES_CHRATR_DUMMY1, // 40
++ RES_CHRATR_DUMMY2, // 41
RES_CHRATR_END
};
@@@ -123,27 -123,27 +124,27 @@@ RES_TXTATR_BEGIN = RES_CHRATR_END
- META and METAFIELD must precede CJK_RUBY and INETFMT
*/
RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN ,
-- RES_TXTATR_REFMARK = RES_TXTATR_WITHEND_BEGIN, // 41
-- RES_TXTATR_TOXMARK, // 42
-- RES_TXTATR_META, // 43
-- RES_TXTATR_METAFIELD, // 44
-- RES_TXTATR_AUTOFMT, // 45
-- RES_TXTATR_INETFMT, // 46
-- RES_TXTATR_CHARFMT, // 47
-- RES_TXTATR_CJK_RUBY, // 48
-- RES_TXTATR_UNKNOWN_CONTAINER, // 49
-- RES_TXTATR_DUMMY5, // 50
++ RES_TXTATR_REFMARK = RES_TXTATR_WITHEND_BEGIN, // 42
++ RES_TXTATR_TOXMARK, // 43
++ RES_TXTATR_META, // 44
++ RES_TXTATR_METAFIELD, // 45
++ RES_TXTATR_AUTOFMT, // 46
++ RES_TXTATR_INETFMT, // 47
++ RES_TXTATR_CHARFMT, // 48
++ RES_TXTATR_CJK_RUBY, // 49
++ RES_TXTATR_UNKNOWN_CONTAINER, // 50
++ RES_TXTATR_DUMMY5, // 51
RES_TXTATR_WITHEND_END,
// all TextAttributes without an end
RES_TXTATR_NOEND_BEGIN = RES_TXTATR_WITHEND_END,
-- RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN, // 51
-- RES_TXTATR_FLYCNT, // 52
-- RES_TXTATR_FTN, // 53
-- RES_TXTATR_DUMMY4, // 54
-- RES_TXTATR_DUMMY3, // 55
-- RES_TXTATR_DUMMY1, // 56
-- RES_TXTATR_DUMMY2, // 57
++ RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN, // 52
++ RES_TXTATR_FLYCNT, // 53
++ RES_TXTATR_FTN, // 54
++ RES_TXTATR_DUMMY4, // 55
++ RES_TXTATR_DUMMY3, // 56
++ RES_TXTATR_DUMMY1, // 57
++ RES_TXTATR_DUMMY2, // 58
RES_TXTATR_NOEND_END,
RES_TXTATR_END = RES_TXTATR_NOEND_END
};
@@@ -151,23 -151,23 +152,23 @@@
enum RES_PARATR
{
RES_PARATR_BEGIN = RES_TXTATR_END,
-- RES_PARATR_LINESPACING = RES_PARATR_BEGIN, // 58
-- RES_PARATR_ADJUST, // 59
-- RES_PARATR_SPLIT, // 60
-- RES_PARATR_ORPHANS, // 61
-- RES_PARATR_WIDOWS, // 62
-- RES_PARATR_TABSTOP, // 63
-- RES_PARATR_HYPHENZONE, // 64
-- RES_PARATR_DROP, // 65
-- RES_PARATR_REGISTER, // 66
-- RES_PARATR_NUMRULE, // 67
-- RES_PARATR_SCRIPTSPACE, // 68
-- RES_PARATR_HANGINGPUNCTUATION, // 69
-- RES_PARATR_FORBIDDEN_RULES, // 70
-- RES_PARATR_VERTALIGN, // 71
-- RES_PARATR_SNAPTOGRID, // 72
-- RES_PARATR_CONNECT_BORDER, // 73
-- RES_PARATR_OUTLINELEVEL, // 74
++ RES_PARATR_LINESPACING = RES_PARATR_BEGIN, // 59
++ RES_PARATR_ADJUST, // 60
++ RES_PARATR_SPLIT, // 61
++ RES_PARATR_ORPHANS, // 62
++ RES_PARATR_WIDOWS, // 63
++ RES_PARATR_TABSTOP, // 64
++ RES_PARATR_HYPHENZONE, // 65
++ RES_PARATR_DROP, // 66
++ RES_PARATR_REGISTER, // 67
++ RES_PARATR_NUMRULE, // 68
++ RES_PARATR_SCRIPTSPACE, // 69
++ RES_PARATR_HANGINGPUNCTUATION, // 70
++ RES_PARATR_FORBIDDEN_RULES, // 71
++ RES_PARATR_VERTALIGN, // 72
++ RES_PARATR_SNAPTOGRID, // 73
++ RES_PARATR_CONNECT_BORDER, // 74
++ RES_PARATR_OUTLINELEVEL, // 75
RES_PARATR_END
};
@@@ -176,99 -176,99 +177,99 @@@
enum RES_PARATR_LIST
{
RES_PARATR_LIST_BEGIN = RES_PARATR_END,
-- RES_PARATR_LIST_ID = RES_PARATR_LIST_BEGIN, // 75
-- RES_PARATR_LIST_LEVEL, // 76
-- RES_PARATR_LIST_ISRESTART, // 77
-- RES_PARATR_LIST_RESTARTVALUE, // 78
-- RES_PARATR_LIST_ISCOUNTED, // 79
++ RES_PARATR_LIST_ID = RES_PARATR_LIST_BEGIN, // 76
++ RES_PARATR_LIST_LEVEL, // 77
++ RES_PARATR_LIST_ISRESTART, // 78
++ RES_PARATR_LIST_RESTARTVALUE, // 79
++ RES_PARATR_LIST_ISCOUNTED, // 80
RES_PARATR_LIST_END
};
enum RES_FRMATR
{
RES_FRMATR_BEGIN = RES_PARATR_LIST_END,
-- RES_FILL_ORDER = RES_FRMATR_BEGIN, // 80
-- RES_FRM_SIZE, // 81
-- RES_PAPER_BIN, // 82
-- RES_LR_SPACE, // 83
-- RES_UL_SPACE, // 84
-- RES_PAGEDESC, // 85
-- RES_BREAK, // 86
-- RES_CNTNT, // 87
-- RES_HEADER, // 88
-- RES_FOOTER, // 89
-- RES_PRINT, // 90
-- RES_OPAQUE, // 91
-- RES_PROTECT, // 92
-- RES_SURROUND, // 93
-- RES_VERT_ORIENT, // 94
-- RES_HORI_ORIENT, // 95
-- RES_ANCHOR, // 96
-- RES_BACKGROUND, // 97
-- RES_BOX, // 98
-- RES_SHADOW, // 99
-- RES_FRMMACRO, // 100
-- RES_COL, // 101
-- RES_KEEP, // 102
-- RES_URL, // 103
-- RES_EDIT_IN_READONLY, // 104
-- RES_LAYOUT_SPLIT, // 105
-- RES_CHAIN, // 106
-- RES_TEXTGRID, // 107
-- RES_LINENUMBER , // 108
-- RES_FTN_AT_TXTEND, // 109
-- RES_END_AT_TXTEND, // 110
-- RES_COLUMNBALANCE, // 111
-- RES_FRAMEDIR, // 112
-- RES_HEADER_FOOTER_EAT_SPACING, // 113
-- RES_ROW_SPLIT, // 114
-- RES_FOLLOW_TEXT_FLOW, // 115
-- RES_COLLAPSING_BORDERS, // 116
-- RES_WRAP_INFLUENCE_ON_OBJPOS, // 117
-- RES_AUTO_STYLE, // 118
-- RES_FRMATR_STYLE_NAME, // 119
-- RES_FRMATR_CONDITIONAL_STYLE_NAME, // 120
++ RES_FILL_ORDER = RES_FRMATR_BEGIN, // 81
++ RES_FRM_SIZE, // 82
++ RES_PAPER_BIN, // 83
++ RES_LR_SPACE, // 84
++ RES_UL_SPACE, // 85
++ RES_PAGEDESC, // 86
++ RES_BREAK, // 87
++ RES_CNTNT, // 88
++ RES_HEADER, // 89
++ RES_FOOTER, // 90
++ RES_PRINT, // 91
++ RES_OPAQUE, // 92
++ RES_PROTECT, // 93
++ RES_SURROUND, // 94
++ RES_VERT_ORIENT, // 95
++ RES_HORI_ORIENT, // 96
++ RES_ANCHOR, // 97
++ RES_BACKGROUND, // 98
++ RES_BOX, // 99
++ RES_SHADOW, // 100
++ RES_FRMMACRO, // 101
++ RES_COL, // 102
++ RES_KEEP, // 103
++ RES_URL, // 104
++ RES_EDIT_IN_READONLY, // 105
++ RES_LAYOUT_SPLIT, // 106
++ RES_CHAIN, // 107
++ RES_TEXTGRID, // 108
++ RES_LINENUMBER , // 109
++ RES_FTN_AT_TXTEND, // 110
++ RES_END_AT_TXTEND, // 111
++ RES_COLUMNBALANCE, // 112
++ RES_FRAMEDIR, // 113
++ RES_HEADER_FOOTER_EAT_SPACING, // 114
++ RES_ROW_SPLIT, // 115
++ RES_FOLLOW_TEXT_FLOW, // 116
++ RES_COLLAPSING_BORDERS, // 117
++ RES_WRAP_INFLUENCE_ON_OBJPOS, // 118
++ RES_AUTO_STYLE, // 119
++ RES_FRMATR_STYLE_NAME, // 120
++ RES_FRMATR_CONDITIONAL_STYLE_NAME, // 121
RES_FRMATR_END
};
enum RES_GRFATR
{
RES_GRFATR_BEGIN = RES_FRMATR_END,
-- RES_GRFATR_MIRRORGRF = RES_GRFATR_BEGIN, // 121
-- RES_GRFATR_CROPGRF, // 122
++ RES_GRFATR_MIRRORGRF = RES_GRFATR_BEGIN, // 122
++ RES_GRFATR_CROPGRF, // 123
-- RES_GRFATR_ROTATION, // 123
-- RES_GRFATR_LUMINANCE, // 124
-- RES_GRFATR_CONTRAST, // 125
-- RES_GRFATR_CHANNELR, // 126
-- RES_GRFATR_CHANNELG, // 127
-- RES_GRFATR_CHANNELB, // 128
-- RES_GRFATR_GAMMA, // 129
-- RES_GRFATR_INVERT, // 130
-- RES_GRFATR_TRANSPARENCY, // 131
-- RES_GRFATR_DRAWMODE, // 132
++ RES_GRFATR_ROTATION, // 124
++ RES_GRFATR_LUMINANCE, // 125
++ RES_GRFATR_CONTRAST, // 126
++ RES_GRFATR_CHANNELR, // 127
++ RES_GRFATR_CHANNELG, // 128
++ RES_GRFATR_CHANNELB, // 129
++ RES_GRFATR_GAMMA, // 130
++ RES_GRFATR_INVERT, // 131
++ RES_GRFATR_TRANSPARENCY, // 132
++ RES_GRFATR_DRAWMODE, // 133
-- RES_GRFATR_DUMMY1, // 133
-- RES_GRFATR_DUMMY2, // 134
-- RES_GRFATR_DUMMY3, // 135
-- RES_GRFATR_DUMMY4, // 136
-- RES_GRFATR_DUMMY5, // 137
++ RES_GRFATR_DUMMY1, // 134
++ RES_GRFATR_DUMMY2, // 135
++ RES_GRFATR_DUMMY3, // 136
++ RES_GRFATR_DUMMY4, // 137
++ RES_GRFATR_DUMMY5, // 138
RES_GRFATR_END
};
enum RES_BOXATR
{
RES_BOXATR_BEGIN = RES_GRFATR_END,
-- RES_BOXATR_FORMAT = RES_BOXATR_BEGIN, // 138
-- RES_BOXATR_FORMULA, // 139
-- RES_BOXATR_VALUE, // 140
++ RES_BOXATR_FORMAT = RES_BOXATR_BEGIN, // 139
++ RES_BOXATR_FORMULA, // 140
++ RES_BOXATR_VALUE, // 141
RES_BOXATR_END
};
enum RES_UNKNOWNATR
{
RES_UNKNOWNATR_BEGIN = RES_BOXATR_END,
-- RES_UNKNOWNATR_CONTAINER = RES_UNKNOWNATR_BEGIN,// 141
++ RES_UNKNOWNATR_CONTAINER = RES_UNKNOWNATR_BEGIN,// 142
RES_UNKNOWNATR_END
};
diff --cc sw/source/ui/chrdlg/chardlg.cxx
index fb5abe7,fb5abe7..5421828
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@@ -99,6 -99,6 +99,8 @@@ SwCharDlg::SwCharDlg(Window* pParent, S
AddTabPage(TP_CHAR_TWOLN, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 0 );
AddTabPage(TP_CHAR_URL, SwCharURLPage::Create, 0);
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
++ AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ),
++ pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
SvtCJKOptions aCJKOptions;
if(bIsDrwTxtMode)
@@@ -106,6 -106,6 +108,7 @@@
RemoveTabPage( TP_CHAR_URL );
RemoveTabPage( TP_BACKGROUND );
RemoveTabPage( TP_CHAR_TWOLN );
++ RemoveTabPage( TP_BORDER );
}
else if(!aCJKOptions.IsDoubleLinesEnabled())
RemoveTabPage( TP_CHAR_TWOLN );
@@@ -152,6 -152,6 +155,10 @@@ void SwCharDlg::PageCreated( sal_uInt1
aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_PREVIEW_CHARACTER));
rPage.PageCreated(aSet);
break;
++ case TP_BORDER:
++ aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_CHAR));
++ rPage.PageCreated(aSet);
++ break;
}
}
diff --cc sw/source/ui/chrdlg/chardlg.src
index 2117a90,2117a90..3895d3d
--- a/sw/source/ui/chrdlg/chardlg.src
+++ b/sw/source/ui/chrdlg/chardlg.src
@@@ -72,6 -72,6 +72,12 @@@ TabDialog DLG_CHA
};
PageItem
{
++ Identifier = TP_BORDER ;
++ Text [ en-US ] = "Borders" ;
++ PageResID = TP_BORDER ;
++ };
++ PageItem
++ {
Identifier = TP_BACKGROUND ;
Text [ en-US ] = "Background" ;
PageResID = TP_BACKGROUND ;
diff --cc sw/source/ui/fmtui/tmpdlg.cxx
index 55cf1cc,55cf1cc..175c0bb
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@@ -139,6 -139,6 +139,10 @@@ SwTemplateDlg::SwTemplateDlg(Window
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ),
"GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) ,
"GetTabPageRangesFunc fail!");
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ),
pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
++
++ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc
fail!");
++ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc
fail!");
++ AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ),
pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
SvtCJKOptions aCJKOptions;
if(nHtmlMode & HTMLMODE_ON || !aCJKOptions.IsDoubleLinesEnabled())
@@@ -595,6 -595,6 +599,10 @@@ void SwTemplateDlg::PageCreated( sal_uI
{
aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_FRAME));
}
++ else if( SFX_STYLE_FAMILY_CHAR == nType )
++ {
++ aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_CHAR));
++ }
rPage.PageCreated(aSet);
break;
diff --cc sw/source/ui/fmtui/tmpdlg.src
index b9cde9c,b9cde9c..6812d27
--- a/sw/source/ui/fmtui/tmpdlg.src
+++ b/sw/source/ui/fmtui/tmpdlg.src
@@@ -72,6 -72,6 +72,12 @@@ TabDialog DLG_TEMPLATE_
Text [ en-US ] = "Background" ;
PageResID = TP_BACKGROUND ;
};
++ PageItem
++ {
++ Identifier = TP_BORDER ;
++ Text [ en-US ] = "Borders" ;
++ PageResID = TP_BORDER ;
++ };
};
};
};
diff --cc sw/source/ui/shells/textsh1.cxx
index a7ff278,a7ff278..5a9882d
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@@ -137,6 -137,6 +137,7 @@@ void lcl_CharDialog( SwWrtShell &rWrtSh
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
++ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_BACKGROUND, RES_BACKGROUND,
FN_PARAM_SELECTION, FN_PARAM_SELECTION,
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.