[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - 6 commits - sc/source sot/source sw/qa sw/source vcl/source writerfilter/source
Andrzej Hunt
andrzej.hunt at collabora.com
Mon Mar 10 04:27:17 PDT 2014
sc/source/core/data/validat.cxx | 12 ++++
sot/source/base/formats.cxx | 18 +++----
sw/qa/extras/ooxmlimport/data/rhbz988516.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 14 +++++
sw/qa/extras/ww8import/data/bnc821208.doc |binary
sw/qa/extras/ww8import/ww8import.cxx | 11 ++++
sw/source/filter/ww8/ww8par2.cxx | 5 ++
vcl/source/window/splitwin.cxx | 63 ++++++++++++--------------
writerfilter/source/ooxml/model.xml | 4 +
9 files changed, 85 insertions(+), 42 deletions(-)
New commits:
commit 16c45ac52e84ffc34092cee271e6602ac710db9a
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date: Fri Feb 7 18:18:42 2014 +0000
fdo#52547 SOT: Prefer embedding image data to embedding linked image.
When copying an image from e.g. Firefox or Chromium the clipboard
will contain both the image itself, and the url of the image --
presumably it makes more sense to store the image data itself if
it is available -- the order of the items in the *_FREE_AREA_Copy
defines the order of preference for which data in the clipboard
should be used.
Change-Id: Id8b862a9f2fce3a34adbb16509e9b7372500a239
Reviewed-on: https://gerrit.libreoffice.org/7928
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit c47db038f98aaf7aec3cbe57c4e5683591afa23e)
Reviewed-on: https://gerrit.libreoffice.org/8384
(cherry picked from commit 91a55de7be6a23685a875517495c1af67f3a8b60)
Reviewed-on: https://gerrit.libreoffice.org/8499
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index f4d473f..115d3bc 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -825,9 +825,6 @@ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Copy[] = \
{ SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
- { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
@@ -838,6 +835,9 @@ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Copy[] = \
{ SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
+ { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ 0xffff, 0, 0 } \
@@ -998,9 +998,6 @@ static SotAction_Impl const aEXCHG_DEST_SCDOC_FREE_AREA_Copy[] = \
{ SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_BIFF_5, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_BIFF__5,EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
- { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
@@ -1009,6 +1006,9 @@ static SotAction_Impl const aEXCHG_DEST_SCDOC_FREE_AREA_Copy[] = \
{ SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
+ { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_BIFF_8, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
@@ -1085,9 +1085,6 @@ static SotAction_Impl const aEXCHG_DEST_SDDOC_FREE_AREA_Copy[] = \
{ SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
- { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
@@ -1096,6 +1093,9 @@ static SotAction_Impl const aEXCHG_DEST_SDDOC_FREE_AREA_Copy[] = \
{ SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
+ { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ 0xffff, 0, 0 } \
commit 3b1981319c4b725707a76b0fffc6009c53d880ad
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Mar 5 23:29:06 2014 +0100
rhbz#988516: DOCX import: fix context stack when importing header/footer
When a header/footer substream is parsed, a ParagraphGroup is started,
but not ended; so the properties of the last paragraph in the
header/footer are applied to a paragraph in the body.
The obvious fix to add a call to endParagraphGroup() at the end of w:p
element breaks table cells. So add a call to endParagraphGroup() at
the end of the "hdr"/"ftr" element.
(The problem in the bugdoc became much more visible with commit
ca555c596043c88894b964ac5e21f5a7271d5f3b, but was there before)
(cherry picked from commit 2b78f2cd7b9e4bab0f3b3b9119238f36a1bbc7b2)
Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Change-Id: Ib054f1882793049b39424c1076ba5d4b319cd027
Reviewed-on: https://gerrit.libreoffice.org/8476
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/qa/extras/ooxmlimport/data/rhbz988516.docx b/sw/qa/extras/ooxmlimport/data/rhbz988516.docx
new file mode 100644
index 0000000..38e2dcf
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/rhbz988516.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 60bb81d9..f6477f4 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -144,6 +144,7 @@ public:
void testRPrChangeClosed();
void testFdo65090();
void testFdo73389();
+ void testRhbz988516();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -252,6 +253,7 @@ void Test::run()
{"rprchange_closed.docx",&Test::testRPrChangeClosed},
{"fdo65090.docx", &Test::testFdo65090},
{"fdo73389.docx", &Test::testFdo73389},
+ {"rhbz988516.docx", &Test::testRhbz988516},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -385,6 +387,18 @@ void Test::testN757890()
CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, nValue);
}
+void Test::testRhbz988516()
+{
+ // The problem was that the list properties of the footer leaked into body
+ CPPUNIT_ASSERT_EQUAL(OUString(),
+ getProperty<OUString>(getParagraph(1), "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Enclosure 3"), getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(),
+ getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString(),
+ getProperty<OUString>(getParagraph(3), "NumberingStyleName"));
+}
+
void Test::testFdo49940()
{
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index d368dab..a42ab94 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -22508,7 +22508,9 @@
<element name="headerReference" tokenid="ooxml:EG_HdrFtrReferences_headerReference"/>
<element name="footerReference" tokenid="ooxml:EG_HdrFtrReferences_footerReference"/>
</resource>
- <resource name="CT_HdrFtr" resource="Stream" tag="header"/>
+ <resource name="CT_HdrFtr" resource="Stream" tag="header">
+ <action name="end" action="endParagraphGroup"/>
+ </resource>
<resource name="EG_SectPrContents" resource="Properties" tag="section">
<element name="bidi" tokenid="ooxml:EG_SectPrContents_bidi"/>
<element name="cols" tokenid="ooxml:EG_SectPrContents_cols"/>
commit 801bbad2d40bbfc1b75c290b04bc23ca6707798b
Author: Eike Rathke <erack at redhat.com>
Date: Thu Mar 6 01:23:37 2014 +0100
resolved fdo#61520 do not add multiple empty strings to the validation list
(cherry picked from commit 7122ef19847b26529ed1d5bad40df869e91a8495)
Backported.
Change-Id: I4f6180b2f8c914a965965ca362e1670e8b434d37
Reviewed-on: https://gerrit.libreoffice.org/8470
Tested-by: Kohei Yoshida <libreoffice at kohei.us>
Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 56902f8..b9d4260 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -710,6 +710,8 @@ bool ScValidationData::GetSelectionFromFormula(
}
}
+ bool bHaveEmpty = false;
+
/* XL artificially limits things to a single col or row in the UI but does
* not list the constraint in MOOXml. If a defined name or INDIRECT
* resulting in 1D is entered in the UI and the definition later modified
@@ -730,6 +732,16 @@ bool ScValidationData::GetSelectionFromFormula(
{
aValStr = nMatVal.GetString();
+ // Do not add multiple empty strings to the validation list,
+ // especially not if they'd bloat the tail with a million empty
+ // entries for a column range, fdo#61520
+ if (!aValStr.Len())
+ {
+ if (bHaveEmpty)
+ continue;
+ bHaveEmpty = true;
+ }
+
if( NULL != pStrings )
pEntry = new ScTypedStrData( aValStr, 0.0, ScTypedStrData::Standard);
commit c34f79494f430b3a151db6d0ee6d3f48dc1d33d7
Author: Ahmad H. Al Harthi <aalharthi at kacst.edu.sa>
Date: Sun Mar 2 12:53:14 2014 +0300
fdo#59329 Fix docked window border lines
This patch completes the missing border lines. This is intended
for versions 4.1 and 4.2 only.
Change-Id: Ib15cb3b01dca4631f643a0036475cf684793d256
Reviewed-on: https://gerrit.libreoffice.org/8413
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 628d598..617efa0 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -179,23 +179,43 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin )
{
case WINDOWALIGN_BOTTOM:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( 0, 6 ), Point( nDX-1, 6 ) );
pWin->DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) );
+ pWin->DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) );
+
+ pWin->SetLineColor( rStyleSettings.GetLightColor() );
+ pWin->DrawLine( Point( 0, 1 ), Point( nDX-1, 1 ) );
+ pWin->DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) );
break;
case WINDOWALIGN_TOP:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
+ pWin->DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) );
+ pWin->DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) );
+
+ pWin->SetLineColor( rStyleSettings.GetLightColor() );
pWin->DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) );
- pWin->DrawLine( Point( 0, nDY-7 ), Point( nDX-1, nDY-7 ) );
+ pWin->DrawLine( Point( 0, 1 ), Point( nDX-1, 1 ) );
break;
case WINDOWALIGN_LEFT:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-1 ) );
- pWin->DrawLine( Point( nDX-8, 0 ), Point( nDX-8, nDY-1 ) );
+ pWin->DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-2 ) );
+ pWin->DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) );
+ pWin->DrawLine( Point( 0, nDY-2 ), Point( nDX-2, nDY-2 ) );
+
+ pWin->SetLineColor( rStyleSettings.GetLightColor() );
+ pWin->DrawLine( Point( nDX-1, 0 ), Point( nDX-1, nDY-1 ) );
+ pWin->DrawLine( Point( 0, 1 ), Point( nDX-3, 1 ) );
+ pWin->DrawLine( Point( 0, nDY-1 ), Point( nDX-2, nDY-1 ) );
break;
default:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) );
- pWin->DrawLine( Point( 6, 0 ), Point( 6, nDY-1 ) );
+ pWin->DrawLine( Point( 0, 0 ), Point( 0, nDY-2 ) );
+ pWin->DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) );
+ pWin->DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) );
+
+ pWin->SetLineColor( rStyleSettings.GetLightColor() );
+ pWin->DrawLine( Point( 1, 1 ), Point( 1, nDY-3 ) );
+ pWin->DrawLine( Point( 1, 1 ), Point( nDX-1, 1 ) );
+ pWin->DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) );
}
}
}
@@ -214,27 +234,31 @@ void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin )
{
case WINDOWALIGN_LEFT:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, 0 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, nDY-3 ) );
+ pWin->DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, 1 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, nDY-2 ) );
+
pWin->SetLineColor( rStyleSettings.GetLightColor() );
- pWin->DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN, 1 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN, nDY-4 ) );
+ pWin->DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN, 1 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN, nDY-3 ) );
break;
case WINDOWALIGN_RIGHT:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( SPLITWIN_SPLITSIZEEXLN-1, 0 ), Point( SPLITWIN_SPLITSIZEEXLN-1, nDY-3 ) );
+ pWin->DrawLine( Point( SPLITWIN_SPLITSIZEEXLN-1, 0 ), Point( SPLITWIN_SPLITSIZEEXLN-1, nDY-2 ) );
+
pWin->SetLineColor( rStyleSettings.GetLightColor() );
- pWin->DrawLine( Point( SPLITWIN_SPLITSIZEEXLN, 1 ), Point( SPLITWIN_SPLITSIZEEXLN, nDY-4 ) );
+ pWin->DrawLine( Point( SPLITWIN_SPLITSIZEEXLN, 1 ), Point( SPLITWIN_SPLITSIZEEXLN, nDY-3 ) );
break;
case WINDOWALIGN_TOP:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( 0, nDY-SPLITWIN_SPLITSIZEEXLN-1 ), Point( nDX-3, nDY-SPLITWIN_SPLITSIZEEXLN-1 ) );
+ pWin->DrawLine( Point( 0, nDY-SPLITWIN_SPLITSIZEEXLN-1 ), Point( nDX-1, nDY-SPLITWIN_SPLITSIZEEXLN-1 ) );
+
pWin->SetLineColor( rStyleSettings.GetLightColor() );
- pWin->DrawLine( Point( 1, nDY-SPLITWIN_SPLITSIZEEXLN ), Point( nDX-4, nDY-SPLITWIN_SPLITSIZEEXLN ) );
+ pWin->DrawLine( Point( 0, nDY-SPLITWIN_SPLITSIZEEXLN ), Point( nDX-1, nDY-SPLITWIN_SPLITSIZEEXLN ) );
break;
case WINDOWALIGN_BOTTOM:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( 0, SPLITWIN_SPLITSIZEEXLN-1 ), Point( nDX-3, SPLITWIN_SPLITSIZEEXLN-1 ) );
+ pWin->DrawLine( Point( 0, 5 ), Point( nDX-1, 5 ) );
+
pWin->SetLineColor( rStyleSettings.GetLightColor() );
- pWin->DrawLine( Point( 1, SPLITWIN_SPLITSIZEEXLN ), Point( nDX-4, SPLITWIN_SPLITSIZEEXLN ) );
+ pWin->DrawLine( Point( 0, SPLITWIN_SPLITSIZEEXLN ), Point( nDX-1, SPLITWIN_SPLITSIZEEXLN ) );
break;
}
}
commit 07fd599287655e9fcf97b28e7faedf34121dc53a
Author: Ahmad H. Al Harthi <aalharthi at kacst.edu.sa>
Date: Tue Feb 11 11:19:16 2014 +0300
fdo#59329 fix docked panels borders
Change-Id: Ia918d644fb57d6fbaeef90c8c1a6806a8d7e589c
Reviewed-on: https://gerrit.libreoffice.org/8412
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index c411b51..628d598 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -137,9 +137,9 @@ static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign,
rBottom = 0;
break;
case WINDOWALIGN_LEFT:
- rLeft = 2;
+ rLeft = 0;
rTop = 2;
- rRight = 0;
+ rRight = 2;
rBottom = 2;
break;
case WINDOWALIGN_BOTTOM:
@@ -179,48 +179,23 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin )
{
case WINDOWALIGN_BOTTOM:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) );
- pWin->DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) );
- pWin->DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-3 ) );
-
- pWin->SetLineColor( rStyleSettings.GetLightColor() );
- pWin->DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) );
- pWin->DrawLine( Point( 1, 1 ), Point( 1, nDY-3 ) );
- pWin->DrawLine( Point( nDX-1, 0 ), Point( nDX-1, nDY-1 ) );
+ pWin->DrawLine( Point( 0, 6 ), Point( nDX-1, 6 ) );
+ pWin->DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) );
break;
case WINDOWALIGN_TOP:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) );
- pWin->DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) );
- pWin->DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-1 ) );
-
- pWin->SetLineColor( rStyleSettings.GetLightColor() );
- pWin->DrawLine( Point( 1, 1 ), Point( nDX-3, 1 ) );
- pWin->DrawLine( Point( 1, 1 ), Point( 1, nDY-1 ) );
- pWin->DrawLine( Point( nDX-1, 1 ), Point( nDX-1, nDY-1 ) );
+ pWin->DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) );
+ pWin->DrawLine( Point( 0, nDY-7 ), Point( nDX-1, nDY-7 ) );
break;
case WINDOWALIGN_LEFT:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) );
- pWin->DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) );
- pWin->DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) );
-
- pWin->SetLineColor( rStyleSettings.GetLightColor() );
- pWin->DrawLine( Point( 1, 1 ), Point( nDX-1, 1 ) );
- pWin->DrawLine( Point( 1, 1 ), Point( 1, nDY-3 ) );
- pWin->DrawLine( Point( 1, nDY-1 ), Point( nDX-1, nDY-1 ) );
+ pWin->DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-1 ) );
+ pWin->DrawLine( Point( nDX-8, 0 ), Point( nDX-8, nDY-1 ) );
break;
default:
pWin->SetLineColor( rStyleSettings.GetShadowColor() );
- pWin->DrawLine( Point( 0, 0 ), Point( nDX-2, 0 ) );
- pWin->DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-3 ) );
- pWin->DrawLine( Point( 0, nDY-2 ), Point( nDX-2, nDY-2 ) );
-
- pWin->SetLineColor( rStyleSettings.GetLightColor() );
- pWin->DrawLine( Point( 0, 1 ), Point( nDX-3, 1 ) );
- pWin->DrawLine( Point( nDX-1, 0 ), Point( nDX-1, nDY-1 ) );
- pWin->DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) );
- break;
+ pWin->DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) );
+ pWin->DrawLine( Point( 6, 0 ), Point( 6, nDY-1 ) );
}
}
}
@@ -1650,7 +1625,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos )
void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest ) const
{
- long nSplitSize = mpMainSet->mnSplitSize-2;
+ long nSplitSize = mpMainSet->mnSplitSize-1;
if ( mbAutoHide || mbFadeOut || mbFadeIn )
nSplitSize += SPLITWIN_SPLITSIZEEX;
@@ -2000,7 +1975,7 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool
int height = (int) (0.5 * rRect.getHeight() + 0.5);
int i = rRect.Top() + (rRect.getHeight() - height) / 2;
height += i;
- const int x = rRect.Left() + 1;
+ const int x = rRect.Left() + 2;
ImplDrawFadeArrow( Point( x, i-8), bHorz, bLeft );
while( i <= height )
{
commit dffc7e6ba80ea9ae32c416abcfdeebab83b3d86d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Mar 4 14:47:13 2014 +0100
bnc#821208 DOC import: don't overwrite WW8Num* character styles
In general we're overwriting styles on import in case we're not pasting.
But these WW8Num* character styles are in general not from the document,
they are created because Writer needs a character style for each
numbering level to handle what's in the DOC file.
So, in case there is a character style with the same name as our
"character style for numbering" styles, prefer the later ones, as that's
intended most likely.
(cherry picked from commit e88ee8aa307ecec1cc22cda56b97dcfd8b838ce8)
Conflicts:
sw/qa/extras/ww8import/ww8import.cxx
Reviewed-on: https://gerrit.libreoffice.org/8449
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
Conflicts:
sw/qa/extras/ww8import/ww8import.cxx
Change-Id: I675f867722360aca765bb96b0b43ea47deab9847
diff --git a/sw/qa/extras/ww8import/data/bnc821208.doc b/sw/qa/extras/ww8import/data/bnc821208.doc
new file mode 100755
index 0000000..d89d711
Binary files /dev/null and b/sw/qa/extras/ww8import/data/bnc821208.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 97655bb..ef1621e 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -38,6 +38,7 @@ public:
void testFdo36868();
void testListNolevel();
void testCp1000039();
+ void testBnc821208();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -67,6 +68,7 @@ void Test::run()
{"fdo36868.doc", &Test::testFdo36868},
{"list-nolevel.doc", &Test::testListNolevel},
{"cp1000039.doc", &Test::testCp1000039},
+ {"bnc821208.doc", &Test::testBnc821208},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -292,6 +294,15 @@ void Test::testCp1000039()
CPPUNIT_ASSERT_EQUAL(sal_Int16(RTL_TEXTENCODING_DONTKNOW), getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharFontCharSet"));
}
+void Test::testBnc821208()
+{
+ // WW8Num1z0 earned a Symbol font, turning numbers into rectangles.
+ uno::Reference<beans::XPropertyState> xPropertyState(getStyles("CharacterStyles")->getByName("WW8Num1z0"), uno::UNO_QUERY);
+ beans::PropertyState ePropertyState = xPropertyState->getPropertyState("CharFontName");
+ // This was beans::PropertyState_DIRECT_VALUE.
+ CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DEFAULT_VALUE, ePropertyState);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 81841d5..01baf33 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3763,6 +3763,11 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty
}
bool bImport = !bStyExist || pIo->mbNewDoc; // import content ?
+
+ // Do not override character styles the list import code created earlier.
+ if (bImport && bStyExist && rSI.GetOrgWWName().SearchAscii("WW8Num") == 0)
+ bImport = false;
+
bool bOldNoImp = pIo->bNoAttrImport;
rSI.bImportSkipped = !bImport;
More information about the Libreoffice-commits
mailing list