summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/view/viewdata.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 40e9ce7a9d5a..5d1f54c07658 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -45,6 +45,7 @@
#include <attrib.hxx>
#include <tabview.hxx>
#include <tabvwsh.hxx>
+#include <docpool.hxx>
#include <docsh.hxx>
#include <patattr.hxx>
#include <editutil.hxx>
@@ -1610,6 +1611,11 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
bEditActive[eWhich] = true;
const ScPatternAttr* pPattern = mrDoc.GetPattern(nNewX, nNewY, nTabNo);
+ if (!pPattern)
+ {
+ SAL_WARN("sc.viewdata", "No Pattern Found for: Col: " << nNewX << ", Row: " << nNewY << ", Tab: " << nTabNo);
+ pPattern = &mrDoc.getCellAttributeHelper().getDefaultCellAttribute();
+ }
SvxCellHorJustify eJust = pPattern->GetItem( ATTR_HOR_JUSTIFY ).GetValue();
bool bBreak = ( eJust == SvxCellHorJustify::Block ) ||