summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ww8import/data/fdo80333.docbin0 -> 24064 bytes
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx9
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx24
3 files changed, 23 insertions, 10 deletions
diff --git a/sw/qa/extras/ww8import/data/fdo80333.doc b/sw/qa/extras/ww8import/data/fdo80333.doc
new file mode 100644
index 000000000000..773a922bad08
--- /dev/null
+++ b/sw/qa/extras/ww8import/data/fdo80333.doc
Binary files differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 0d360d8012b1..6a48abf464c6 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -15,6 +15,7 @@
#include <com/sun/star/text/XDependentTextField.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
#include <vcl/svapp.hxx>
@@ -325,6 +326,14 @@ DECLARE_WW8IMPORT_TEST(testFdo77844, "fdo77844.doc")
#endif
}
+DECLARE_WW8IMPORT_TEST(testFdp80333, "fdo80333.doc")
+{
+ // Despite there is no character border, border shadow was imported
+ uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1),1), uno::UNO_QUERY);
+ const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xRun, "CharShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_NONE, aShadow.Location);
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 066b8db3f922..03245521b7fe 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4778,16 +4778,20 @@ void SwWW8ImplReader::Read_CharBorder(sal_uInt16 /*nId*/, const sal_uInt8* pData
WW8_BRC aBrc;
_SetWW8_BRC(bVer67, aBrc, pData);
- Set1Border(bVer67, aBoxItem, aBrc, BOX_LINE_TOP, 0, 0, true);
- Set1Border(bVer67, aBoxItem, aBrc, BOX_LINE_BOTTOM, 0, 0, true);
- Set1Border(bVer67, aBoxItem, aBrc, BOX_LINE_LEFT, 0, 0, true);
- Set1Border(bVer67, aBoxItem, aBrc, BOX_LINE_RIGHT, 0, 0, true);
- NewAttr( aBoxItem );
-
- short aSizeArray[WW8_RIGHT+1]={0}; aSizeArray[WW8_RIGHT] = 1;
- SvxShadowItem aShadowItem(RES_CHRATR_SHADOW);
- if( SetShadow( aShadowItem, &aSizeArray[0], aBrc ) )
- NewAttr( aShadowItem );
+ // WW8_BRC is empty -> no border, no shadow
+ if( !aBrc.IsEmpty(bVer67) )
+ {
+ Set1Border(bVer67, aBoxItem, aBrc, BOX_LINE_TOP, 0, 0, true);
+ Set1Border(bVer67, aBoxItem, aBrc, BOX_LINE_BOTTOM, 0, 0, true);
+ Set1Border(bVer67, aBoxItem, aBrc, BOX_LINE_LEFT, 0, 0, true);
+ Set1Border(bVer67, aBoxItem, aBrc, BOX_LINE_RIGHT, 0, 0, true);
+ NewAttr( aBoxItem );
+
+ short aSizeArray[WW8_RIGHT+1]={0}; aSizeArray[WW8_RIGHT] = 1;
+ SvxShadowItem aShadowItem(RES_CHRATR_SHADOW);
+ if( SetShadow( aShadowItem, &aSizeArray[0], aBrc ) )
+ NewAttr( aShadowItem );
+ }
}
}