[Libreoffice-commits] core.git: 3 commits - sw/source vcl/source writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Dec 22 00:09:17 PST 2015


 sw/source/core/view/viewsh.cxx                           |    4 +-
 vcl/source/window/layout.cxx                             |    1 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   25 ++++++---------
 writerfilter/source/dmapper/DomainMapperTableHandler.hxx |    3 -
 4 files changed, 15 insertions(+), 18 deletions(-)

New commits:
commit d6913850585eae90ea9179129fe7b60a2a4305ad
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Dec 22 09:08:18 2015 +0100

    tdf#93009 SwViewShell: fix printing of comments on the margin
    
    Clipping was set not only in case of VCL-level double buffering, but
    also during printing, which means comments were excluded from the
    output.
    
    Change-Id: Iffb7d91ca78c09e2b43133f5049d52bd7dc4e730

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index e0ff3fd..50087dc 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -204,8 +204,8 @@ void SwViewShell::DLPrePaint2(const vcl::Region& rRegion)
             mpBufferedOut = mpOut;
             mpOut = &(mpTargetPaintWindow->GetTargetOutputDevice());
         }
-        else
-            // In case mpOut is used without buffering, need to set clipping.
+        else if (isOutputToWindow())
+            // In case mpOut is used without buffering and we're not printing, need to set clipping.
             mpOut->SetClipRegion(rRegion);
 
         // remember original paint MapMode for wrapped FlyFrame paints
commit 819c97592e26f1276e3614268e35c62af2fc9bbe
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Dec 22 09:07:34 2015 +0100

    vcl: kde5 native button order is the same as kde4
    
    With this, the following scenario works again:
    
    1) Open Writer.
    2) Type some characters.
    3) ^W, right arrow, enter means "don't save".
    
    Change-Id: Icd3418f97346738475b6e5222c661fff7a01414b

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index e4efb26..33183cf 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -674,6 +674,7 @@ static int getButtonPriority(const OString &rType)
     const OUString &rEnv = Application::GetDesktopEnvironment();
 
     if (rEnv.equalsIgnoreAsciiCase("windows") ||
+        rEnv.equalsIgnoreAsciiCase("kde5") ||
         rEnv.equalsIgnoreAsciiCase("kde4") ||
         rEnv.equalsIgnoreAsciiCase("tde") ||
         rEnv.equalsIgnoreAsciiCase("kde"))
commit 4770de1bc4418d0f1c82ffae151cd6b09f839a26
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Dec 22 09:06:24 2015 +0100

    writerfilter: can use a plain instance for the table sequence here
    
    Change-Id: I34dc9cad5e7fb95eee2b0587e0a6b731571d6933

diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index ac566f7..3249a88 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -71,7 +71,7 @@ void DomainMapperTableHandler::startTable(unsigned int nRows,
                                           TablePropertyMapPtr pProps)
 {
     m_aTableProperties = pProps;
-    m_pTableSeq = TableSequencePointer_t(new TableSequence_t(nRows));
+    m_aTableSeq.realloc(nRows);
     m_nRowIndex = 0;
 
 #ifdef DEBUG_WRITERFILTER
@@ -817,7 +817,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
                     if (aCellDirectionVal->second.get<sal_Int32>() == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_TextDirection_btLr))
                     {
                         // btLr, so map ParagraphAdjust_CENTER to VertOrientation::CENTER.
-                        uno::Reference<beans::XPropertySet> xPropertySet((*m_pTableSeq)[nRow][nCell][0], uno::UNO_QUERY);
+                        uno::Reference<beans::XPropertySet> xPropertySet(m_aTableSeq[nRow][nCell][0], uno::UNO_QUERY);
                         if (xPropertySet->getPropertyValue("ParaAdjust").get<sal_Int16>() == style::ParagraphAdjust_CENTER)
                             (*aCellIterator)->Insert(PROP_VERT_ORIENT, uno::makeAny(text::VertOrientation::CENTER));
                     }
@@ -879,14 +879,14 @@ bool lcl_emptyRow(TableSequence_t& rTableSeq, sal_Int32 nRow)
 {
     if (nRow >= rTableSeq.getLength())
     {
-        SAL_WARN("writerfilter", "m_aCellProperties not in sync with m_pTableSeq?");
+        SAL_WARN("writerfilter", "m_aCellProperties not in sync with m_aTableSeq?");
         return false;
     }
 
     RowSequence_t rRowSeq = rTableSeq[nRow];
     if (rRowSeq.getLength() == 0)
     {
-        SAL_WARN("writerfilter", "m_aCellProperties not in sync with m_pTableSeq?");
+        SAL_WARN("writerfilter", "m_aCellProperties not in sync with m_aTableSeq?");
         return false;
     }
 
@@ -931,7 +931,7 @@ css::uno::Sequence<css::beans::PropertyValues> DomainMapperTableHandler::endTabl
             // tblHeader is only our property, remove before the property map hits UNO
             (*aRowIter)->Erase(PROP_TBL_HEADER);
 
-            if (lcl_hideMarks(m_aCellProperties[nRow]) && lcl_emptyRow(*m_pTableSeq, nRow))
+            if (lcl_hideMarks(m_aCellProperties[nRow]) && lcl_emptyRow(m_aTableSeq, nRow))
             {
                 // We have CellHideMark on all cells, and also all cells are empty:
                 // Set the row height to minimal as Word does.
@@ -999,17 +999,17 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel)
     lcl_DumpPropertyValueSeq(aRowProperties);
 #endif
 
-    if (m_pTableSeq->getLength() > 0)
+    if (m_aTableSeq.getLength() > 0)
     {
         uno::Reference<text::XTextRange> xStart;
         uno::Reference<text::XTextRange> xEnd;
 
         bool bFloating = !aFrameProperties.empty();
         // Additional checks: if we can do this.
-        if (bFloating && (*m_pTableSeq)[0].getLength() > 0 && (*m_pTableSeq)[0][0].getLength() > 0)
+        if (bFloating && m_aTableSeq[0].getLength() > 0 && m_aTableSeq[0][0].getLength() > 0)
         {
-            xStart = (*m_pTableSeq)[0][0][0];
-            uno::Sequence< uno::Sequence< uno::Reference<text::XTextRange> > >& rLastRow = (*m_pTableSeq)[m_pTableSeq->getLength() - 1];
+            xStart = m_aTableSeq[0][0][0];
+            uno::Sequence< uno::Sequence< uno::Reference<text::XTextRange> > >& rLastRow = m_aTableSeq[m_aTableSeq.getLength() - 1];
             uno::Sequence< uno::Reference<text::XTextRange> >& rLastCell = rLastRow[rLastRow.getLength() - 1];
             xEnd = rLastCell[1];
         }
@@ -1018,10 +1018,7 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel)
         {
             if (m_xText.is())
             {
-                xTable = m_xText->convertToTable(*m_pTableSeq,
-                        aCellProperties,
-                        aRowProperties,
-                        aTableInfo.aTableProperties);
+                xTable = m_xText->convertToTable(m_aTableSeq, aCellProperties, aRowProperties, aTableInfo.aTableProperties);
 
                 if (xTable.is())
                 {
@@ -1160,7 +1157,7 @@ void DomainMapperTableHandler::startRow(unsigned int nCells,
 
 void DomainMapperTableHandler::endRow()
 {
-    (*m_pTableSeq)[m_nRowIndex] = *m_pRowSeq;
+    m_aTableSeq[m_nRowIndex] = *m_pRowSeq;
     ++m_nRowIndex;
     m_nCellIndex = 0;
 #ifdef DEBUG_WRITERFILTER
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
index b5a34b8..e323ad9 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
@@ -33,7 +33,6 @@ typedef std::shared_ptr<CellSequence_t> CellSequencePointer_t;
 typedef css::uno::Sequence<CellSequence_t> RowSequence_t;
 typedef std::shared_ptr<RowSequence_t> RowSequencePointer_t;
 typedef css::uno::Sequence<RowSequence_t> TableSequence_t;
-typedef std::shared_ptr<TableSequence_t> TableSequencePointer_t;
 
 typedef css::uno::Sequence< css::uno::Sequence<css::beans::PropertyValues> >  CellPropertyValuesSeq_t;
 
@@ -67,7 +66,7 @@ class DomainMapperTableHandler
     DomainMapper_Impl&      m_rDMapper_Impl;
     CellSequencePointer_t   m_pCellSeq;
     RowSequencePointer_t    m_pRowSeq;
-    TableSequencePointer_t  m_pTableSeq;
+    TableSequence_t m_aTableSeq;
 
     css::uno::Reference< css::text::XTextRange >           m_xTableRange;
 


More information about the Libreoffice-commits mailing list