[Libreoffice-commits] core.git: solenv/inc
solenv/inc/doxygen.cfg |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 81046b79f02fdbb127a4a5dd855e1a8f916532bf Author: Miklos Vajna vmik...@collabora.co.uk Date: Thu Nov 20 09:08:55 2014 +0100 doxygen: png - gif for images This reduces the amount of output in docs/ from 17G to 10G for me. No big surprise, inheritance diagrams use only a few colors, so gif's indexed colors work here nicely. Thanks Christian Lohmaier for the idea. Change-Id: I23db0c1a4dc7410cb3eb1ae99044962959fac28a diff --git a/solenv/inc/doxygen.cfg b/solenv/inc/doxygen.cfg index afd195e..a78e3f2 100644 --- a/solenv/inc/doxygen.cfg +++ b/solenv/inc/doxygen.cfg @@ -1832,7 +1832,7 @@ DIRECTORY_GRAPH= YES # HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible in IE 9+ (other browsers do not have this requirement). -DOT_IMAGE_FORMAT = png +DOT_IMAGE_FORMAT = gif # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Building on MAC OS-X 10.10 fails - Java Runtime missing
On 11/20/2014 01:15 AM, Adam Fyne wrote: So better to build using '--without-java' or better to install the older Java 1-6 ? --without-java has the negative consequence that it silently disables large parts of make check. I don't see a reason not to additionally install Apple's Java 6, as prompted. (And lobby Oracle to get their Java fixed.) ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sc/source
sc/source/ui/optdlg/calcoptionsdlg.cxx | 42 + 1 file changed, 37 insertions(+), 5 deletions(-) New commits: commit 773c90c2ca8340cbee27073450853cdc44e0f75b Author: Tor Lillqvist t...@collabora.com Date: Wed Nov 19 20:58:37 2014 +0200 Add tests for vectorized binary ops + - * / Change-Id: I0ea36081416ba3b44e57e12b172c00fa27d4e653 diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index a92b75d..046fd7f 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -965,6 +965,21 @@ IMPL_LINK( ScCalcOptionsDialog, ListDeleteClickHdl, PushButton*, ) return 0; } +#if 0 // Can't decide whether to use this or just hardcode column + // names when constructing the formulae below... + +namespace { + +OUString col(int nCol) +{ +ScAddress aAddr(nCol, 0, 0); +return aAddr.Format(SCA_VALID_COL); +} + +} + +#endif + IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, ) { // Automatically test the current implementation of OpenCL. If it @@ -987,7 +1002,7 @@ IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, ) sc::AutoCalcSwitch aACSwitch(*pDoc, true); -pDoc-SetString(ScAddress(0,0,0), =IF(SUM(A2:A4)=0,\PASS\,\FAIL\)); +pDoc-SetString(ScAddress(0,0,0), =IF(SUM(A2:A5)=0,\PASS\,\FAIL\)); // RAND sheet pDoc-InsertTab(1, RAND); @@ -999,13 +1014,30 @@ IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, ) #else pDoc-SetValue(ScAddress(0,i,1), (i%13)/13.); #endif -pDoc-SetValue(ScAddress(1,i,1), comphelper::rng::uniform_real_distribution(0, 1000)); +double nLarge = comphelper::rng::uniform_real_distribution(0, 1000); +pDoc-SetValue(ScAddress(1,i,1), nLarge); // The [0.1,2.5) interval is carefully chosen to keep the product of them likely sane -pDoc-SetValue(ScAddress(6,i,1), comphelper::rng::uniform_real_distribution(0.1, 2.5)); +double nSmall = comphelper::rng::uniform_real_distribution(0.1, 2.5); +pDoc-SetValue(ScAddress(6,i,1), nSmall); pDoc-SetString(ScAddress(10,i,1), OUString(=IF(AND(A) + OUString::number(i+1) + = 0,A + OUString::number(i+1) + = 1),0,1)); + +pDoc-SetString(ScAddress(20,i,1), OUString(=B) + OUString::number(i+1) + +G + OUString::number(i+1)); +pDoc-SetString(ScAddress(21,i,1), OUString(=B) + OUString::number(i+1) + -G + OUString::number(i+1)); +pDoc-SetString(ScAddress(22,i,1), OUString(=B) + OUString::number(i+1) + *G + OUString::number(i+1)); +pDoc-SetString(ScAddress(23,i,1), OUString(=B) + OUString::number(i+1) + /G + OUString::number(i+1)); + +pDoc-SetString(ScAddress(30,i,1), +OUString(=IF(ABS(U) + OUString::number(i+1) + - + OUString::number(nLarge+nSmall) + ) + sEpsilon + ,0,1)); +pDoc-SetString(ScAddress(31,i,1), +OUString(=IF(ABS(V) + OUString::number(i+1) + - + OUString::number(nLarge-nSmall) + ) + sEpsilon +,0,1)); +pDoc-SetString(ScAddress(32,i,1), +OUString(=IF(ABS(W) + OUString::number(i+1) + - + OUString::number(nLarge*nSmall) + ) + sEpsilon + ,0,1)); +pDoc-SetString(ScAddress(33,i,1), +OUString(=IF(ABS(X) + OUString::number(i+1) + - + OUString::number(nLarge/nSmall) + ) + sEpsilon + ,0,1)); } pDoc-SetString(ScAddress(0,1,0), OUString(=SUM(RAND.K1:RAND.K) + sN + )); +pDoc-SetString(ScAddress(0,2,0), OUString(=SUM(RAND.AE1:RAND.AH) + sN + )); for (int i = 0; i N/3; ++i) { @@ -1036,7 +1068,7 @@ IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, ) OUString(=IF((H) + OUString::number(i+1) + - + OUString::number(nProduct) + )/H + OUString::number(i+1) + + sEpsilon + ,0,1); } -pDoc-SetString(ScAddress(0,2,0), OUString(=SUM(RAND.M1:RAND.Q) + OUString::number(N/3) + )); +pDoc-SetString(ScAddress(0,3,0), OUString(=SUM(RAND.M1:RAND.Q) + OUString::number(N/3) + )); // MISCMATH sheet pDoc-InsertTab(2, MISCMATH); @@ -1097,7 +1129,7 @@ IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, ) OUString(=IF(ABS(H) + is + -r + is + ) + sEpsilon + ,0,1)); } -pDoc-SetString(ScAddress(0,3,0), =SUM(MISCMATH.V1:MISCMATH.AB1000)); +pDoc-SetString(ScAddress(0,4,0), =SUM(MISCMATH.V1:MISCMATH.AB1000)); return 0; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cppu/source
cppu/source/threadpool/current.cxx |2 ++ cppu/source/threadpool/current.hxx | 10 +- 2 files changed, 7 insertions(+), 5 deletions(-) New commits: commit 924b378a79e04d3b8b5ca2a06eadacee5a00997b Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 09:36:32 2014 +0100 Clean up includes Change-Id: Id3aaae19d86b706fd5ddb5982340472d28a75610 diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx index a173140..6c66320 100644 --- a/cppu/source/threadpool/current.cxx +++ b/cppu/source/threadpool/current.cxx @@ -17,7 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include sal/config.h +#include rtl/byteseq.h #include rtl/uuid.h #include osl/thread.h #include osl/mutex.hxx diff --git a/cppu/source/threadpool/current.hxx b/cppu/source/threadpool/current.hxx index d69d1ea..ea26851d 100644 --- a/cppu/source/threadpool/current.hxx +++ b/cppu/source/threadpool/current.hxx @@ -20,18 +20,18 @@ #ifndef INCLUDED_CPPU_SOURCE_THREADPOOL_CURRENT_HXX #define INCLUDED_CPPU_SOURCE_THREADPOOL_CURRENT_HXX -#include rtl/byteseq.h +#include sal/config.h -typedef struct _uno_ExtEnvironment uno_ExtEnvironment; +#include sal/types.h + +struct _uno_ExtEnvironment; namespace cppu { -struct CurrentContext; - struct IdContainer { void * pCurrentContext; -uno_ExtEnvironment * pCurrentContextEnv; +_uno_ExtEnvironment * pCurrentContextEnv; boolbInit; sal_Sequence * pLocalThreadId; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sd/source
sd/source/ui/animations/CustomAnimationDialog.cxx |3 ++- sd/source/ui/animations/CustomAnimationPane.cxx | 20 2 files changed, 10 insertions(+), 13 deletions(-) New commits: commit 685b6922351756b8caabcf4648fc3d7b274d398c Author: Julien Nabet serval2...@yahoo.fr Date: Mon Nov 3 23:28:43 2014 +0100 Resolves fdo#85750: Custom Animation timeing does not retain settings Conflicts: sd/source/ui/animations/CustomAnimationPane.cxx Reviewed-on: https://gerrit.libreoffice.org/12236 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com (cherry picked from commit 236819ecfa38360aa72d1061808b20204a0af594) Conflicts: sd/source/ui/animations/CustomAnimationPane.cxx Change-Id: Id6bbd113630348493ed1e67da72c7a42c5188b44 Reviewed-on: https://gerrit.libreoffice.org/12410 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index ae0fea1..76bb6b5 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -1955,6 +1955,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet ) { case 0: break; + case 6: { Event aEvent; @@ -1968,7 +1969,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet ) break; default: { -OUString aText( mpCBRepeat-GetText() ); +OUString aText(mpCBRepeat-GetEntry(nPos)); if( !aText.isEmpty() ) aRepeatCount = aText.toDouble(); } diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 775c8e2..ff3b2ba 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -134,24 +134,20 @@ void fillDurationComboBox( ListBox* pBox ) void fillRepeatComboBox( ListBox* pBox ) { OUString aNone( SD_RESSTR( STR_CUSTOMANIMATION_REPEAT_NONE ) ); -pBox-SetEntryData( pBox-InsertEntry( aNone ), (void*)((sal_Int32)0) ); - -pBox-SetEntryData( pBox-InsertEntry( OUString::number( 2 ) ), (void*)((sal_Int32)1) ); -pBox-SetEntryData( pBox-InsertEntry( OUString::number( 3 ) ), (void*)((sal_Int32)3) ); -pBox-SetEntryData( pBox-InsertEntry( OUString::number( 4 ) ), (void*)((sal_Int32)4) ); -pBox-SetEntryData( pBox-InsertEntry( OUString::number( 5 ) ), (void*)((sal_Int32)5) ); -pBox-SetEntryData( pBox-InsertEntry( OUString::number( 10 ) ), (void*)((sal_Int32)10) ); +pBox-InsertEntry(aNone); +pBox-InsertEntry(OUString::number(2)); +pBox-InsertEntry(OUString::number(3)); +pBox-InsertEntry(OUString::number(4)); +pBox-InsertEntry(OUString::number(5)); +pBox-InsertEntry(OUString::number(10)); OUString aUntilClick( SD_RESSTR( STR_CUSTOMANIMATION_REPEAT_UNTIL_NEXT_CLICK ) ); -pBox-SetEntryData( pBox-InsertEntry( aUntilClick ), (void*)((sal_Int32)-1) ); +pBox-InsertEntry(aUntilClick); OUString aEndOfSlide( SD_RESSTR( STR_CUSTOMANIMATION_REPEAT_UNTIL_END_OF_SLIDE ) ); -pBox-SetEntryData( pBox-InsertEntry( aEndOfSlide ), (void*)((sal_Int32)-2) ); +pBox-InsertEntry(aEndOfSlide); } - - - CustomAnimationPane::CustomAnimationPane( ::Window* pParent, ViewShellBase rBase, const cssu::Referencecss::frame::XFrame rxFrame, const Size rMinSize ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/qa sw/source
sw/qa/extras/uiwriter/data/commented-word.odt |binary sw/qa/extras/uiwriter/uiwriter.cxx| 15 +++ sw/source/core/unocore/unofield.cxx | 14 ++ 3 files changed, 29 insertions(+) New commits: commit dd28346b4f9bd116616cd4e574f74aa5745aca60 Author: Miklos Vajna vmik...@collabora.co.uk Date: Tue Nov 18 09:05:12 2014 +0100 fdo#86131 SwXTextField::getAnchor: handle postit field with annotation mark (cherry picked from commit 2608512056b706bab57e36765e15f5c00668577a) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I3881c4577375a2eda053f64800d0991de6f009ad Reviewed-on: https://gerrit.libreoffice.org/12979 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/sw/qa/extras/uiwriter/data/commented-word.odt b/sw/qa/extras/uiwriter/data/commented-word.odt new file mode 100644 index 000..ab423fa Binary files /dev/null and b/sw/qa/extras/uiwriter/data/commented-word.odt differ diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 6ec70b6..53f967a 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -37,6 +37,7 @@ public: void testFdo75898(); void testFdo74981(); void testCp171(); +void testCommentedWord(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -49,6 +50,7 @@ public: CPPUNIT_TEST(testFdo75898); CPPUNIT_TEST(testFdo74981); CPPUNIT_TEST(testCp171); +CPPUNIT_TEST(testCommentedWord); CPPUNIT_TEST_SUITE_END(); private: @@ -306,6 +308,19 @@ void SwUiWriterTest::testCp171() CPPUNIT_ASSERT_EQUAL( redlineEnd1Index, rTbl[ 1 ]-End()-nContent.GetIndex()); } +void SwUiWriterTest::testCommentedWord() +{ +// This word is commented. - string in document +createDoc(commented-word.odt); + +// Test that getAnchor() points to word, not to an empty string. +uno::Referencetext::XTextFieldsSupplier xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); +uno::Referencecontainer::XEnumerationAccess xFieldsAccess(xTextFieldsSupplier-getTextFields()); +uno::Referencecontainer::XEnumeration xFields(xFieldsAccess-createEnumeration()); +uno::Referencetext::XTextContent xField(xFields-nextElement(), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(OUString(word), xField-getAnchor()-getString()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 56be0c0..f409712 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2036,6 +2036,20 @@ SwXTextField::getAnchor() throw (uno::RuntimeException, std::exception) if (pPamForTxtFld.get() == NULL) return 0; +// If this is a postit field, then return the range of its annotation mark if it has one. +if (const SwPostItField* pPostItField = dynamic_castconst SwPostItField*(pField)) +{ +IDocumentMarkAccess* pMarkAccess = m_pImpl-m_pDoc-getIDocumentMarkAccess(); +for (IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess-getAnnotationMarksBegin(); ppMark != pMarkAccess-getAnnotationMarksEnd(); ++ppMark) +{ +if (ppMark-get()-GetName() == pPostItField-GetName()) +{ +pPamForTxtFld.reset(new SwPaM(ppMark-get()-GetMarkStart(), ppMark-get()-GetMarkEnd())); +break; +} +} +} + uno::Referencetext::XTextRange xRange = SwXTextRange::CreateXTextRange( *m_pImpl-m_pDoc, *(pPamForTxtFld-GetPoint()), pPamForTxtFld-GetMark()); return xRange; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: starmath/inc starmath/source
starmath/inc/node.hxx| 11 +--- starmath/source/mathmlimport.cxx | 93 +-- starmath/source/parse.cxx| 103 ++- 3 files changed, 101 insertions(+), 106 deletions(-) New commits: commit e05a6419a6c77b7cd11c67688f544df40cfc7c33 Author: Takeshi Abe t...@fixedpoint.jp Date: Wed Nov 19 22:22:13 2014 +0900 fix memory leaks caused with SmNodeStack SmNodeStack now frees its own pointers after use. Change-Id: Ie43eb887810a3424109708c956ccbdf97fc5a2e5 Reviewed-on: https://gerrit.libreoffice.org/12970 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 48590a9..28acdeb 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -23,13 +23,13 @@ #include vector #include ostream #include stdio.h -#include stack #include types.hxx #include token.hxx #include error.hxx #include rect.hxx #include format.hxx +#include boost/ptr_container/ptr_deque.hpp #define ATTR_BOLD 0x0001 @@ -60,18 +60,17 @@ class SmNode; class SmStructureNode; typedef boost::shared_ptrSmNode SmNodePointer; -typedef std::stack SmNode* SmNodeStack; +typedef boost::ptr_dequeSmNode SmNodeStack; typedef std::vector SmNode * SmNodeArray; typedef std::vector SmStructureNode * SmStructureNodeArray; template typename T -T* popOrZero( ::std::stackT* rStack ) +T* popOrZero( boost::ptr_dequeT rStack ) { if (rStack.empty()) return 0; -T* pTmp = rStack.top(); -rStack.pop(); -return pTmp; +auto pTmp = rStack.pop_front(); +return pTmp.release(); } enum SmScaleMode{ SCALE_NONE, SCALE_WIDTH, SCALE_HEIGHT }; diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 425538a..9d28455 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -692,7 +692,7 @@ void SmXMLContext_Helper::ApplyAttrs() SmStructureNode *pFontNode = static_castSmStructureNode * (new SmFontNode(aToken)); pFontNode-SetSubNodes(0,popOrZero(rNodeStack)); -rNodeStack.push(pFontNode); +rNodeStack.push_front(pFontNode); } if (nIsItalic != -1) { @@ -703,7 +703,7 @@ void SmXMLContext_Helper::ApplyAttrs() SmStructureNode *pFontNode = static_castSmStructureNode * (new SmFontNode(aToken)); pFontNode-SetSubNodes(0,popOrZero(rNodeStack)); -rNodeStack.push(pFontNode); +rNodeStack.push_front(pFontNode); } if (nFontSize != 0.0) { @@ -724,7 +724,7 @@ void SmXMLContext_Helper::ApplyAttrs() pFontNode-SetSizeParameter(Fraction(nFontSize),FNTSIZ_ABSOLUT); pFontNode-SetSubNodes(0,popOrZero(rNodeStack)); -rNodeStack.push(pFontNode); +rNodeStack.push_front(pFontNode); } if (!sFontFamily.isEmpty()) { @@ -741,7 +741,7 @@ void SmXMLContext_Helper::ApplyAttrs() aToken.aText = sFontFamily; SmFontNode *pFontNode = new SmFontNode(aToken); pFontNode-SetSubNodes(0,popOrZero(rNodeStack)); -rNodeStack.push(pFontNode); +rNodeStack.push_front(pFontNode); } if (!sColor.isEmpty()) { @@ -755,7 +755,7 @@ void SmXMLContext_Helper::ApplyAttrs() aToken.eType = static_castSmTokenType(tok); SmFontNode *pFontNode = new SmFontNode(aToken); pFontNode-SetSubNodes(0,popOrZero(rNodeStack)); -rNodeStack.push(pFontNode); +rNodeStack.push_front(pFontNode); } } @@ -954,7 +954,7 @@ void SmXMLPhantomContext_Impl::EndElement() (new SmFontNode(aToken)); SmNodeStack rNodeStack = GetSmImport().GetNodeStack(); pPhantom-SetSubNodes(0,popOrZero(rNodeStack)); -rNodeStack.push(pPhantom); +rNodeStack.push_front(pPhantom); } @@ -1036,8 +1036,8 @@ void SmXMLFencedContext_Impl::EndElement() aRelationArray.resize(i); while (rNodeStack.size() nElementCount) { -aRelationArray[--i] = rNodeStack.top(); -rNodeStack.pop(); +auto pNode = rNodeStack.pop_front(); +aRelationArray[--i] = pNode.release(); if (i 1 rNodeStack.size() 1) aRelationArray[--i] = new SmGlyphSpecialNode(aToken); } @@ -1049,7 +1049,7 @@ void SmXMLFencedContext_Impl::EndElement() pSNode-SetSubNodes(pLeft,pBody,pRight); pSNode-SetScaleMode(SCALE_HEIGHT); -GetSmImport().GetNodeStack().push(pSNode); +GetSmImport().GetNodeStack().push_front(pSNode); } @@ -1077,8 +1077,7 @@ void SmXMLErrorContext_Impl::EndElement() SmNodeStack rNodeStack = GetSmImport().GetNodeStack(); while (rNodeStack.size() nElementCount) { -delete
[Libreoffice-commits] core.git: sc/uiconfig
sc/uiconfig/scalc/toolbar/formatobjectbar.xml |1 + sc/uiconfig/scalc/toolbar/standardbar.xml | 12 +++- 2 files changed, 8 insertions(+), 5 deletions(-) New commits: commit f8b4f8c3a035f61a4dcc376cbbadc3a160b89239 Author: Yousuf Philips philip...@hotmail.com Date: Thu Nov 20 03:46:28 2014 +0400 fdo#85594 enabling date format and pivot table and adding a more hidden ones Change-Id: I1cd438c9d85445da97210210ddd4a6c99d6390e6 Reviewed-on: https://gerrit.libreoffice.org/12977 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/sc/uiconfig/scalc/toolbar/formatobjectbar.xml b/sc/uiconfig/scalc/toolbar/formatobjectbar.xml index 2ae836d..1518587 100644 --- a/sc/uiconfig/scalc/toolbar/formatobjectbar.xml +++ b/sc/uiconfig/scalc/toolbar/formatobjectbar.xml @@ -70,5 +70,6 @@ toolbar:toolbaritem xlink:href=.uno:LineStyle/ toolbar:toolbaritem xlink:href=.uno:FrameLineColor toolbar:visible=false/ toolbar:toolbarseparator/ + toolbar:toolbaritem xlink:href=.uno:ConditionalFormatDialog toolbar:visible=false/ toolbar:toolbaritem xlink:href=.uno:ToggleSheetGrid toolbar:visible=false/ /toolbar:toolbar diff --git a/sc/uiconfig/scalc/toolbar/standardbar.xml b/sc/uiconfig/scalc/toolbar/standardbar.xml index 4388b00..ed439fd 100644 --- a/sc/uiconfig/scalc/toolbar/standardbar.xml +++ b/sc/uiconfig/scalc/toolbar/standardbar.xml @@ -46,11 +46,13 @@ toolbar:toolbaritem xlink:href=.uno:SearchDialog/ toolbar:toolbaritem xlink:href=.uno:Navigator toolbar:visible=false/ toolbar:toolbarseparator/ - toolbar:toolbaritem xlink:href=.uno:ToggleMergeCells/ toolbar:toolbaritem xlink:href=.uno:InsertRows/ toolbar:toolbaritem xlink:href=.uno:DeleteRows/ toolbar:toolbaritem xlink:href=.uno:InsertColumns/ toolbar:toolbaritem xlink:href=.uno:DeleteColumns/ + toolbar:toolbaritem xlink:href=.uno:ToggleMergeCells/ + toolbar:toolbaritem xlink:href=.uno:SplitCell toolbar:visible=false/ + toolbar:toolbaritem xlink:href=.uno:DefinePrintArea toolbar:visible=false/ toolbar:toolbarseparator/ toolbar:toolbaritem xlink:href=.uno:DataSort/ toolbar:toolbaritem xlink:href=.uno:SortAscending/ @@ -58,14 +60,14 @@ toolbar:toolbaritem xlink:href=.uno:DataFilterAutoFilter/ toolbar:toolbarseparator/ toolbar:toolbaritem xlink:href=.uno:InsertGraphic/ - toolbar:toolbaritem xlink:href=.uno:InsertObjectChart/ toolbar:toolbaritem xlink:href=.uno:Gallery toolbar:visible=false/ - toolbar:toolbaritem xlink:href=.uno:HyperlinkDialog/ - toolbar:toolbaritem xlink:href=.uno:InsertAnnotation toolbar:visible=false/ + toolbar:toolbaritem xlink:href=.uno:InsertObjectChart/ toolbar:toolbaritem xlink:href=.uno:InsertObjectStarMath toolbar:visible=false/ + toolbar:toolbaritem xlink:href=.uno:DataDataPilotRun/ + toolbar:toolbaritem xlink:href=.uno:HyperlinkDialog/ toolbar:toolbaritem xlink:href=.uno:InsertSymbol toolbar:visible=false/ + toolbar:toolbaritem xlink:href=.uno:InsertAnnotation toolbar:visible=false/ toolbar:toolbaritem xlink:href=.uno:InsertDraw/ - toolbar:toolbaritem xlink:href=.uno:DataDataPilotRun toolbar:visible=false/ toolbar:toolbarseparator/ toolbar:toolbaritem xlink:href=.uno:FreezePanes toolbar:visible=false/ toolbar:toolbaritem xlink:href=.uno:ViewDataSourceBrowser toolbar:visible=false/ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Building on MAC OS-X 10.10 fails - Java Runtime missing
Worked. Thanks ! In case anyone else stumbles upon this thread, I've installed this: Java for OS X 2014-00 http://support.apple.com/kb/DL1572 On Thu, Nov 20, 2014 at 10:18 AM, Stephan Bergmann sberg...@redhat.com wrote: On 11/20/2014 01:15 AM, Adam Fyne wrote: So better to build using '--without-java' or better to install the older Java 1-6 ? --without-java has the negative consequence that it silently disables large parts of make check. I don't see a reason not to additionally install Apple's Java 6, as prompted. (And lobby Oracle to get their Java fixed.) -- *Adam Fyne* Interoperability Team Leader Twitter http://www.twitter.com/cloudoninc | LinkedIn http://www.linkedin.com/company/cloudon | Facebook http://www.facebook.com/cloudoninc ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: desktop/uiconfig
desktop/uiconfig/ui/updaterequireddialog.ui |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c0fbb6be4f0c9822c1a5eb97d66e4f08d9f59c66 Author: Adolfo Jayme Barrientos fit...@ubuntu.com Date: Wed Nov 19 12:05:03 2014 -0600 Fix typo in updaterequireddialog.ui Change-Id: I952486625daea6ed995b1e654d810585cce2c8c2 Reviewed-on: https://gerrit.libreoffice.org/12973 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/desktop/uiconfig/ui/updaterequireddialog.ui b/desktop/uiconfig/ui/updaterequireddialog.ui index 881bb32..b1c82d6 100644 --- a/desktop/uiconfig/ui/updaterequireddialog.ui +++ b/desktop/uiconfig/ui/updaterequireddialog.ui @@ -103,7 +103,7 @@ property name=layout_styleend/property child object class=GtkButton id=check -property name=label translatable=yesCheck for_Updates.../property +property name=label translatable=yesCheck for _Updates.../property property name=visibleTrue/property property name=can_focusTrue/property property name=can_defaultTrue/property ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svgio/source
svgio/source/svgreader/svgnode.cxx| 22 ++ svgio/source/svgreader/svgstyleattributes.cxx |7 +-- 2 files changed, 15 insertions(+), 14 deletions(-) New commits: commit 5f98e35f81c887ff55edbdbe0d264215d9faa562 Author: Chr. Rossmanith chrrossman...@gmx.de Date: Sun Nov 16 21:43:13 2014 +0100 SVG: improve handling of visibility property visible children of an invisible parent are now visible Change-Id: I2eafbd15d22f54ec39f12bfd32175925ab8a6184 Reviewed-on: https://gerrit.libreoffice.org/12504 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx index d084868..e4038e0 100644 --- a/svgio/source/svgreader/svgnode.cxx +++ b/svgio/source/svgreader/svgnode.cxx @@ -496,12 +496,6 @@ namespace svgio return; } -const SvgStyleAttributes* pStyles = getSvgStyleAttributes(); -if(pStyles (Visibility_hidden == pStyles-getVisibility() || Visibility_collapse == pStyles-getVisibility())) -{ -return; -} - if(!bReferenced) { if(SVGTokenDefs == getType() || @@ -540,11 +534,14 @@ namespace svgio if(pCandidate Display_none != pCandidate-getDisplay()) { +const SvgNodeVector rGrandChildren = pCandidate-getChildren(); const SvgStyleAttributes* pChildStyles = pCandidate-getSvgStyleAttributes(); -if(pChildStyles Visibility_hidden != pChildStyles-getVisibility()) +// decompose: +// - visible terminal nodes +// - all non-terminal nodes (might contain visible nodes down the hierarchy) +if( !rGrandChildren.empty() || ( pChildStyles (Visibility_visible == pChildStyles-getVisibility())) ) { drawinglayer::primitive2d::Primitive2DSequence aNewTarget; - pCandidate-decomposeSvgNode(aNewTarget, bReferenced); if(aNewTarget.hasElements()) @@ -552,15 +549,16 @@ namespace svgio drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aNewTarget); } } -} -else if(!pCandidate) -{ + } + else if(!pCandidate) + { OSL_ENSURE(false, Null-Pointer in child node list (!)); -} + } } if(rTarget.hasElements()) { +const SvgStyleAttributes* pStyles = getSvgStyleAttributes(); if(pStyles) { // check if we have Title or Desc diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 73fe7f8..182448f 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1230,15 +1230,18 @@ namespace svgio mbIsClipPathContent(SVGTokenClipPathNode == mrOwner.getType()), mbStrokeDasharraySet(false) { +const SvgStyleAttributes* pParentStyle = getParentStyle(); if(!mbIsClipPathContent) { -const SvgStyleAttributes* pParentStyle = getParentStyle(); - if(pParentStyle) { mbIsClipPathContent = pParentStyle-mbIsClipPathContent; } } +if(pParentStyle) +{ +maVisibility = pParentStyle-maVisibility; +} } SvgStyleAttributes::~SvgStyleAttributes() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: unoidl/source
unoidl/source/unoidl-read.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit a702b41c7746fc5e450438551b1badbf9ca0dda1 Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 10:27:31 2014 +0100 This should ideally be consistency-checked in UnoidlProvider ...but is not, for performance reasons. Change-Id: I2518eb1f1a2f84cfd836c390a418a2fcb516b82c diff --git a/unoidl/source/unoidl-read.cxx b/unoidl/source/unoidl-read.cxx index e301ba5..99a2024 100644 --- a/unoidl/source/unoidl-read.cxx +++ b/unoidl/source/unoidl-read.cxx @@ -606,9 +606,14 @@ void writeEntity( std::mapOUString, Entity::iterator k(entities.find(*j)); if (k != entities.end() !k-second.written) { OUString id(openModulesFor(modules, *j)); -assert( -k-second.entity-getSort() -== unoidl::Entity::SORT_INTERFACE_TYPE); +if (k-second.entity-getSort() +!= unoidl::Entity::SORT_INTERFACE_TYPE) +{ +std::cerr + Entity *j should be an interface type + std::endl; +std::exit(EXIT_FAILURE); +} writePublished( static_castunoidl::PublishableEntity *( k-second.entity.get())); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: instsetoo_native/inc_openoffice
instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4f18bd405831c31cd49190046f7bafd805a47d7d Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com Date: Thu Nov 20 10:31:23 2014 +0100 fix Could not merge msm file into database no idea why it fails with the typo-fix (or any change in that line for that matter)... Change-Id: I74c74e2080813ab60d4fcd48c62bb7f455046936 diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt index 4f3830d..d937499 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt @@ -111,7 +111,7 @@ CreateFolderComponent_ N Component 1 Identifier Foreign key into the Compone CreateFolder Directory_ N Directory 1 Identifier Primary key, could be foreign key into the Directory table. CustomAction Action N Identifier Primary key, name of action, normally appears in sequence table unless private use. CustomAction Source Y CustomSource The table reference of the source of the code. -CustomAction Target Y Formatted Execution parameter, depends on the type of custom action +CustomAction Target Y Formatted Excecution parameter, depends on the type of custom action CustomAction TypeN 1 32767 The numeric custom action type, consisting of source location, code type, entry, option flags. Dialog Attributes Y 0 2147483647 A 32-bit word that specifies the attribute flags to be applied to this dialog. Dialog Control_Cancel Y Control 2 Identifier Defines the cancel control. Hitting escape or clicking on the close icon on the dialog is equivalent to pushing this button. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - include/vcl vcl/opengl vcl/source vcl/unx
include/vcl/opengl/OpenGLContext.hxx |2 ++ vcl/opengl/x11/gdiimpl.cxx |3 +++ vcl/source/opengl/OpenGLContext.cxx | 17 +++-- vcl/unx/generic/gdi/salvd.cxx|9 + 4 files changed, 29 insertions(+), 2 deletions(-) New commits: commit b7342eae42faa8110807861906288d13a2e9f762 Author: Michael Meeks michael.me...@collabora.com Date: Thu Nov 20 09:45:16 2014 + vcl: update the OpenGLContext's pixmap when re-sizing a VirtualDevice. Change-Id: Iee8089fc3bfbea60adee95dfb2c229f3efea28f8 diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 058e174..c5e53e8 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -194,6 +194,8 @@ public: return mbInitialized; } +void resetToReInitialize(); + bool supportMultiSampling() const; static SystemWindowData generateWinData(vcl::Window* pParent, bool bRequestLegacyContext); diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx index dcefcc2..3385cd9 100644 --- a/vcl/opengl/x11/gdiimpl.cxx +++ b/vcl/opengl/x11/gdiimpl.cxx @@ -62,6 +62,9 @@ GLfloat X11OpenGLSalGraphicsImpl::GetHeight() const void X11OpenGLSalGraphicsImpl::Init() { X11WindowProvider *pProvider = dynamic_castX11WindowProvider*(mrParent.m_pFrame); + +// Called after eg. a vdev re-size where we need to update the underlying pixmap +maContext.resetToReInitialize(); if (pProvider) { Window aWin = pProvider-GetX11Window(); diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 6267a9f..d1c1b72 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -610,6 +610,14 @@ bool OpenGLContext::init(Display* dpy, Window win, int screen) return ImplInit(); } +void OpenGLContext::resetToReInitialize() +{ +if( !mbInitialized ) +return; +resetCurrent(); +mbInitialized = false; +} + bool OpenGLContext::init(Display* dpy, Pixmap pix, unsigned int width, unsigned int height, int nScreen) { if(mbInitialized) @@ -712,7 +720,12 @@ bool OpenGLContext::ImplInit() SAL_INFO(vcl.opengl, available GL extensions: m_aGLWin.GLExtensions); XWindowAttributes xWinAttr; -if( !XGetWindowAttributes( m_aGLWin.dpy, m_aGLWin.win, xWinAttr ) ) +if( mbPixmap ) +{ +m_aGLWin.Width = 0; // FIXME: correct ? +m_aGLWin.Height = 0; +} +else if( !XGetWindowAttributes( m_aGLWin.dpy, m_aGLWin.win, xWinAttr ) ) { SAL_WARN(vcl.opengl, Failed to get window attributes on m_aGLWin.win); m_aGLWin.Width = 0; @@ -1159,7 +1172,7 @@ void OpenGLContext::makeCurrent() SAL_INFO(vcl.opengl, OpenGLContext::makeCurrent(): Avoid setting the same context); } else if (!glXMakeCurrent( m_aGLWin.dpy, nDrawable, m_aGLWin.ctx )) -SAL_WARN(vcl.opengl, OpenGLContext::makeCurrent failed); +SAL_WARN(vcl.opengl, OpenGLContext::makeCurrent failed on drawable nDrawable pixmap? mbPixmap); #endif } diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 8e08cc2..71ec509 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -196,6 +196,8 @@ SalGraphics* X11SalVirtualDevice::AcquireGraphics() void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) { bGraphics_ = false; } +#include opengl/x11/gdiimpl.hxx + bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) { if( bExternPixmap_ ) @@ -229,8 +231,15 @@ bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) nDY_ = nDY; if( pGraphics_ ) +{ InitGraphics( this ); +// re-initialize OpenGLContext [!] having freed it's underlying pixmap above +X11OpenGLSalGraphicsImpl *pImpl = dynamic_cast X11OpenGLSalGraphicsImpl* (pGraphics_-GetImpl()); +if( pImpl ) +pImpl-Init(); +} + return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sal/osl
sal/osl/unx/file_misc.cxx | 52 +++--- 1 file changed, 22 insertions(+), 30 deletions(-) New commits: commit f12e8ff594f177f22ffb3d1849bf768ab08023bf Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 10:49:38 2014 +0100 fdo#83529: Only preserve metadata of moved, not copied files Change-Id: If3e436d137b6989af22df43c3a9a247bb2c9ffe9 diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index 44095fa..6972f36 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -572,11 +572,11 @@ oslFileError SAL_CALL osl_createDirectoryPath( } static oslFileError osl_psz_removeFile(const sal_Char* pszPath); -static oslFileError osl_psz_copyFile(const sal_Char* pszPath, const sal_Char* pszDestPath); +static oslFileError osl_psz_copyFile(const sal_Char* pszPath, const sal_Char* pszDestPath, bool preserveMetadata); static oslFileError osl_psz_moveFile(const sal_Char* pszPath, const sal_Char* pszDestPath); static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char* pszDestFileName, mode_t nMode, size_t nSourceSize, int DestFileExists); -static oslFileError oslChangeFileModes(const sal_Char* pszFileName, mode_t nMode, time_t nAcTime, time_t nModTime, uid_t nUID, gid_t nGID); +static void attemptChangeMetadata(const sal_Char* pszFileName, mode_t nMode, time_t nAcTime, time_t nModTime, uid_t nUID, gid_t nGID); static int oslDoCopyLink(const sal_Char* pszSourceFileName, const sal_Char* pszDestFileName); static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszDestFileName, size_t nSourceSize, mode_t mode); static oslFileError oslDoMoveFile(const sal_Char* pszPath, const sal_Char* pszDestPath); @@ -632,7 +632,7 @@ oslFileError SAL_CALL osl_copyFile( rtl_uString* ustrFileURL, rtl_uString* ustrD return oslTranslateFileError( OSL_FET_ERROR, errno ); #endif/* MACOSX */ -return osl_psz_copyFile( srcPath, destPath ); +return osl_psz_copyFile( srcPath, destPath, false ); } oslFileError SAL_CALL osl_removeFile( rtl_uString* ustrFileURL ) @@ -668,7 +668,7 @@ static oslFileError oslDoMoveFile( const sal_Char* pszPath, const sal_Char* pszD return tErr; } -tErr=osl_psz_copyFile(pszPath,pszDestPath); +tErr=osl_psz_copyFile(pszPath,pszDestPath, true); if ( tErr != osl_File_E_None ) { @@ -723,7 +723,7 @@ static oslFileError osl_psz_moveFile(const sal_Char* pszPath, const sal_Char* ps return osl_File_E_None; } -static oslFileError osl_psz_copyFile( const sal_Char* pszPath, const sal_Char* pszDestPath ) +static oslFileError osl_psz_copyFile( const sal_Char* pszPath, const sal_Char* pszDestPath, bool preserveMetadata ) { time_t nAcTime=0; time_t nModTime=0; @@ -786,12 +786,10 @@ static oslFileError osl_psz_copyFile( const sal_Char* pszPath, const sal_Char* p return tErr; } -/* - * mfe: ignore return code - *since only the success of the copy is - *important - */ -oslChangeFileModes(pszDestPath,nMode,nAcTime,nModTime,nUID,nGID); +if (preserveMetadata) +{ +attemptChangeMetadata(pszDestPath,nMode,nAcTime,nModTime,nUID,nGID); +} return tErr; } @@ -866,42 +864,36 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char* return osl_File_E_None; } -static oslFileError oslChangeFileModes( const sal_Char* pszFileName, mode_t nMode, time_t nAcTime, time_t nModTime, uid_t nUID, gid_t nGID) +void attemptChangeMetadata( const sal_Char* pszFileName, mode_t nMode, time_t nAcTime, time_t nModTime, uid_t nUID, gid_t nGID) { -int nRet=0; struct utimbuf aTimeBuffer; -nRet = chmod(pszFileName,nMode); -if ( nRet 0 ) +if ( chmod(pszFileName,nMode) 0 ) { -nRet=errno; -return oslTranslateFileError(OSL_FET_ERROR, nRet); +int e = errno; +SAL_INFO( +sal.osl, chmod( pszFileName ) failed with errno e); } aTimeBuffer.actime=nAcTime; aTimeBuffer.modtime=nModTime; -nRet=utime(pszFileName,aTimeBuffer); -if ( nRet 0 ) +if ( utime(pszFileName,aTimeBuffer) 0 ) { -nRet=errno; -return oslTranslateFileError(OSL_FET_ERROR, nRet); +int e = errno; +SAL_INFO( +sal.osl, utime( pszFileName ) failed with errno e); } if ( nUID != getuid() ) { nUID=getuid(); } - -nRet=chown(pszFileName,nUID,nGID); -if ( nRet 0 ) +if ( chown(pszFileName,nUID,nGID) 0 ) { -nRet=errno; - -/* mfe: do not return an error here! */ -/* return oslTranslateFileError(nRet);*/ +int e = errno; +SAL_INFO( +sal.osl, chown( pszFileName ) failed with errno e); } - -return osl_File_E_None; } static int oslDoCopyLink(const sal_Char* pszSourceFileName, const
[Libreoffice-commits] core.git: include/vcl vcl/opengl vcl/source vcl/unx
include/vcl/opengl/OpenGLContext.hxx |2 ++ vcl/opengl/x11/gdiimpl.cxx |3 +++ vcl/source/opengl/OpenGLContext.cxx | 17 +++-- vcl/unx/generic/gdi/salvd.cxx|9 + 4 files changed, 29 insertions(+), 2 deletions(-) New commits: commit 9557ae7baf3683a3c55bc55934fefba22a7c5759 Author: Michael Meeks michael.me...@collabora.com Date: Thu Nov 20 09:45:16 2014 + vcl: update the OpenGLContext's pixmap when re-sizing a VirtualDevice. Change-Id: Iee8089fc3bfbea60adee95dfb2c229f3efea28f8 diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 60746df1..471e6ce 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -195,6 +195,8 @@ public: return mbInitialized; } +void resetToReInitialize(); + bool supportMultiSampling() const; static SystemWindowData generateWinData(vcl::Window* pParent, bool bRequestLegacyContext); diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx index b3cee49..bfc1bbb 100644 --- a/vcl/opengl/x11/gdiimpl.cxx +++ b/vcl/opengl/x11/gdiimpl.cxx @@ -62,6 +62,9 @@ GLfloat X11OpenGLSalGraphicsImpl::GetHeight() const void X11OpenGLSalGraphicsImpl::Init() { X11WindowProvider *pProvider = dynamic_castX11WindowProvider*(mrParent.m_pFrame); + +// Called after eg. a vdev re-size where we need to update the underlying pixmap +maContext.resetToReInitialize(); if (pProvider) { Window aWin = pProvider-GetX11Window(); diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 6267a9f..d1c1b72 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -610,6 +610,14 @@ bool OpenGLContext::init(Display* dpy, Window win, int screen) return ImplInit(); } +void OpenGLContext::resetToReInitialize() +{ +if( !mbInitialized ) +return; +resetCurrent(); +mbInitialized = false; +} + bool OpenGLContext::init(Display* dpy, Pixmap pix, unsigned int width, unsigned int height, int nScreen) { if(mbInitialized) @@ -712,7 +720,12 @@ bool OpenGLContext::ImplInit() SAL_INFO(vcl.opengl, available GL extensions: m_aGLWin.GLExtensions); XWindowAttributes xWinAttr; -if( !XGetWindowAttributes( m_aGLWin.dpy, m_aGLWin.win, xWinAttr ) ) +if( mbPixmap ) +{ +m_aGLWin.Width = 0; // FIXME: correct ? +m_aGLWin.Height = 0; +} +else if( !XGetWindowAttributes( m_aGLWin.dpy, m_aGLWin.win, xWinAttr ) ) { SAL_WARN(vcl.opengl, Failed to get window attributes on m_aGLWin.win); m_aGLWin.Width = 0; @@ -1159,7 +1172,7 @@ void OpenGLContext::makeCurrent() SAL_INFO(vcl.opengl, OpenGLContext::makeCurrent(): Avoid setting the same context); } else if (!glXMakeCurrent( m_aGLWin.dpy, nDrawable, m_aGLWin.ctx )) -SAL_WARN(vcl.opengl, OpenGLContext::makeCurrent failed); +SAL_WARN(vcl.opengl, OpenGLContext::makeCurrent failed on drawable nDrawable pixmap? mbPixmap); #endif } diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 8e08cc2..71ec509 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -196,6 +196,8 @@ SalGraphics* X11SalVirtualDevice::AcquireGraphics() void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) { bGraphics_ = false; } +#include opengl/x11/gdiimpl.hxx + bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) { if( bExternPixmap_ ) @@ -229,8 +231,15 @@ bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) nDY_ = nDY; if( pGraphics_ ) +{ InitGraphics( this ); +// re-initialize OpenGLContext [!] having freed it's underlying pixmap above +X11OpenGLSalGraphicsImpl *pImpl = dynamic_cast X11OpenGLSalGraphicsImpl* (pGraphics_-GetImpl()); +if( pImpl ) +pImpl-Init(); +} + return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sal/osl
sal/osl/unx/file_misc.cxx | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) New commits: commit 6dbaf74eea8ffeaeeaed3f84e95bff9a7a5fbe5d Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 11:09:25 2014 +0100 Let attemptChangeMetadata work on symlink itself Change-Id: I42a81e70e76cb4699052815cfd415a8efd902b03 diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index 6972f36..fd1d902 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -868,31 +868,37 @@ void attemptChangeMetadata( const sal_Char* pszFileName, mode_t nMode, time_t nA { struct utimbuf aTimeBuffer; -if ( chmod(pszFileName,nMode) 0 ) +if ( fchmodat(AT_FDCWD, pszFileName, nMode, AT_SYMLINK_NOFOLLOW) 0 ) { int e = errno; SAL_INFO( -sal.osl, chmod( pszFileName ) failed with errno e); +sal.osl, +fchmodat( pszFileName ) failed with errno e); } -aTimeBuffer.actime=nAcTime; -aTimeBuffer.modtime=nModTime; -if ( utime(pszFileName,aTimeBuffer) 0 ) +// No way to change utime of a symlink itself: +if (!S_ISLNK(nMode)) { -int e = errno; -SAL_INFO( -sal.osl, utime( pszFileName ) failed with errno e); +aTimeBuffer.actime=nAcTime; +aTimeBuffer.modtime=nModTime; +if ( utime(pszFileName,aTimeBuffer) 0 ) +{ +int e = errno; +SAL_INFO( +sal.osl, +utime( pszFileName ) failed with errno e); +} } if ( nUID != getuid() ) { nUID=getuid(); } -if ( chown(pszFileName,nUID,nGID) 0 ) +if ( lchown(pszFileName,nUID,nGID) 0 ) { int e = errno; SAL_INFO( -sal.osl, chown( pszFileName ) failed with errno e); +sal.osl, lchown( pszFileName ) failed with errno e); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svtools/qa
svtools/qa/unit/GraphicObjectTest.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit b8689142a9760132e43eaffe9d54801ed18fb76b Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 11:14:44 2014 +0100 Dispose document when done Change-Id: I7b15220568717e159f119e79da0016cbc88873cf diff --git a/svtools/qa/unit/GraphicObjectTest.cxx b/svtools/qa/unit/GraphicObjectTest.cxx index 26298ae..0c96f15 100644 --- a/svtools/qa/unit/GraphicObjectTest.cxx +++ b/svtools/qa/unit/GraphicObjectTest.cxx @@ -223,6 +223,8 @@ void GraphicObjectTest::testSizeBasedAutoSwap() CPPUNIT_ASSERT(!pGrafObj1-IsSwappedOut()); CPPUNIT_ASSERT(!pGrafObj2-IsSwappedOut()); } + +xComponent-dispose(); } CPPUNIT_TEST_SUITE_REGISTRATION(GraphicObjectTest); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - 2 commits - include/vcl vcl/source
include/vcl/outdev.hxx |1 - vcl/source/app/svapp.cxx |2 +- vcl/source/outdev/bitmap.cxx | 22 -- vcl/source/window/window.cxx |2 +- 4 files changed, 2 insertions(+), 25 deletions(-) New commits: commit 5ec1c4f096e65b67e7d0a322fd936b62cf7a82cc Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 11:04:24 2014 +0100 vcl: If there it a MapMode, it is applied. Based on that, I believe this condition can go too. Change-Id: I88d8211678ca148bdf85729f57893e1476a52fc9 diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index f6f387f..e912086 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -522,17 +522,6 @@ void OutputDevice::DrawDeviceBitmap( const Point rDestPt, const Size rDestSize SalBitmap* pSalAlphaBmp = pMaskBmp-ImplGetSalBitmap(); bool bTryDirectPaint(pSalSrcBmp pSalAlphaBmp); -if (bTryDirectPaint) -{ -// only paint direct when no MapMode, else the -// more expensive conversions may be done for short-time Bitmap/BitmapEx -// used for buffering only -if (IsMapModeEnabled()) -{ -bTryDirectPaint = false; -} -} - if (bTryDirectPaint mpGraphics-DrawAlphaBitmap(aPosAry, *pSalSrcBmp, *pSalAlphaBmp, this)) { // tried to paint as alpha directly. If tis worked, we are done (except @@ -661,17 +650,6 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap rBmp, const AlphaMask r // separate alpha VDev bool bTryDirectPaint(!pDisableNative !bHMirr !bVMirr); -if (bTryDirectPaint) -{ -// only paint direct when no MapMode, else the -// more expensive conversions may be done for short-time Bitmap/BitmapEx -// used for buffering only -if (IsMapModeEnabled()) -{ -bTryDirectPaint = false; -} -} - if(bTryDirectPaint) { Point aRelPt = aOutPt + Point( mnOutOffX, mnOutOffY ); commit 40581a8e105878d751d3ac02d015403f0527f3a9 Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 10:14:23 2014 +0100 vcl: Kill IsMapMode(), it means the same as IsMapModeEnabled(). Change-Id: I65fd40b8268cb0a27ba40da60fcf8e84cc8f7661 diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 8d28680..3b7a00d 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1560,7 +1560,6 @@ public: virtual voidSetMapMode( const MapMode rNewMapMode ); virtual voidSetRelativeMapMode( const MapMode rNewMapMode ); const MapMode GetMapMode() const { return maMapMode; } -boolIsMapMode() const { return mbMap; } // #i75163# basegfx::B2DHomMatrix GetViewTransformation() const; diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index c9dd3c7..8d99977 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -595,7 +595,7 @@ void Application::SetSettings( const AllSettings rSettings ) { pVirDev-mnDPIX = pFirstFrame-mnDPIX; pVirDev-mnDPIY = pFirstFrame-mnDPIY; -if ( pVirDev-IsMapMode() ) +if (pVirDev-IsMapModeEnabled()) { MapMode aMapMode = pVirDev-GetMapMode(); pVirDev-SetMapMode(); diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index f4304ac..f6f387f 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -527,7 +527,7 @@ void OutputDevice::DrawDeviceBitmap( const Point rDestPt, const Size rDestSize // only paint direct when no MapMode, else the // more expensive conversions may be done for short-time Bitmap/BitmapEx // used for buffering only -if (IsMapMode()) +if (IsMapModeEnabled()) { bTryDirectPaint = false; } @@ -666,7 +666,7 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap rBmp, const AlphaMask r // only paint direct when no MapMode, else the // more expensive conversions may be done for short-time Bitmap/BitmapEx // used for buffering only -if (IsMapMode()) +if (IsMapModeEnabled()) { bTryDirectPaint = false; } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 5789a89..cabf455 100644 --- a/vcl/source/window/window.cxx
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source
sc/source/core/data/table3.cxx |7 +-- sc/source/ui/undo/undosort.cxx |3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) New commits: commit 1f0bca308e677a3e7a75837f93f14b679f698846 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Sun Oct 26 14:43:14 2014 -0700 fdo#85215: Don't adjust references wrt cell position when disabled. Change-Id: Ie1a12cc189bcb66fad59ea9901ac0dc95bb68788 (cherry picked from commit 10fc138307afb4b39baddb0d56eb8e986e5d29ea) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index c36b4cd..d646678 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -864,8 +864,11 @@ void ScTable::SortReorderByRow( ScAddress aOldPos = rCell.maCell.mpFormula-aPos; ScFormulaCell* pNew = rCell.maCell.mpFormula-Clone( aCellPos, SC_CLONECELL_DEFAULT); -pNew-CopyAllBroadcasters(*rCell.maCell.mpFormula); -pNew-GetCode()-AdjustReferenceOnMovedOrigin(aOldPos, aCellPos); +if (pArray-IsUpdateRefs()) +{ +pNew-CopyAllBroadcasters(*rCell.maCell.mpFormula); +pNew-GetCode()-AdjustReferenceOnMovedOrigin(aOldPos, aCellPos); +} sc::CellStoreType::iterator itBlk = rCellStore.push_back(pNew); } diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx index 36156fe..4a00707 100644 --- a/sc/source/ui/undo/undosort.cxx +++ b/sc/source/ui/undo/undosort.cxx @@ -46,8 +46,7 @@ void UndoSort::Execute( bool bUndo ) ScUndoUtil::MarkSimpleBlock(pDocShell, maParam.maSortRange); -pDocShell-PostPaint(maParam.maSortRange, PAINT_GRID); -pDocShell-PostDataChanged(); +rDoc.SetDirty(maParam.maSortRange); if (!aParam.mbUpdateRefs) rDoc.BroadcastCells(aParam.maSortRange, SC_HINT_DATACHANGED); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sal/osl
sal/osl/unx/file_misc.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 07113bc943ca117c8ebe4b94bfbfde58ea35d972 Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 11:31:46 2014 +0100 At least old Mac OS X does not know AT_FDCWD ...lets hope it is actually declared as a macro wherever it is known. Change-Id: If541d02af3ac5d9ad4f0ac1cb4dd9f9f4550a78a diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index fd1d902..abb7a18 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -868,12 +868,15 @@ void attemptChangeMetadata( const sal_Char* pszFileName, mode_t nMode, time_t nA { struct utimbuf aTimeBuffer; +#if !defined AT_FDCWD +if (!S_ISLNK(nMode) chmod(pszFileName, nMode) 0) +#else if ( fchmodat(AT_FDCWD, pszFileName, nMode, AT_SYMLINK_NOFOLLOW) 0 ) +#endif { int e = errno; SAL_INFO( -sal.osl, -fchmodat( pszFileName ) failed with errno e); +sal.osl, chmod( pszFileName ) failed with errno e); } // No way to change utime of a symlink itself: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/column.hxx | 12 +++- sc/source/core/data/column4.cxx | 10 ++ sc/source/core/data/table3.cxx |3 ++- 3 files changed, 15 insertions(+), 10 deletions(-) New commits: commit 115a4b7ca36f65d93070d2e81048320d202e87a3 Author: Eike Rathke er...@redhat.com Date: Mon Nov 17 22:44:56 2014 +0100 fdo#83765 do not update references in SortReorderByColumn() if disabled Similar to SortReorderByRow() Change-Id: I11dd710c00a56a5f56aeb048fa2258631555a220 diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 19bb2aa..a46e55d 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -596,18 +596,20 @@ public: /** * Reset column position of formula cells within specified row range. - * Reference positions are also adjusted to reflect the new position so - * that the formula cells still reference the same cells or ranges after - * the position change. The position of a formula cell before the - * call is interpreted as the old position of that cell. + * If bUpdateRefs==true then reference positions are also adjusted to + * reflect the new position so that the formula cells still reference the + * same cells or ranges after the the position change. + * The position of a formula cell before the call is interpreted as the old + * position of that cell. * * Caller needs to ensure that no formula groups cross the top and bottom * row boundaries. * * @param nRow1 top row boundary * @param nRow2 bottom row boundary + * @param bUpdateRefs whether to adjust references */ -void ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2 ); +void ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2, bool bUpdateRefs ); void SplitFormulaGroupByRelativeRef( const ScRange rBoundRange ); diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 0a437e7..ba6d015 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -1008,8 +1008,9 @@ namespace { class FormulaColPosSetter { SCCOL mnCol; +bool mbUpdateRefs; public: -FormulaColPosSetter( SCCOL nCol ) : mnCol(nCol) {} +FormulaColPosSetter( SCCOL nCol, bool bUpdateRefs ) : mnCol(nCol), mbUpdateRefs(bUpdateRefs) {} void operator() ( size_t nRow, ScFormulaCell* pCell ) { @@ -1020,7 +1021,8 @@ public: ScAddress aOldPos = pCell-aPos; pCell-aPos.SetCol(mnCol); pCell-aPos.SetRow(nRow); -pCell-GetCode()-AdjustReferenceOnMovedOrigin(aOldPos, pCell-aPos); +if (mbUpdateRefs) +pCell-GetCode()-AdjustReferenceOnMovedOrigin(aOldPos, pCell-aPos); } else { @@ -1032,9 +1034,9 @@ public: } -void ScColumn::ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2 ) +void ScColumn::ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2, bool bUpdateRefs ) { -FormulaColPosSetter aFunc(nCol); +FormulaColPosSetter aFunc(nCol, bUpdateRefs); sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aFunc); } diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index c42f777..160 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -714,8 +714,9 @@ void ScTable::SortReorderByColumn( } // Reset formula cell positions which became out-of-sync after column reordering. +bool bUpdateRefs = pArray-IsUpdateRefs(); for (SCCOL nCol = nStart; nCol = nLast; ++nCol) -aCol[nCol].ResetFormulaCellPositions(nRow1, nRow2); +aCol[nCol].ResetFormulaCellPositions(nRow1, nRow2, bUpdateRefs); // Set up column reorder map (for later broadcasting of reference updates). sc::ColRowReorderMapType aColMap; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/inc sw/qa sw/source
sw/inc/ndtxt.hxx|3 ++ sw/qa/extras/ooxmlexport/data/num-override-lvltext.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx|3 ++ sw/source/core/text/txtfld.cxx | 23 +++- sw/source/core/txtnode/thints.cxx |7 ++-- 5 files changed, 31 insertions(+), 5 deletions(-) New commits: commit b2c1474c1dc93b69f0ede03fc5c9ab496c669955 Author: Miklos Vajna vmik...@collabora.co.uk Date: Thu Nov 20 11:02:45 2014 +0100 SwTxtNode::IsIgnoredCharFmtForNumbering: ignore RES_CHRATR_COLOR And also in SwTxtFormatter::NewNumberPortion(), use SwTxtNode::IsIgnoredCharFmtForNumbering(), via checkApplyParagraphMarkFormatToNumbering(). Otherwise the color of the paragraph mark is inherited by the numbering portion, which is not what IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING (mirroring Word's behavior) is supposed to do. Change-Id: I5d8df9b404916cc4a4405bf796d971ede59e6111 diff --git a/sw/qa/extras/ooxmlexport/data/num-override-lvltext.docx b/sw/qa/extras/ooxmlexport/data/num-override-lvltext.docx index 5ee3602..fe3142d 100644 Binary files a/sw/qa/extras/ooxmlexport/data/num-override-lvltext.docx and b/sw/qa/extras/ooxmlexport/data/num-override-lvltext.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 8c78d45..519ad65 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -596,6 +596,9 @@ DECLARE_OOXMLEXPORT_TEST(testNumOverrideLvltext, num-override-lvltext.docx) uno::Referencecontainer::XIndexAccess xRules = getProperty uno::Referencecontainer::XIndexAccess (getStyles(NumberingStyles)-getByName(WWNum1), NumberingRules); // This was 1, i.e. the numbering on the second level was 1, not 1.1. CPPUNIT_ASSERT_EQUAL(sal_Int16(2), comphelper::SequenceAsHashMap(xRules-getByIndex(1))[ParentNumbering].getsal_Int16()); + +// The paragraph marker's red font color was inherited by the number portion, this was ff. +CPPUNIT_ASSERT_EQUAL(OUString(0a), parseDump(//Special[@nType='POR_NUMBER']/pFont, color)); } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index 9c39353..f3049fb 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -52,6 +52,7 @@ #include flddat.hxx #include fmtautofmt.hxx #include IDocumentSettingAccess.hxx +#include svl/itemiter.hxx static bool lcl_IsInBody( SwFrm *pFrm ) { @@ -427,7 +428,27 @@ static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTxtForm hint-GetStart() == *hint-GetEnd() hint-GetStart() == node-Len()) { boost::shared_ptrSfxItemSet pSet(hint-GetAutoFmt().GetStyleHandle()); -pNumFnt-SetDiffFnt( pSet.get(), pIDSA ); + +// Check each item and in case it should be ignored, then clear it. +boost::shared_ptrSfxItemSet pCleanedSet; +if (pSet.get()) +{ +pCleanedSet.reset(pSet-Clone()); + +SfxItemIter aIter(*pSet); +const SfxPoolItem* pItem = aIter.GetCurItem(); +while (true) +{ +if (SwTxtNode::IsIgnoredCharFmtForNumbering(pItem-Which())) +pCleanedSet-ClearItem(pItem-Which()); + +if (aIter.IsAtEnd()) +break; + +pItem = aIter.NextItem(); +} +} +pNumFnt-SetDiffFnt(pCleanedSet.get(), pIDSA); } } } diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 0308eb5..0e089f3 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1781,7 +1781,7 @@ void SwTxtNode::DelSoftHyph( const sal_Int32 nStt, const sal_Int32 nEnd ) bool SwTxtNode::IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich) { -return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_BACKGROUND || nWhich == RES_CHRATR_ESCAPEMENT); +return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_COLOR || nWhich == RES_CHRATR_BACKGROUND || nWhich == RES_CHRATR_ESCAPEMENT); } //In MS Word, following properties of the paragraph end position wont affect the formatting of bullets, so we ignore them: commit 96664bf0152ecf8ee64aa6b22ed399c1866117f1 Author: Miklos Vajna vmik...@collabora.co.uk Date: Thu Nov 20 09:54:15 2014 +0100 sw: move IsIgnoredCharFmtForNumbering() to SwTxtNode I need this in SwTxtFormatter. Change-Id: Ib1586299f468a88e92fdb367fbab69a683791dc9 diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 66960e1..77c93c9 100644 ---
[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - sc/source
sc/source/ui/view/output2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6c2d0e1187e3523bdbcb2abe382b35be67a512b7 Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 11:52:37 2014 +0100 One more IsMapMode() - IsMapModeEnabled(). Change-Id: Id8e5ca61eedb7607b5ef9d7e67bee47c87d4990b diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index f81eb3d..fc3535e 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -795,7 +795,7 @@ bool ScDrawStringsVars::HasEditCharacters() const double ScOutputData::GetStretch() { -if ( mpRefDevice-IsMapMode() ) +if ( mpRefDevice-IsMapModeEnabled() ) { // If a non-trivial MapMode is set, its scale is now already // taken into account in the OutputDevice's font handling ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ooxmlexport/ooxmlexport.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit b1b29ae795ff86097b21907f814d94bd5488929d Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 12:06:11 2014 +0100 ...at least, that's the value for me on Mac with retina Change-Id: I041b497bab9415b2b33d6b4b91f3c58ea9dbc05f diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 519ad65..96b0d0ee 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -484,9 +484,7 @@ DECLARE_OOXMLEXPORT_TEST(testCropPixel, crop-pixel.docx) // This is 17667 in the original document, was 504666 (so the image // become invisible), now is around 19072. (void) pXmlDoc; -#ifndef MACOSX -CPPUNIT_ASSERT(getXPath(pXmlDoc, //a:srcRect, l).toInt32() 2); -#endif +CPPUNIT_ASSERT(getXPath(pXmlDoc, //a:srcRect, l).toInt32() = 21856); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/core/edit/edundo.cxx | 15 ++- sw/source/core/txtnode/thints.cxx | 15 +++ sw/source/core/unocore/unocoll.cxx | 16 +--- sw/source/core/unocore/unorefmk.cxx | 14 +++--- sw/source/core/unocore/unotbl.cxx | 10 +- sw/source/uibase/shells/frmsh.cxx | 27 +-- 6 files changed, 47 insertions(+), 50 deletions(-) New commits: commit 47bc38926f18c9cfa93722e98ab29ce69658c9b8 Author: Michael Stahl mst...@redhat.com Date: Thu Nov 20 12:00:48 2014 +0100 sw: convert more legacy asserts Change-Id: I602913a1cfb8dda072945770a585e6cd9fd3e134 diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index e3a928d..f657c06 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -132,9 +132,8 @@ bool SwEditShell::Undo(sal_uInt16 const nCount) || bRet; } } catch (const ::com::sun::star::uno::Exception e) { -OSL_TRACE(SwEditShell::Undo(): exception caught:\n %s, -OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8) -.getStr()); +SAL_WARN(sw.core, +SwEditShell::Undo(): exception caught: e.Message); } if (bRestoreCrsr) @@ -189,9 +188,8 @@ bool SwEditShell::Redo(sal_uInt16 const nCount) || bRet; } } catch (const ::com::sun::star::uno::Exception e) { -OSL_TRACE(SwEditShell::Redo(): exception caught:\n %s, -OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8) -.getStr()); +SAL_WARN(sw.core, +SwEditShell::Redo(): exception caught: e.Message); } Pop( !bRestoreCrsr ); @@ -220,9 +218,8 @@ bool SwEditShell::Repeat(sal_uInt16 const nCount) bRet = GetDoc()-GetIDocumentUndoRedo().Repeat( context, nCount ) || bRet; } catch (const ::com::sun::star::uno::Exception e) { -OSL_TRACE(SwEditShell::Repeat(): exception caught:\n %s, -OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8) -.getStr()); +SAL_WARN(sw.core, +SwEditShell::Repeat(): exception caught: e.Message); } EndAllAction(); diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 0e089f3..5ec497a 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -389,7 +389,7 @@ SwpHints::TryInsertNesting( SwTxtNode rNode, SwTxtAttrNesting rNewHint ) switch (splitPolicy(nNewWhich, nOtherWhich)) { case FAIL: -OSL_TRACE(cannot insert hint: overlap detected); +SAL_INFO(sw.core, cannot insert hint: overlap); ::std::for_each(SplitNew.begin(), SplitNew.end(), TxtAttrDeleter(*rNode.GetDoc())); return false; @@ -485,7 +485,7 @@ SwpHints::TryInsertNesting( SwTxtNode rNode, SwTxtAttrNesting rNewHint ) { if ( MAX_HINTS = Count() ) { -OSL_FAIL(hints array full :-(); +SAL_INFO(sw.core, hints array full :-(); return false; } SwTxtAttrNesting * const pOtherLeft( @@ -504,7 +504,7 @@ SwpHints::TryInsertNesting( SwTxtNode rNode, SwTxtAttrNesting rNewHint ) { if ( MAX_HINTS = Count() ) { -OSL_FAIL(hints array full :-(); +SAL_INFO(sw.core, hints array full :-(); return false; } SwTxtAttrNesting * const pOtherRight( @@ -522,7 +522,7 @@ SwpHints::TryInsertNesting( SwTxtNode rNode, SwTxtAttrNesting rNewHint ) if ( MAX_HINTS = Count() || MAX_HINTS - Count() = SplitNew.size() ) { -OSL_FAIL(hints array full :-(); +SAL_INFO(sw.core, hints array full :-(); return false; } @@ -600,9 +600,8 @@ void SwpHints::BuildPortions( SwTxtNode rNode, SwTxtAttr rNewHint, std::vectorSwTxtAttr* aInsDelHints; std::vectorSwTxtAttr*::iterator aIter; -OSL_ENSURE( RES_TXTATR_CHARFMT == rNewHint.Which() || -RES_TXTATR_AUTOFMT == rNewHint.Which(), -Expecting CHARFMT or AUTOFMT ); +assert( RES_TXTATR_CHARFMT == rNewHint.Which() || +RES_TXTATR_AUTOFMT == rNewHint.Which() ); // 2. Find the hints which cover the start and end position // of the new hint. These hints have to be split into two portions: @@ -1101,7 +1100,7 @@ SwTxtAttr* MakeTxtAttr(
Re: Fwd: about vertical text direction
Hi Aron, On Thu, Nov 20, 2014 at 07:58:49PM +0900, Aronsoyol Qi aronsoyol...@gmail.com wrote: I want to insert a text box which can show vertical text in writter. But It seems like that there is no options for vertical direction text (tb-lr and tb-rl)in the combo box in frame’s setting dilaog, just likes the screen shot below. [image: 埋め込み画像 3][image: 埋め込み画像 1] It seems like this dialog’s source is sw\source\ui\frmdlg\frmpage.cxx sw\uiconfig\swriter\ui\frmaddpage.ui But how to insert the entry into the combo box? Yes, seems the UI is more limited than the internal enum in this case. The full list of internally supported values are at http://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1text_1_1WritingMode2.html I think you found the right files to add a new entry -- for editing .ui files, see here: https://wiki.documentfoundation.org/Development/WidgetLayout After you're dong with editing your cxx and ui files, you can do 'make sw' to build and copy them to instdir, and instdir/program/soffice should reflect your changes. Regards, Miklos signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: vcl/source
vcl/source/gdi/bitmap.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e24bd9abb27801ea8e6d2d275aa23060ae798012 Author: Matúš Kukan matus.ku...@collabora.com Date: Tue Nov 18 22:28:19 2014 +0100 Bitmap::Crop: When the rectangle is entire bitmap, do nothing It is expensive to rewrite the whole bitmap with the same content. Change-Id: I001210840d535ac54837fff092c90835f9f2f547 diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index ccd914d..c034b27 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -784,7 +784,7 @@ bool Bitmap::Crop( const Rectangle rRectPixel ) aRect.Intersection( Rectangle( Point(), aSizePix ) ); -if( !aRect.IsEmpty() ) +if( !aRect.IsEmpty() aSizePix != aRect.GetSize()) { BitmapReadAccess* pReadAcc = AcquireReadAccess(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - external/libmwaw
external/libmwaw/0001-initialize-image-data.patch | 25 ++ external/libmwaw/UnpackedTarball_libmwaw.mk |1 2 files changed, 26 insertions(+) New commits: commit 86863a85935516192b751bb07826fbc5487694f6 Author: David Tardon dtar...@redhat.com Date: Thu Nov 20 12:13:56 2014 +0100 make libmwaw unit tests valgrind-clean Change-Id: I4bb8a1810f484f7b991e1eb3791f69cb9b744363 Reviewed-on: https://gerrit.libreoffice.org/12984 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/external/libmwaw/0001-initialize-image-data.patch b/external/libmwaw/0001-initialize-image-data.patch new file mode 100644 index 000..ae188583 --- /dev/null +++ b/external/libmwaw/0001-initialize-image-data.patch @@ -0,0 +1,25 @@ +From 091ef2d16d3578111af40f32bf5d92759883 Mon Sep 17 00:00:00 2001 +From: David Tardon dtar...@redhat.com +Date: Thu, 5 Jun 2014 10:17:17 -0400 +Subject: [PATCH] initialize image data + +valgrind complains on that on SuperPaint/1.0/paint1.sp.hqx test file. +--- + src/lib/MWAWPictBitmap.hxx | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lib/MWAWPictBitmap.hxx b/src/lib/MWAWPictBitmap.hxx +index fe366de..666ec34 100644 +--- a/src/lib/MWAWPictBitmap.hxx b/src/lib/MWAWPictBitmap.hxx +@@ -58,6 +58,7 @@ public: + MWAWPictBitmapContainer(Vec2i const sz) : m_size(sz), m_data(0L) + { + if (m_size[0]*m_size[1] != 0) m_data = new T[size_t(m_size[0]*m_size[1])]; ++std::uninitialized_fill_n(m_data, m_size[0] * m_size[1], T()); + } + //! destructor + virtual ~MWAWPictBitmapContainer() +-- +2.1.0 + diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk b/external/libmwaw/UnpackedTarball_libmwaw.mk index 6f63f28..ec1b248 100644 --- a/external/libmwaw/UnpackedTarball_libmwaw.mk +++ b/external/libmwaw/UnpackedTarball_libmwaw.mk @@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,1)) $(eval $(call gb_UnpackedTarball_add_patches,libmwaw,\ external/libmwaw/0001-librevenge-stream-is-optional-don-t-depend-on-it.patch \ external/libmwaw/0002-librevenge-stream-is-optional-don-t-depend-on-it.patch \ + external/libmwaw/0001-initialize-image-data.patch \ )) # vim: set noet sw=4 ts=4: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/osx
vcl/osx/a11yrolehelper.mm |2 +- vcl/osx/a11ywrapper.mm |2 +- vcl/osx/a11ywrappergroup.mm |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit a669de9c151692a8c24929641a7c12617b1bf458 Author: Niklas Johansson sleeping.pil...@gmail.com Date: Thu Nov 20 12:01:44 2014 +0100 [Accessibility] Make the sidebar a bit accessible The accessibility of the sidebar is heavily built on PANEL's. Since A11y on mac ignored panels it did not pan out well. Also the title was removed from AXGroupRole but is needed to announce the different panels of the sidebar. This might have some unwanted effects on other parts of LibreOffice since a lot of things are built up from AccessibleRole::PANEL. Change-Id: I095d26b3c89e2c0403d3267baa53f3bec5e07662 Reviewed-on: https://gerrit.libreoffice.org/12985 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/osx/a11yrolehelper.mm b/vcl/osx/a11yrolehelper.mm index 45423db..8d14fc7 100644 --- a/vcl/osx/a11yrolehelper.mm +++ b/vcl/osx/a11yrolehelper.mm @@ -96,7 +96,7 @@ using namespace ::com::sun::star::uno; MAP( AccessibleRole::SEPARATOR, NSAccessibilitySplitterRole ); // FIXME MAP( AccessibleRole::SLIDER, NSAccessibilitySliderRole ); MAP( AccessibleRole::SPIN_BOX, NSAccessibilityUnknownRole ); // FIXME -MAP( AccessibleRole::SPLIT_PANE, NSAccessibilitySplitterRole ); +MAP( AccessibleRole::SPLIT_PANE, NSAccessibilitySplitGroupRole ); MAP( AccessibleRole::STATUS_BAR, NSAccessibilityGroupRole ); // FIXME MAP( AccessibleRole::TABLE, NSAccessibilityTableRole ); MAP( AccessibleRole::TABLE_CELL, NSAccessibilityTextFieldRole ); diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm index 4e19e1d..aca05cb 100644 --- a/vcl/osx/a11ywrapper.mm +++ b/vcl/osx/a11ywrapper.mm @@ -718,7 +718,7 @@ static std::ostream operator(std::ostream s, NSPoint point) { BOOL ignored = NO; sal_Int16 nRole = [ self accessibleContext ] - getAccessibleRole(); switch ( nRole ) { -case AccessibleRole::PANEL: +//case AccessibleRole::PANEL: case AccessibleRole::FRAME: case AccessibleRole::ROOT_PANE: case AccessibleRole::SEPARATOR: diff --git a/vcl/osx/a11ywrappergroup.mm b/vcl/osx/a11ywrappergroup.mm index 3eb864f..04c17a2 100644 --- a/vcl/osx/a11ywrappergroup.mm +++ b/vcl/osx/a11ywrappergroup.mm @@ -34,7 +34,7 @@ NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ]; // Special Attributes and removing unwanted attributes depending on role [ attributeNames removeObjectsInArray: [ NSArray arrayWithObjects: -NSAccessibilityTitleAttribute, +// NSAccessibilityTitleAttribute, NSAccessibilityEnabledAttribute, NSAccessibilitySelectedChildrenAttribute, nil ] ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - connectivity/source sal/osl
connectivity/source/drivers/mozab/MDriver.hxx |1 + sal/osl/unx/signal.cxx|8 2 files changed, 5 insertions(+), 4 deletions(-) New commits: commit 524addb17c7d8dcb50a5ade05108b0168e61409d Author: Michael Stahl mst...@redhat.com Date: Thu Nov 20 12:58:58 2014 +0100 connectivity: fix the mozab build Change-Id: I299c856814e09a93a71f8acf8745a0590e2ecc72 diff --git a/connectivity/source/drivers/mozab/MDriver.hxx b/connectivity/source/drivers/mozab/MDriver.hxx index 155971e..8423423 100644 --- a/connectivity/source/drivers/mozab/MDriver.hxx +++ b/connectivity/source/drivers/mozab/MDriver.hxx @@ -22,6 +22,7 @@ #include com/sun/star/sdbc/XDriver.hpp #include com/sun/star/lang/XServiceInfo.hpp +#include com/sun/star/lang/XMultiServiceFactory.hpp #include cppuhelper/compbase2.hxx #include connectivity/CommonTools.hxx #include osl/module.h commit fc6be0ba3f74f46ce4eb7829ee91cd98179fb627 Author: Michael Stahl mst...@redhat.com Date: Thu Nov 20 12:58:43 2014 +0100 sal: fix build with clang and --enable-crashdump Change-Id: I148005489e4ef31b55886c1dd3076650d3a2ec17 diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx index b5de273..c97162b 100644 --- a/sal/osl/unx/signal.cxx +++ b/sal/osl/unx/signal.cxx @@ -480,8 +480,8 @@ static int ReportCrash( int Signal ) #define REPORTENV_PARAM -crashreportenv: -static sal_Bool bCrashReporterExecuted = sal_False; -sal_BoolbAutoCrashReport = sal_False; +static bool bCrashReporterExecuted = false; +bool bAutoCrashReport = false; sal_uInt32 argi; sal_uInt32 argc; @@ -503,7 +503,7 @@ static int ReportCrash( int Signal ) } else if ( 0 == rtl_ustr_ascii_compare( rtl_uString_getStr( ustrCommandArg ), --autocrashreport ) ) { -bAutoCrashReport = sal_True; +bAutoCrashReport = true; } else if ( 0 == rtl_ustr_ascii_shortenedCompare_WithLength( rtl_uString_getStr( ustrCommandArg ), rtl_uString_getLength( ustrCommandArg ), @@ -784,7 +784,7 @@ static int ReportCrash( int Signal ) if ( -1 != ret ) { -bCrashReporterExecuted = sal_True; +bCrashReporterExecuted = true; return 1; } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: connectivity/source
connectivity/source/drivers/mozab/MStatement.cxx |1 + connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx |1 + connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx |1 + 3 files changed, 3 insertions(+) New commits: commit bf95b78561b642f0a59279527fb94bcb194a1856 Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com Date: Thu Nov 20 13:13:29 2014 +0100 further fix mozab build after header cleanup Change-Id: I7e3c79d854a08c94aa699d86994704b9360b69bf diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx index 842db6b..fd323a0 100644 --- a/connectivity/source/drivers/mozab/MStatement.cxx +++ b/connectivity/source/drivers/mozab/MStatement.cxx @@ -30,6 +30,7 @@ #include com/sun/star/lang/DisposedException.hpp #include comphelper/sequence.hxx #include cppuhelper/typeprovider.hxx +#include cppuhelper/queryinterface.hxx #include comphelper/extract.hxx #include comphelper/types.hxx #include comphelper/processfactory.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx index f2fd8ed..e6b66ae 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx @@ -26,6 +26,7 @@ #include com/sun/star/lang/XMultiServiceFactory.hpp #include comphelper/processfactory.hxx #include com/sun/star/mozilla/XMozillaBootstrap.hpp +#include osl/diagnose.h using namespace com::sun::star::uno; using namespace com::sun::star::lang; diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx index 5b17676..2479a3f 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx @@ -18,6 +18,7 @@ */ #include MNameMapper.hxx +#include osl/diagnose.h #if OSL_DEBUG_LEVEL 0 # define OUtoCStr( x ) ( OUStringToOString ( (x), RTL_TEXTENCODING_ASCII_US).getStr()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sal/osl
sal/osl/unx/file_volume.cxx | 137 ++-- 1 file changed, 71 insertions(+), 66 deletions(-) New commits: commit dcdc8df2e6d740dd75ff6e28727ca757e4882f86 Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 13:27:13 2014 +0100 osl_getVolumeInformation: only stat if necessary ...in the hope that that makes cid#706206 (TOCTOU) go away Change-Id: I4bc7b44e0268cf5d46aaf55fb4073dcdf67b324c diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index f99092d..012ec37 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -211,76 +211,98 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI static oslFileError osl_psz_getVolumeInformation ( const sal_Char* pszDirectory, oslVolumeInfo* pInfo, sal_uInt32 uFieldMask) { -__OSL_STATFS_STRUCT sfs; - if (!pInfo) return osl_File_E_INVAL; -__OSL_STATFS_INIT(sfs); - pInfo-uValidFields = 0; pInfo-uAttributes = 0; +pInfo-uTotalSpace = 0; +pInfo-uFreeSpace = 0; +pInfo-uUsedSpace = 0; -if ((__OSL_STATFS(pszDirectory, sfs)) 0) -{ -oslFileError result = oslTranslateFileError(OSL_FET_ERROR, errno); -return (result); -} - -/* FIXME: how to detect the kind of storage (fixed, cdrom, ...) */ -if (uFieldMask osl_VolumeInfo_Mask_Attributes) +if ((uFieldMask + (osl_VolumeInfo_Mask_Attributes | osl_VolumeInfo_Mask_TotalSpace +| osl_VolumeInfo_Mask_UsedSpace | osl_VolumeInfo_Mask_FreeSpace +| osl_VolumeInfo_Mask_FileSystemName +| osl_VolumeInfo_Mask_FileSystemCaseHandling)) +!= 0) { -if (__OSL_STATFS_ISREMOTE(sfs)) -pInfo-uAttributes |= osl_Volume_Attribute_Remote; +__OSL_STATFS_STRUCT sfs; +__OSL_STATFS_INIT(sfs); +if ((__OSL_STATFS(pszDirectory, sfs)) 0) +{ +oslFileError result = oslTranslateFileError(OSL_FET_ERROR, errno); +return (result); +} -pInfo-uValidFields |= osl_VolumeInfo_Mask_Attributes; -} +/* FIXME: how to detect the kind of storage (fixed, cdrom, ...) */ +if (uFieldMask osl_VolumeInfo_Mask_Attributes) +{ +if (__OSL_STATFS_ISREMOTE(sfs)) +pInfo-uAttributes |= osl_Volume_Attribute_Remote; -if (uFieldMask osl_VolumeInfo_Mask_FileSystemCaseHandling) -{ -if (__OSL_STATFS_IS_CASE_SENSITIVE_FS(sfs)) -pInfo-uAttributes |= osl_Volume_Attribute_Case_Sensitive; +pInfo-uValidFields |= osl_VolumeInfo_Mask_Attributes; +} -if (__OSL_STATFS_IS_CASE_PRESERVING_FS(sfs)) -pInfo-uAttributes |= osl_Volume_Attribute_Case_Is_Preserved; +if (uFieldMask osl_VolumeInfo_Mask_FileSystemCaseHandling) +{ +if (__OSL_STATFS_IS_CASE_SENSITIVE_FS(sfs)) +pInfo-uAttributes |= osl_Volume_Attribute_Case_Sensitive; -pInfo-uValidFields |= osl_VolumeInfo_Mask_Attributes; -} +if (__OSL_STATFS_IS_CASE_PRESERVING_FS(sfs)) +pInfo-uAttributes |= osl_Volume_Attribute_Case_Is_Preserved; -pInfo-uTotalSpace = 0; -pInfo-uFreeSpace = 0; -pInfo-uUsedSpace = 0; +pInfo-uValidFields |= osl_VolumeInfo_Mask_Attributes; +} #if defined(__OSL_STATFS_BLKSIZ) -if ((uFieldMask osl_VolumeInfo_Mask_TotalSpace) || -(uFieldMask osl_VolumeInfo_Mask_UsedSpace)) -{ -pInfo-uTotalSpace = __OSL_STATFS_BLKSIZ(sfs); -pInfo-uTotalSpace *= (sal_uInt64)(sfs.f_blocks); -pInfo-uValidFields |= osl_VolumeInfo_Mask_TotalSpace; -} +if ((uFieldMask osl_VolumeInfo_Mask_TotalSpace) || +(uFieldMask osl_VolumeInfo_Mask_UsedSpace)) +{ +pInfo-uTotalSpace = __OSL_STATFS_BLKSIZ(sfs); +pInfo-uTotalSpace *= (sal_uInt64)(sfs.f_blocks); +pInfo-uValidFields |= osl_VolumeInfo_Mask_TotalSpace; +} -if ((uFieldMask osl_VolumeInfo_Mask_FreeSpace) || -(uFieldMask osl_VolumeInfo_Mask_UsedSpace)) -{ -pInfo-uFreeSpace = __OSL_STATFS_BLKSIZ(sfs); +if ((uFieldMask osl_VolumeInfo_Mask_FreeSpace) || +(uFieldMask osl_VolumeInfo_Mask_UsedSpace)) +{ +pInfo-uFreeSpace = __OSL_STATFS_BLKSIZ(sfs); -if (getuid() == 0) -pInfo-uFreeSpace *= (sal_uInt64)(sfs.f_bfree); -else -pInfo-uFreeSpace *= (sal_uInt64)(sfs.f_bavail); +if (getuid() == 0) +pInfo-uFreeSpace *= (sal_uInt64)(sfs.f_bfree); +else +pInfo-uFreeSpace *= (sal_uInt64)(sfs.f_bavail); -pInfo-uValidFields |= osl_VolumeInfo_Mask_FreeSpace; -} +pInfo-uValidFields |= osl_VolumeInfo_Mask_FreeSpace; +} + +if ((pInfo-uValidFields osl_VolumeInfo_Mask_TotalSpace) +
[Libreoffice-commits] core.git: desktop/Library_sofficeapp.mk desktop/source desktop/unx include/vcl vcl/inc vcl/Library_vcl.mk vcl/opengl vcl/source
desktop/Library_sofficeapp.mk| 15 + desktop/source/app/sofficemain.cxx | 12 + desktop/unx/source/glxtest.cxx | 281 ++ include/vcl/opengl/OpenGLHelper.hxx |4 include/vcl/opengl/glxtest.hxx | 21 ++ vcl/Library_vcl.mk |5 vcl/inc/opengl/DeviceInfo.hxx| 23 ++ vcl/inc/opengl/x11/X11DeviceInfo.hxx | 51 + vcl/opengl/DeviceInfo.cxx| 16 + vcl/opengl/x11/X11DeviceInfo.cxx | 326 +++ vcl/source/opengl/OpenGLHelper.cxx | 26 ++ 11 files changed, 779 insertions(+), 1 deletion(-) New commits: commit a55f740045d6d30e1ef5522889d2dc359ca5784a Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Thu Nov 20 09:52:03 2014 +0100 include the unx part for getting OpenGL driver device information desktop/unx/source/glxtest.cxx is taken directly from the Mozilla project. THe whole concept is taken from Mozilla and is based on starting an early process that creates an OpenGL context. This prevents crashing drivers to crash Libreoffice. We read the information from the pipe as soon as we create the first vcl Window. In that place we then decide if the device/driver combination is blacklisted. Change-Id: I2624d4ce06d503281a4459cf3174f57cf1f7b733 diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index be86dd1..f322a6c 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -94,6 +94,21 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\ desktop/source/migration/migration \ )) +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_exception_objects,sofficeapp,\ +desktop/unx/source/glxtest \ +)) + +$(eval $(call gb_Library_add_libs,sofficeapp,\ + -lm \ + -ldl \ + -lpthread \ +-lGL \ +-lGLU \ +-lX11 \ +)) +endif + # liblibreoffice bits $(eval $(call gb_Library_add_exception_objects,sofficeapp,\ desktop/source/lib/init \ diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index dff16e8..606ba4f 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -53,8 +53,20 @@ #include touch/touch.h #endif +#if defined( UNX ) !defined MACOSX !defined IOS !defined ANDROID +bool fire_glxtest_process(); +#endif + extern C int DESKTOP_DLLPUBLIC soffice_main() { +#if defined( UNX ) !defined MACOSX !defined IOS !defined ANDROID +/* Run test for OpenGL support in own process to avoid crash with broken + * OpenGL drivers. Start process as early as possible. + */ +bool bSuccess = fire_glxtest_process(); +SAL_WARN_IF(!bSuccess, desktop.opengl, problems with glxtest); +#endif + #if defined ANDROID try { rtl::Bootstrap::setIniFilename(file:///assets/program/lofficerc); diff --git a/desktop/unx/source/glxtest.cxx b/desktop/unx/source/glxtest.cxx new file mode 100644 index 000..d8d9c20 --- /dev/null +++ b/desktop/unx/source/glxtest.cxx @@ -0,0 +1,281 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * vim: sw=2 ts=8 et : + */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + +// +// +// Explanation: See bug 639842. Safely getting GL driver info on X11 is hard, because the only way to do +// that is to create a GL context and call glGetString(), but with bad drivers, +// just creating a GL context may crash. +// +// This file implements the idea to do that in a separate process. +// +// The only non-static function here is fire_glxtest_process(). It creates a pipe, publishes its 'read' end as the +// mozilla::widget::glxtest_pipe global variable, forks, and runs that GLX probe in the child process, +// which runs the glxtest() static function. This creates a X connection, a GLX context, calls glGetString, and writes that +// to the 'write' end of the pipe. + +#include cstdio +#include cstdlib +#include unistd.h +#include dlfcn.h +#include fcntl.h +#include stdint.h +#include string.h + +#include vcl/opengl/glxtest.hxx + +#ifdef __SUNPRO_CC +#include stdio.h +#endif + +#include X11/Xlib.h +#include X11/Xutil.h + +// stuff from glx.h +typedef struct __GLXcontextRec *GLXContext; +typedef XID GLXPixmap; +typedef XID GLXDrawable; +/* GLX 1.3 and later */ +typedef struct __GLXFBConfigRec *GLXFBConfig; +typedef XID GLXFBConfigID; +typedef XID GLXContextID; +typedef XID GLXWindow; +typedef XID GLXPbuffer; +#define GLX_RGBA4 +#define GLX_RED_SIZE8 +#define GLX_GREEN_SIZE 9 +#define GLX_BLUE_SIZE 10 + +// stuff from gl.h +typedef uint8_t GLubyte; +typedef uint32_t GLenum; +#define GL_VENDOR 0x1F00 +#define GL_RENDERER
[Libreoffice-commits] core.git: officecfg/registry sc/inc sc/source sc/uiconfig
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |8 +- sc/inc/calcconfig.hxx| 16 +--- sc/source/core/opencl/openclwrapper.cxx | 51 +-- sc/source/core/tool/calcconfig.cxx | 12 +-- sc/source/core/tool/formulaopt.cxx |6 - sc/source/ui/optdlg/calcoptionsdlg.cxx | 25 ++- sc/source/ui/optdlg/calcoptionsdlg.hxx |3 sc/uiconfig/scalc/ui/formulacalculationoptions.ui| 31 + 8 files changed, 62 insertions(+), 90 deletions(-) New commits: commit 92c5e9b2812571329a758d54b15273f5fc68f95c Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 14:55:37 2014 +0200 Use regexps in the OpenCL blacklist/whitelist Drop version number bounds, use regexps instead. Not entirely ideal, but as vendors are free to put arbitrary stuff into the driver version string (part of which might be numbers, part free text, part significant, part just informative), just comparing against lower and upper bounds with strverscmp() was not ideal either. Change-Id: Ic4ef4d8e15f79f1c96e6e03f6c01e62ae92dc2fc diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index aa44d84..c7aac17 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1392,16 +1392,16 @@ prop oor:name=OpenCLBlackList oor:type=oor:string-list oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- info -descCombinations of (OS, OS version, OpenCL platform vendor, OpenCL device name, OpenCL driver version) that are known to be bad. Each entry is a string consisting of six parts separated by slashes. In case a slash, percent or semicolon occurs inside a part, it is replaced by a percent followed by the corresponding number as two hex digits. Any part might contain a single asterisk as a wildcard, matching any value, but there is no more generic regexp support. Has higher priority than OpenCLWhiteList./desc +descCombinations of (OS, OS version, OpenCL platform vendor, OpenCL device name, OpenCL driver version) that are known to be bad. Each entry is a string consisting of five parts separated by slashes. An empty part matches anything. In case a slash, percent or semicolon occurs inside a part, it is replaced by a percent followed by the corresponding number as two hex digits. The parts except OS can contain regular expressions. Inside these regular expressions the usual characters .*()[]\ are special and should be quoted with a backslash to be interpreted literally. OS should be just one of Linux, OS X (including the space) or Windows (without quotes). Has higher priority than OpenCLWhiteList./desc /info - value oor:separator=;Windows/*/Intel(R) Corporation/*/9.17.10.2884//value + value oor:separator=;Windows//Intel\(R\) Corporation//9\.17\.10\.2884/value /prop prop oor:name=OpenCLWhiteList oor:type=oor:string-list oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- info -descLike OpenCLWhiteList, but for combinations known to be good./desc +descLike OpenCLBlackList, but for combinations known to be good./desc /info - value oor:separator=;Linux/*/Advanced Micro Devices, Inc./*/1445.5 (sse2,avx)/;*/*/Advanced Micro Devices, Inc./*/*/;*/*/Intel(R) Corporation/*/*/;*/*/NVIDIA Corporation/*/*//value + value oor:separator=;Linux//Advanced Micro Devices, Inc\.//1445\.5 \(sse2,avx\);//Advanced Micro Devices, Inc\.//;//Intel\(R\) Corporation//;//NVIDIA Corporation///value /prop /group group oor:name=Syntax diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx index 40a33b6..2b93fa3 100644 --- a/sc/inc/calcconfig.hxx +++ b/sc/inc/calcconfig.hxx @@ -47,8 +47,7 @@ struct SC_DLLPUBLIC ScCalcConfig OUString maOSVersion; OUString maPlatformVendor; OUString maDevice; -OUString maDriverVersionMin; -OUString maDriverVersionMax; +OUString maDriverVersion; OpenCLImplMatcher() { @@ -58,14 +57,12 @@ struct SC_DLLPUBLIC ScCalcConfig const OUString rOSVersion, const OUString rPlatformVendor, const OUString rDevice, - const OUString rDriverVersionMin, - const OUString rDriverVersionMax) + const OUString rDriverVersion) : maOS(rOS), maOSVersion(rOSVersion), maPlatformVendor(rPlatformVendor), maDevice(rDevice), - maDriverVersionMin(rDriverVersionMin), -
[Libreoffice-commits] core.git: vcl/opengl
vcl/opengl/x11/X11DeviceInfo.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 43a8993482697a12885146e0fba6fc266cb182d4 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Thu Nov 20 14:04:32 2014 +0100 bad API translation between mozilla strings and OUString Change-Id: I99df7d45a1e242e8a1373f150da7a5b74a7d0ffb diff --git a/vcl/opengl/x11/X11DeviceInfo.cxx b/vcl/opengl/x11/X11DeviceInfo.cxx index 24fd279..972f123 100644 --- a/vcl/opengl/x11/X11DeviceInfo.cxx +++ b/vcl/opengl/x11/X11DeviceInfo.cxx @@ -307,7 +307,7 @@ bool X11OpenGLDeviceInfo::isDeviceBlocked() bool unknownOS = maOS.isEmpty() || maOSRelease.isEmpty(); OUString aOS = rtl::OStringToOUString(maOS, RTL_TEXTENCODING_UTF8); OUString aOSRelease = rtl::OStringToOUString(maOSRelease, RTL_TEXTENCODING_UTF8); -bool badOS = aOS.indexOf(Linux, true) != -1 +bool badOS = aOS.indexOf(Linux) != -1 maOSRelease.indexOf(2.6.32) != -1; if (unknownOS || badOS) { SAL_WARN(vcl.opengl, blocked OS version with fglrx); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - desktop/inc desktop/source desktop/unx vcl/inc vcl/opengl
desktop/inc/app.hxx |4 desktop/source/app/sofficemain.cxx |4 desktop/unx/source/glxtest.cxx |1 + vcl/inc/opengl/x11/X11DeviceInfo.hxx |2 +- vcl/opengl/x11/X11DeviceInfo.cxx |4 +--- 5 files changed, 7 insertions(+), 8 deletions(-) New commits: commit 06097771671e439c7aca2bd6bcf010444f41 Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 15:23:18 2014 +0200 WaE: work around loplugin:unreffun and loplugin:externandnotdefined Change-Id: I5192ad1f068746da257f3e1d9340325956b1e69d diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index 33e7c0c..876b643 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -192,6 +192,10 @@ OUString ReplaceStringHookProc(const OUString rStr); } +#if defined( UNX ) !defined MACOSX !defined IOS !defined ANDROID +bool fire_glxtest_process(); +#endif + #endif // INCLUDED_DESKTOP_INC_APP_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 606ba4f..9cee2c4 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -53,10 +53,6 @@ #include touch/touch.h #endif -#if defined( UNX ) !defined MACOSX !defined IOS !defined ANDROID -bool fire_glxtest_process(); -#endif - extern C int DESKTOP_DLLPUBLIC soffice_main() { #if defined( UNX ) !defined MACOSX !defined IOS !defined ANDROID diff --git a/desktop/unx/source/glxtest.cxx b/desktop/unx/source/glxtest.cxx index d8d9c20..df9603a 100644 --- a/desktop/unx/source/glxtest.cxx +++ b/desktop/unx/source/glxtest.cxx @@ -5,6 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include app.hxx // // commit 24b49879338cd01fece071576504821e5e36cbb4 Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 15:13:42 2014 +0200 WaE: unused variable 'aOSRelease' Actually we don't need the aOS variable either, we can check maOS directly. Change-Id: Ib14d6baf0bda28a45361886059629460641571bc diff --git a/vcl/opengl/x11/X11DeviceInfo.cxx b/vcl/opengl/x11/X11DeviceInfo.cxx index 972f123..6899f53 100644 --- a/vcl/opengl/x11/X11DeviceInfo.cxx +++ b/vcl/opengl/x11/X11DeviceInfo.cxx @@ -305,9 +305,7 @@ bool X11OpenGLDeviceInfo::isDeviceBlocked() } // Bug 724640: FGLRX + Linux 2.6.32 is a crashy combo bool unknownOS = maOS.isEmpty() || maOSRelease.isEmpty(); -OUString aOS = rtl::OStringToOUString(maOS, RTL_TEXTENCODING_UTF8); -OUString aOSRelease = rtl::OStringToOUString(maOSRelease, RTL_TEXTENCODING_UTF8); -bool badOS = aOS.indexOf(Linux) != -1 +bool badOS = maOS.indexOf(Linux) != -1 maOSRelease.indexOf(2.6.32) != -1; if (unknownOS || badOS) { SAL_WARN(vcl.opengl, blocked OS version with fglrx); commit 0145e05a2e866dbad0372bf21c30d8264677a7b9 Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 15:11:19 2014 +0200 WaE: overriding virtual function declaration not marked 'override' Change-Id: Ieb8da224e02a9c8e19eabb4c5bcbd81120900245 diff --git a/vcl/inc/opengl/x11/X11DeviceInfo.hxx b/vcl/inc/opengl/x11/X11DeviceInfo.hxx index 5e41b6b..dfb7204 100644 --- a/vcl/inc/opengl/x11/X11DeviceInfo.hxx +++ b/vcl/inc/opengl/x11/X11DeviceInfo.hxx @@ -43,7 +43,7 @@ public: X11OpenGLDeviceInfo(); virtual ~X11OpenGLDeviceInfo(); -virtual bool isDeviceBlocked(); +virtual bool isDeviceBlocked() SAL_OVERRIDE; }; #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Makefile.in
Makefile.in |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 45fffdb3d148bcf31b720ca726b1c21d559ead82 Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 14:30:27 2014 +0100 Call install-gdb-printers with full path Change-Id: I92b34e61edb641d29d1cbf344e7ae5823c912cbc diff --git a/Makefile.in b/Makefile.in index e33ed28..22d8a01 100644 --- a/Makefile.in +++ b/Makefile.in @@ -234,7 +234,8 @@ bootstrap: compilerplugins # build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset) ifneq ($(filter-out WNT MACOSX IOS ANDROID,$(OS)),) - mkdir -p $(INSTDIR) install-gdb-printers -a $(INSTDIR) -c + mkdir -p $(INSTDIR) + $(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR) -c endif $(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal) ifeq ($(OS),IOS) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Bypassing user data migration
Hi , Sorry for asking this question on developer list. But I don't know better places for seeking help. For some reason , we have many installation with user data from OOo 3.3. There user data contain script files not install properly so that after migration an error message pop up every time opening application. I want to skip user data migration for large scale deployment. (Otherwise have to write script to touch MIGRATED4 on every computer. ) I tried methods below, neither work. Can anyone suggest? 1) https://wiki.openoffice.org/wiki/Documentation/Administration_Guide/Deactivating_Registration_Wizard 2) ?xml version=1.0 encoding=UTF-8? oor:component-data xmlns:oor=http://openoffice.org/2001/registry; xmlns:xs=http://www.w3.org/2001/XMLSchema; oor:name=Setup oor:package=org.openoffice node oor:name=Office prop oor:name=MigrationCompleted oor:type=xs:boolean valuetrue/value /prop /node /oor:component-data -- Mark Hung ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sc/inc sc/source
sc/inc/column.hxx | 12 +++- sc/source/core/data/column4.cxx | 10 ++ sc/source/core/data/table3.cxx |3 ++- 3 files changed, 15 insertions(+), 10 deletions(-) New commits: commit 73ebd5e227c284280219130ffe3f486c50023004 Author: Eike Rathke er...@redhat.com Date: Mon Nov 17 22:44:56 2014 +0100 fdo#83765 do not update references in SortReorderByColumn() if disabled Similar to SortReorderByRow() (cherry picked from commit 115a4b7ca36f65d93070d2e81048320d202e87a3) Conflicts: sc/inc/column.hxx Change-Id: I11dd710c00a56a5f56aeb048fa2258631555a220 diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 66cd524..4bda39d 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -575,18 +575,20 @@ public: /** * Reset column position of formula cells within specified row range. - * Reference positions are also adjusted to reflect the new position so - * that the formula cells still reference the same cells or ranges after - * the the position change. The position of a formula cell before the - * call is interpreted as the old position of that cell. + * If bUpdateRefs==true then reference positions are also adjusted to + * reflect the new position so that the formula cells still reference the + * same cells or ranges after the the position change. + * The position of a formula cell before the call is interpreted as the old + * position of that cell. * * Caller needs to ensure that no formula groups cross the top and bottom * row boundaries. * * @param nRow1 top row boundary * @param nRow2 bottom row boundary + * @param bUpdateRefs whether to adjust references */ -void ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2 ); +void ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2, bool bUpdateRefs ); void SplitFormulaGroupByRelativeRef( const ScRange rBoundRange ); diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 8b46e74..568b5b64 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -439,8 +439,9 @@ namespace { class FormulaColPosSetter { SCCOL mnCol; +bool mbUpdateRefs; public: -FormulaColPosSetter( SCCOL nCol ) : mnCol(nCol) {} +FormulaColPosSetter( SCCOL nCol, bool bUpdateRefs ) : mnCol(nCol), mbUpdateRefs(bUpdateRefs) {} void operator() ( size_t nRow, ScFormulaCell* pCell ) { @@ -451,7 +452,8 @@ public: ScAddress aOldPos = pCell-aPos; pCell-aPos.SetCol(mnCol); pCell-aPos.SetRow(nRow); -pCell-GetCode()-AdjustReferenceOnMovedOrigin(aOldPos, pCell-aPos); +if (mbUpdateRefs) +pCell-GetCode()-AdjustReferenceOnMovedOrigin(aOldPos, pCell-aPos); } else { @@ -463,9 +465,9 @@ public: } -void ScColumn::ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2 ) +void ScColumn::ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2, bool bUpdateRefs ) { -FormulaColPosSetter aFunc(nCol); +FormulaColPosSetter aFunc(nCol, bUpdateRefs); sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aFunc); } diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index d646678..99d6239 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -716,8 +716,9 @@ void ScTable::SortReorderByColumn( } // Reset formula cell positions which became out-of-sync after column reordering. +bool bUpdateRefs = pArray-IsUpdateRefs(); for (SCCOL nCol = nStart; nCol = nLast; ++nCol) -aCol[nCol].ResetFormulaCellPositions(nRow1, nRow2); +aCol[nCol].ResetFormulaCellPositions(nRow1, nRow2, bUpdateRefs); // Set up column reorder map (for later broadcasting of reference updates). sc::ColRowReorderMapType aColMap; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - configure.ac sc/uiconfig
configure.ac | 62 ++ sc/uiconfig/scalc/ui/formulacalculationoptions.ui |8 +- 2 files changed, 11 insertions(+), 59 deletions(-) New commits: commit a5563934410406f806c22c9d388e297d6faea82b Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 17:09:17 2014 +0200 No need to have OpenGL slide transitions optional at configure-time (The --disable-opengl option was misnamed; it actually referred only to the OpenGL slide transitions, not our other use of OpenGL.) Use of OpenGL is still hardcoded off for platforms where we don't know whether and/or how to handle it yet (iOS and Android), and otherwise it is optional at run-time. Change-Id: I65d0612dbc79ee07273854e5a468d891ef07c6b7 diff --git a/configure.ac b/configure.ac index 310bb9c..1dc5329 100644 --- a/configure.ac +++ b/configure.ac @@ -738,7 +738,6 @@ linux-android*) build_gstreamer_0_10=no enable_lotuswordpro=no enable_mpl_subset=yes -enable_opengl=no enable_coinmp=yes enable_lpsolve=no enable_report_builder=no @@ -1102,10 +1101,6 @@ AC_ARG_ENABLE(cairo-canvas, platforms where Cairo is available. ]) -AC_ARG_ENABLE(opengl, -AS_HELP_STRING([--disable-opengl], -[Determines whether to build the OpenGL 3D slide transitions and canvas component.])) - AC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [Determines whether to enable features that depend on dbus. @@ -7168,7 +7163,6 @@ AC_SUBST(WINEGCC) if test $_os = iOS; then enable_mpl_subset=yes -enable_opengl=no enable_lotuswordpro=no enable_coinmp=yes enable_lpsolve=no @@ -10231,33 +10225,14 @@ else fi AC_SUBST(ENABLE_VLC) -dnl === -dnl Check whether the OpenGL libraries are available -dnl === - -AC_MSG_CHECKING([whether to build the OpenGL Transitions component]) ENABLE_OPENGL= - -if test -z $enable_opengl; then -if test $_os = iOS; then -# As such with some suitable minor tweaks the Mac OpenGL transitions code would presumably -# build fine for iOS, too, but let's leave that for later -enable_opengl=no -elif test $with_x = no; then -enable_opengl=no -else -enable_opengl=yes -fi -fi - -if test x$enable_opengl = xno; then -AC_MSG_RESULT([no]) +if test $_os = iOS -o $_os = Android; then + : # disable elif test $_os = Darwin; then # We use frameworks on Mac OS X, no need for detail checks ENABLE_OPENGL=TRUE ENABLE_OPENGL_CANVAS=TRUE SYSTEM_MESA_HEADERS=TRUE -AC_MSG_RESULT([yes]) elif test $_os = WINNT; then # Experimental: try to use OpenGL on Windows ENABLE_OPENGL=TRUE @@ -10265,22 +10240,9 @@ elif test $_os = WINNT; then # We need the internal Mesa headers. SYSTEM_MESA_HEADERS= BUILD_TYPE=$BUILD_TYPE MESA -AC_MSG_RESULT([yes]) else -save_LDFLAGS=$LDFLAGS -LDFLAGS=$LDFLAGS -lm -AC_MSG_RESULT([yes]) -AC_CHECK_LIB([GL], [main], -[AC_CHECK_LIB([GL], [glCreateShader], [ENABLE_OPENGL_CANVAS=TRUE], -[add_warning no shader support in libGL - will enable openGL transitions, but not openGL canvas - AC_MSG_WARN([no shader support in libGL - will enable openGL transitions, but not openGL canvas]) - ENABLE_OPENGL_CANVAS=], [])], -[AC_MSG_ERROR(libGL not installed or functional)], []) -LDFLAGS=$LDFLAGS -lGL -AC_CHECK_LIB([GLU], [main], [:], - [AC_MSG_ERROR(libGLU not installed or functional)], []) ENABLE_OPENGL=TRUE -LDFLAGS=$save_LDFLAGS +ENABLE_OPENGL_CANVAS=TRUE dnl === dnl Check for system Mesa @@ -12686,9 +12648,9 @@ if test $enable_mpl_subset = yes; then *) : ;; esac done -if test $enable_opengl != no -o x$ENABLE_OPENGL = xTRUE; then -AC_MSG_ERROR([need to --disable-opengl - GL transitions support.]) -fi + +ENABLE_OPENGL= + if test $enable_lpsolve != no -o x$ENABLE_LPSOLVE = xTRUE; then AC_MSG_ERROR([need to --disable-lpsolve - calc linear programming solver.]) fi commit 3b0b76462aa54f60bc9823d9c6ef64e5e35c1208 Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 16:55:17 2014 +0200 No need to have OpenCL optional at configure-time It continues to not be used on platforms where not available (iOS and Android), and on others it is optional at run-time anyway. Change-Id: I7ba2f87ac143aad78df7edc2e6e6dc014c29c071 diff --git a/configure.ac b/configure.ac index e716ad0..310bb9c 100644 --- a/configure.ac +++ b/configure.ac @@ -1106,10 +1106,6 @@ AC_ARG_ENABLE(opengl, AS_HELP_STRING([--disable-opengl], [Determines whether to build the OpenGL 3D slide
Re: Attempt to make vcl::Timer use boost's Signals2
On Tuesday 18 of November 2014, Chris Sherlock wrote: Hi all, I'm attempting to get Timer to use boost's Signals2. When I compile, however, I get a warning and an error: I should finally find the time to write down the howto for this I guess. You cannot just use a pointer to a member function, because that one requires also the this pointer, so you need to go with boost::bind. See e.g. 96369e97. -- Lubos Lunak l.lu...@collabora.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Attempt to make vcl::Timer use boost's Signals2
On Tuesday 18 of November 2014, Kohei Yoshida wrote: On Tue, 2014-11-18 at 23:50 +1100, Chris Sherlock wrote: Hi all, I'm attempting to get Timer to use boost's Signals2. When you do that, could you apply pimpl pattern to hide its boost usages from the header? He can't. Signals usually form part of the public API of a class. -- Lubos Lunak l.lu...@collabora.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] libcdr.git: 5 commits - src/lib
src/lib/CDRDocument.cpp|6 ++ src/lib/CDRInternalStream.cpp |3 +++ src/lib/CDRParser.cpp |2 ++ src/lib/CDRStylesCollector.cpp |4 +++- src/lib/CMXDocument.cpp|6 ++ 5 files changed, 20 insertions(+), 1 deletion(-) New commits: commit 983bc0a2e969b011760956d739260a181001a855 Author: David Tardon dtar...@redhat.com Date: Thu Nov 20 16:31:17 2014 +0100 deinit z_stream properly if reading from input fails Change-Id: I5a2ce38daf8f251029ccf8c1458025f950fe2af2 diff --git a/src/lib/CDRInternalStream.cpp b/src/lib/CDRInternalStream.cpp index cdef100..11ecb0f 100644 --- a/src/lib/CDRInternalStream.cpp +++ b/src/lib/CDRInternalStream.cpp @@ -61,7 +61,10 @@ libcdr::CDRInternalStream::CDRInternalStream(librevenge::RVNGInputStream *input, const unsigned char *tmpBuffer = input-read(size, tmpNumBytesRead); if (size != tmpNumBytesRead) +{ + (void)inflateEnd(strm); return; +} strm.avail_in = (uInt)tmpNumBytesRead; strm.next_in = (Bytef *)tmpBuffer; commit 1d605d21e7b5f87c1ad18ff2e7dc03a092a6e557 Author: David Tardon dtar...@redhat.com Date: Thu Nov 20 16:15:49 2014 +0100 avoid out-of-bounds read Change-Id: I6b43ce6e7160789bdd99aabf8632bfc3431d4b7d diff --git a/src/lib/CDRStylesCollector.cpp b/src/lib/CDRStylesCollector.cpp index f6aa912..7ead9b1 100644 --- a/src/lib/CDRStylesCollector.cpp +++ b/src/lib/CDRStylesCollector.cpp @@ -113,6 +113,8 @@ void libcdr::CDRStylesCollector::collectBmp(unsigned imageId, unsigned colorMode while (i lineWidth i width) { unsigned char c = bitmap[j*lineWidth+i]; +if (c = palette.size()) + c = palette.size() - 1; i++; writeU32(image, m_ps.getBMPColor(libcdr::CDRColor(colorModel, palette[c]))); } commit 629dadcd8002d077fdd4f30d4e7f156b03e644f8 Author: David Tardon dtar...@redhat.com Date: Thu Nov 20 15:36:46 2014 +0100 nothing to do here if there's no bitmap data to read Change-Id: I07d1540d44dc97d7fbb88db363123cb28b7d812d diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp index 70fa511..d9d66c9 100644 --- a/src/lib/CDRParser.cpp +++ b/src/lib/CDRParser.cpp @@ -2277,6 +2277,8 @@ void libcdr::CDRParser::readBmp(librevenge::RVNGInputStream *input, unsigned len palette.push_back(b | (g 8) | (r 16)); } } + if (bmpsize == 0) +return; std::vectorunsigned char bitmap(bmpsize); unsigned long tmpNumBytesRead = 0; const unsigned char *tmpBuffer = input-read(bmpsize, tmpNumBytesRead); commit 4a1be786ced3083a9a609e4aa2af9bc5b89ec21e Author: David Tardon dtar...@redhat.com Date: Thu Nov 20 15:32:41 2014 +0100 avoid out-of-bounds read Change-Id: I5510b80b9c6d1512f2e6e8bb25f48fb0bcded515 diff --git a/src/lib/CDRStylesCollector.cpp b/src/lib/CDRStylesCollector.cpp index bce3d7f..f6aa912 100644 --- a/src/lib/CDRStylesCollector.cpp +++ b/src/lib/CDRStylesCollector.cpp @@ -244,7 +244,7 @@ void libcdr::CDRStylesCollector::collectText(unsigned textId, unsigned styleId, } tmpTextData.push_back(data[j++]); -if (tmpCharDescription 0x01) +if ((tmpCharDescription 0x01) (j data.size())) tmpTextData.push_back(data[j++]); } if (!tmpTextData.empty()) commit 88b4e8b39c3c187e2262786d469b0a9d9e2eae9d Author: David Tardon dtar...@redhat.com Date: Tue Jul 29 18:22:41 2014 +0200 check arguments Change-Id: I62f5abfe8f954f9825befcad589ded09ae8f7700 diff --git a/src/lib/CDRDocument.cpp b/src/lib/CDRDocument.cpp index 5509716..de6ec95 100644 --- a/src/lib/CDRDocument.cpp +++ b/src/lib/CDRDocument.cpp @@ -61,6 +61,9 @@ stream is a Corel Draw Document that libcdr is able to parse */ CDRAPI bool libcdr::CDRDocument::isSupported(librevenge::RVNGInputStream *input) { + if (!input) +return false; + librevenge::RVNGInputStream *tmpInput = input; try { @@ -104,6 +107,9 @@ CDRPaintInterface class implementation when needed. This is often commonly calle */ CDRAPI bool libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter) { + if (!input || !painter) +return false; + input-seek(0, librevenge::RVNG_SEEK_SET); bool retVal = false; unsigned version = 0; diff --git a/src/lib/CMXDocument.cpp b/src/lib/CMXDocument.cpp index 74f8619..ff8df44 100644 --- a/src/lib/CMXDocument.cpp +++ b/src/lib/CMXDocument.cpp @@ -25,6 +25,9 @@ stream is a Corel Draw Document that libcdr is able to parse CDRAPI bool libcdr::CMXDocument::isSupported(librevenge::RVNGInputStream *input) try { + if (!input) +return false; + input-seek(0, librevenge::RVNG_SEEK_SET); unsigned riff = readU32(input); if (riff != CDR_FOURCC_RIFF riff != CDR_FOURCC_RIFX) @@ -56,6 +59,9 @@ CDRPaintInterface class implementation when needed. This is often commonly calle */ CDRAPI bool libcdr::CMXDocument::parse(librevenge::RVNGInputStream *input,
[Libreoffice-commits] core.git: distro-configs/LibreOfficeAndroidAarch64.conf distro-configs/LibreOfficeAndroid.conf distro-configs/LibreOfficeAndroidX86.conf
distro-configs/LibreOfficeAndroid.conf|1 - distro-configs/LibreOfficeAndroidAarch64.conf |1 - distro-configs/LibreOfficeAndroidX86.conf |1 - 3 files changed, 3 deletions(-) New commits: commit 3d601cfa4b63580b5a0d18044b5792894d54089f Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 17:46:20 2014 +0200 Drop --disable-opengl Change-Id: Ic1d9843e5b05cf4eeb647cf13eea15fc2acd6063 diff --git a/distro-configs/LibreOfficeAndroid.conf b/distro-configs/LibreOfficeAndroid.conf index 409ee62..4d58305 100644 --- a/distro-configs/LibreOfficeAndroid.conf +++ b/distro-configs/LibreOfficeAndroid.conf @@ -8,7 +8,6 @@ --disable-liblangtag --disable-lockdown --disable-odk ---disable-opengl --disable-postgresql-sdbc --disable-python --disable-randr diff --git a/distro-configs/LibreOfficeAndroidAarch64.conf b/distro-configs/LibreOfficeAndroidAarch64.conf index ead8073..f488fc0 100644 --- a/distro-configs/LibreOfficeAndroidAarch64.conf +++ b/distro-configs/LibreOfficeAndroidAarch64.conf @@ -8,7 +8,6 @@ --disable-liblangtag --disable-lockdown --disable-odk ---disable-opengl --disable-postgresql-sdbc --disable-python --disable-randr diff --git a/distro-configs/LibreOfficeAndroidX86.conf b/distro-configs/LibreOfficeAndroidX86.conf index 7d13428..7a73a01 100644 --- a/distro-configs/LibreOfficeAndroidX86.conf +++ b/distro-configs/LibreOfficeAndroidX86.conf @@ -8,7 +8,6 @@ --disable-liblangtag --disable-lockdown --disable-odk ---disable-opengl --disable-postgresql-sdbc --disable-python --disable-randr ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: bridges/source
bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx |2 ++ bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx |2 ++ bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx |2 ++ 3 files changed, 6 insertions(+) New commits: commit 2b5b04e1e62914bf0902dfd7943cdc44499c47a6 Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 17:40:01 2014 +0200 Include osl/diagnose.h Change-Id: I67cb459b1e9ab5638a5b405430d3e0a42fc6bfc3 diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx index 2c02610..49d41a4 100644 --- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx +++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx @@ -34,6 +34,8 @@ // file as close to ../gcc3_linux_arm/cpp2uno.cxx as possible, to make // future unification easier. +#include osl/diagnose.h + #include com/sun/star/uno/RuntimeException.hpp #include uno/data.h #include typelib/typedescription.hxx diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx index ed2d33f..1268608 100644 --- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx +++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx @@ -28,6 +28,8 @@ // place to keep this file as close to ../gcc3_linux_arm/uno2cpp.cxx // as possible, to make future unification easier. +#include osl/diagnose.h + #include com/sun/star/uno/RuntimeException.hpp #include bridges/cpp_uno/shared/bridge.hxx diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx index 6639814..e2210c5 100644 --- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx +++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx @@ -19,6 +19,8 @@ #ifdef __arm64 +#include osl/diagnose.h + #include com/sun/star/uno/RuntimeException.hpp #include bridges/cpp_uno/shared/bridge.hxx ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/qa sw/source
sw/inc/textboxhelper.hxx|3 +++ sw/qa/extras/uiwriter/data/fdo85554.odt |binary sw/qa/extras/uiwriter/uiwriter.cxx | 25 + sw/source/core/doc/textboxhelper.cxx| 19 +++ sw/source/core/unocore/unodraw.cxx | 13 + 5 files changed, 60 insertions(+) New commits: commit 01fc08c0b5c57fef8ad3755672f4266d85e849a5 Author: Miklos Vajna vmik...@collabora.co.uk Date: Thu Nov 20 16:44:21 2014 +0100 fdo#85554 SwXShape: fix getting ZOrder property when doc contains TextBoxes Change-Id: I9b6b83f0f6d627bb14a880a19769ee70564cf52b diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index 5473979..55c0ac8 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -22,6 +22,7 @@ #include swdllapi.h class SdrPage; +class SdrObject; class SfxItemSet; class SwFrmFmt; class SwFrmFmts; @@ -82,6 +83,8 @@ public: static sal_Int32 getCount(SdrPage* pPage, std::setconst SwFrmFmt* rTextBoxes); /// Get a shape by index, excluding TextBoxes. static css::uno::Any getByIndex(SdrPage* pPage, sal_Int32 nIndex, std::setconst SwFrmFmt* rTextBoxes) throw(css::lang::IndexOutOfBoundsException); +/// Get the order of the shape, excluding TextBoxes. +static sal_Int32 getOrdNum(const SdrObject* pObject, std::setconst SwFrmFmt* rTextBoxes); /// Saves the current shape - textbox links in a map, so they can be restored later. static void saveLinks(const SwFrmFmts rFormats, std::mapconst SwFrmFmt*, const SwFrmFmt* rLinks); diff --git a/sw/qa/extras/uiwriter/data/fdo85554.odt b/sw/qa/extras/uiwriter/data/fdo85554.odt new file mode 100644 index 000..9c30b8d Binary files /dev/null and b/sw/qa/extras/uiwriter/data/fdo85554.odt differ diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index d79b6b3..2ed5298 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -56,6 +56,7 @@ public: void testChineseConversionNonChineseText(); void testChineseConversionTraditionalToSimplified(); void testChineseConversionSimplifiedToTraditional(); +void testFdo85554(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -78,6 +79,7 @@ public: CPPUNIT_TEST(testChineseConversionNonChineseText); CPPUNIT_TEST(testChineseConversionTraditionalToSimplified); CPPUNIT_TEST(testChineseConversionSimplifiedToTraditional); +CPPUNIT_TEST(testFdo85554); CPPUNIT_TEST_SUITE_END(); @@ -561,6 +563,29 @@ void SwUiWriterTest::testChineseConversionSimplifiedToTraditional() } +void SwUiWriterTest::testFdo85554() +{ +// Load the document, it contains one shape with a textbox. +load(/sw/qa/extras/uiwriter/data/, fdo85554.odt); + +// Add a second shape to the document. +uno::Referencecss::lang::XMultiServiceFactory xFactory(mxComponent, uno::UNO_QUERY); +uno::Referencedrawing::XShape xShape(xFactory-createInstance(com.sun.star.drawing.RectangleShape), uno::UNO_QUERY); +xShape-setSize(awt::Size(1, 1)); +xShape-setPosition(awt::Point(1000, 1000)); +uno::Referencedrawing::XDrawPageSupplier xDrawPageSupplier(mxComponent, uno::UNO_QUERY); +uno::Referencedrawing::XDrawPage xDrawPage = xDrawPageSupplier-getDrawPage(); +xDrawPage-add(xShape); + +// Save it and load it back. +reload(writer8, fdo85554.odt); + +xDrawPageSupplier.set(mxComponent, uno::UNO_QUERY); +xDrawPage = xDrawPageSupplier-getDrawPage(); +// This was 1, we lost a shape on export. +CPPUNIT_ASSERT_EQUAL(static_castsal_Int32(2), xDrawPage-getCount()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index e48160f..0c8ede9 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -215,6 +215,25 @@ uno::Any SwTextBoxHelper::getByIndex(SdrPage* pPage, sal_Int32 nIndex, std::set return pRet ? uno::makeAny(uno::Referencedrawing::XShape(pRet-getUnoShape(), uno::UNO_QUERY)) : uno::Any(); } +sal_Int32 SwTextBoxHelper::getOrdNum(const SdrObject* pObject, std::setconst SwFrmFmt* rTextBoxes) +{ +if (const SdrPage* pPage = pObject-GetPage()) +{ +sal_Int32 nOrder = 0; // Current logical order. +for (size_t i = 0; i pPage-GetObjCount(); ++i) +{ +if (lcl_isTextBox(pPage-GetObj(i), rTextBoxes)) +continue; +if (pPage-GetObj(i) == pObject) +return nOrder; +++nOrder; +} +} + +SAL_WARN(sw.core, SwTextBoxHelper::getOrdNum: no page or page doesn't contain the object); +return pObject-GetOrdNum(); +} + SwFrmFmt* SwTextBoxHelper::findTextBox(uno::Referencedrawing::XShape xShape) { SwXShape* pShape = dynamic_castSwXShape*(xShape.get()); diff --git
Re: Bypassing user data migration
On 11/20/2014 03:05 PM, Hung Mark wrote: 1) https://wiki.openoffice.org/wiki/Documentation/Administration_Guide/Deactivating_Registration_Wizard That registration wizard is dead and gone from LO anyway. 2) ?xml version=1.0 encoding=UTF-8? oor:component-data xmlns:oor=http://openoffice.org/2001/registry; xmlns:xs=http://www.w3.org/2001/XMLSchema; oor:name=Setup oor:package=org.openoffice node oor:name=Office prop oor:name=MigrationCompleted oor:type=xs:boolean valuetrue/value /prop /node /oor:component-data What works fine for me is to add a share/registry/nomigrate.xcd into the LO installation containing ?xml version=1.0? oor:data xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:oor=http://openoffice.org/2001/registry; dependency file=main/ oor:component-data xmlns:install=http://openoffice.org/2004/installation; oor:name=Setup oor:package=org.openoffice node oor:name=Office prop oor:name=MigrationCompleted oor:op=fuse valuetrue/value /prop /node /oor:component-data /oor:data ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: configure.ac
configure.ac |5 - 1 file changed, 5 deletions(-) New commits: commit e3da025f9ba79b88ad979803c91209afa03fedc9 Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 18:05:17 2014 +0200 Bin the --disable-vba option We don't check it anywhere in configure.ac. Change-Id: I7ccd0480049bc43139552eb32d8c8ac254aeeecd diff --git a/configure.ac b/configure.ac index 1dc5329..5bafb48 100644 --- a/configure.ac +++ b/configure.ac @@ -924,11 +924,6 @@ AC_ARG_ENABLE(lockdown, [Disables the gconf integration work in LibreOffice.]), ) -AC_ARG_ENABLE(vba, -AS_HELP_STRING([--disable-vba], -[Disables the vba compatibility feature.]) -) - AC_ARG_ENABLE(pch, AS_HELP_STRING([--enable-pch], [Enables precompiled header support for C++.]) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source
svx/source/table/tablecontroller.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c3a9a9542b018f781ee12e6c8c943d4f19641afe Author: Caolán McNamara caol...@redhat.com Date: Thu Nov 20 16:18:22 2014 + that's not right anyway, using the Distance as a which-id Change-Id: If6422d35b5d7b4b9a3cf9f16c34a1ee977b3085a diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index d9f03b7..f5b4c99 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -894,7 +894,7 @@ void SvxTableController::onFormatTable( SfxRequest rReq ) SvxBoxItem aNewBoxItem( static_cast const SvxBoxItem ( aNewSet.Get( SDRATTR_TABLE_BORDER ) ) ); if( aNewBoxItem.GetDistance( BOX_LINE_LEFT ) != aBoxItem.GetDistance( BOX_LINE_LEFT ) ) -aNewSet.Put(SdrMetricItem( aNewBoxItem.GetDistance( BOX_LINE_LEFT ) ) ); +aNewSet.Put(makeSdrTextLeftDistItem( aNewBoxItem.GetDistance( BOX_LINE_LEFT ) ) ); if( aNewBoxItem.GetDistance( BOX_LINE_RIGHT ) != aBoxItem.GetDistance( BOX_LINE_RIGHT ) ) aNewSet.Put(makeSdrTextRightDistItem( aNewBoxItem.GetDistance( BOX_LINE_RIGHT ) ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/priorities' - formula/source include/formula svtools/source svx/source vcl/source
formula/source/ui/dlg/formula.cxx | 18 +- formula/source/ui/dlg/funcutl.cxx | 26 -- include/formula/funcutl.hxx|2 +- svtools/source/contnr/imivctl.hxx |8 svtools/source/contnr/imivctl1.cxx | 12 ++-- svx/source/dialog/imapdlg.cxx |8 svx/source/dialog/imapimp.hxx |2 +- vcl/source/window/dockmgr.cxx | 26 +- vcl/source/window/dockwin.cxx | 14 +++--- 9 files changed, 57 insertions(+), 59 deletions(-) New commits: commit 918cb026bf0d3d7feb7f299ad4a4c83cda8ea504 Author: Tobias Madl tobias.madl@gmail.com Date: Thu Nov 20 16:21:17 2014 + changed timers to idles Change-Id: Iaceef008e7df91f3a9ad54fdaec25f2170100ee0 diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 5573f72..16d96fe 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -183,7 +183,7 @@ namespace formula boolbStructUpdate; MultiLineEdit* pMEdit; boolbUserMatrixFlag; -Timer aTimer; +IdleaIdle; const OUString aTitle1; const OUString aTitle2; @@ -353,11 +353,11 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent FormulaDlg_Impl::~FormulaDlg_Impl() { -if(aTimer.IsActive()) +if(aIdle.IsActive()) { -aTimer.SetTimeoutHdl(Link()); -aTimer.Stop(); -}// if(aTimer.IsActive()) +aIdle.SetIdleHdl(Link()); +aIdle.Stop(); +}// if(aIdle.IsActive()) bIsShutDown=true;// Set it in order to PreNotify not to save GetFocus. m_pTabCtrl-RemovePage(TP_FUNCTION); @@ -412,7 +412,7 @@ void FormulaDlg_Impl::PreNotify( NotifyEvent rNEvt ) FormEditData* pData = m_pHelper-getFormEditData(); -if (pData !aTimer.IsActive()) // won't be destroyed via Close +if (pData !aIdle.IsActive()) // won't be destroyed via Close { pData-SetUniqueId(aActivWinId); } @@ -1773,9 +1773,9 @@ OUString FormulaDlg::GetMeText() const void FormulaDlg::Update() { m_pImpl-Update(); -m_pImpl-aTimer.SetTimeout(200); -m_pImpl-aTimer.SetTimeoutHdl(LINK( this, FormulaDlg, UpdateFocusHdl)); -m_pImpl-aTimer.Start(); +m_pImpl-aIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER); +m_pImpl-aIdle.SetIdleHdl(LINK( this, FormulaDlg, UpdateFocusHdl)); +m_pImpl-aIdle.Start(); } void FormulaDlg::DoEnter(bool _bOk) diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index c02ed91..b089718 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -455,15 +455,13 @@ void EditBox::UpdateOldSel() // class RefEdit -#define SC_ENABLE_TIME 100 - RefEdit::RefEdit( vcl::Window* _pParent, vcl::Window* pShrinkModeLabel, WinBits nStyle ) : Edit( _pParent, nStyle ) , pAnyRefDlg( NULL ) , pLabelWidget(pShrinkModeLabel) { -aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) ); -aTimer.SetTimeout( SC_ENABLE_TIME ); +aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) ); +aIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); } RefEdit::RefEdit( vcl::Window* _pParent,IControlReferenceHandler* pParent, @@ -472,8 +470,8 @@ RefEdit::RefEdit( vcl::Window* _pParent,IControlReferenceHandler* pParent, , pAnyRefDlg( pParent ) , pLabelWidget(pShrinkModeLabel) { -aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) ); -aTimer.SetTimeout( SC_ENABLE_TIME ); +aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) ); +aIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); } extern C SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeRefEdit(vcl::Window *pParent, VclBuilder::stringmap ) @@ -483,8 +481,8 @@ extern C SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeRefEdit(vcl::Window *p RefEdit::~RefEdit() { -aTimer.SetTimeoutHdl( Link() ); -aTimer.Stop(); +aIdle.SetIdleHdl( Link() ); +aIdle.Stop(); } void RefEdit::SetRefString( const OUString rStr ) @@ -509,12 +507,12 @@ void RefEdit::SetRefValid(bool bValid) void RefEdit::SetText(const OUString rStr) { Edit::SetText( rStr ); -UpdateHdl( aTimer ); +UpdateHdl( aIdle ); } void RefEdit::StartUpdateData() { -aTimer.Start(); +aIdle.Start(); } void RefEdit::SetReferences( IControlReferenceHandler* pDlg, vcl::Window* pLabel ) @@ -524,13 +522,13 @@ void RefEdit::SetReferences( IControlReferenceHandler* pDlg, vcl::Window* pLabel if( pDlg ) { -aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) ); -aTimer.SetTimeout( SC_ENABLE_TIME ); +aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) ); +aIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); } else { -aTimer.SetTimeoutHdl( Link() ); -aTimer.Stop(); +
[Libreoffice-commits] core.git: Branch 'feature/perfwork5' - sc/inc sc/source
sc/inc/column.hxx |2 +- sc/inc/document.hxx |2 +- sc/inc/formulacell.hxx |2 +- sc/inc/table.hxx|2 +- sc/source/core/data/column.cxx | 11 +++ sc/source/core/data/document.cxx|4 ++-- sc/source/core/data/formulacell.cxx |6 -- sc/source/core/data/table2.cxx |4 ++-- sc/source/filter/excel/read.cxx |4 ++-- 9 files changed, 21 insertions(+), 16 deletions(-) New commits: commit d84749f6208d179f12a7ad3fcc7d39d060017496 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Thu Nov 20 11:31:42 2014 -0500 No need to start listening in CalcAfterLoad for xls import. We do that prior to it, and in fact, doing it here would unregister all group area listeners and re-register non-group ones, which is massively slower with huge documents. Change-Id: I693f681df05f036eb1aa53554e601066c469f49a diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 709840a..81419c8 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -357,7 +357,7 @@ public: voidSetDirtyAfterLoad(); voidSetTableOpDirty( const ScRange ); voidCalcAll(); -void CalcAfterLoad( sc::CompileFormulaContext rCxt ); +void CalcAfterLoad( sc::CompileFormulaContext rCxt, bool bStartListening ); void CompileAll( sc::CompileFormulaContext rCxt ); void CompileXML( sc::CompileFormulaContext rCxt, ScProgress rProgress ); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index a3bfa07..4b617e5 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1015,7 +1015,7 @@ public: voidSetTableOpDirty( const ScRange ); // for Interpreter TableOp voidInterpretDirtyCells( const ScRangeList rRanges ); SC_DLLPUBLIC void CalcAll(); -SC_DLLPUBLIC void CalcAfterLoad(); +SC_DLLPUBLIC void CalcAfterLoad( bool bStartListening = true ); voidCompileAll(); voidCompileXML(); diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 67381a0..50a6f6c 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -237,7 +237,7 @@ public: void CompileTokenArray( bool bNoListening = false ); void CompileTokenArray( sc::CompileFormulaContext rCxt, bool bNoListening = false ); void CompileXML( sc::CompileFormulaContext rCxt, ScProgress rProgress ); // compile temporary string tokens -void CalcAfterLoad( sc::CompileFormulaContext rCxt ); +void CalcAfterLoad( sc::CompileFormulaContext rCxt, bool bStartListening ); boolMarkUsedExternalReferences(); voidInterpret(); bool IsIterCell() const { return bIsIterCell; } diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 02a88ef..04ebaa9 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -533,7 +533,7 @@ public: voidSetDirtyVar(); voidSetTableOpDirty( const ScRange ); voidCalcAll(); -void CalcAfterLoad( sc::CompileFormulaContext rCxt ); +void CalcAfterLoad( sc::CompileFormulaContext rCxt, bool bStartListening ); void CompileAll( sc::CompileFormulaContext rCxt ); void CompileXML( sc::CompileFormulaContext rCxt, ScProgress rProgress ); diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 1100d92..4cbb318 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2850,12 +2850,15 @@ public: class CalcAfterLoadHandler { sc::CompileFormulaContext mrCxt; +bool mbStartListening; + public: -CalcAfterLoadHandler( sc::CompileFormulaContext rCxt ) : mrCxt(rCxt) {} +CalcAfterLoadHandler( sc::CompileFormulaContext rCxt, bool bStartListening ) : +mrCxt(rCxt), mbStartListening(bStartListening) {} void operator() (size_t /*nRow*/, ScFormulaCell* pCell) { -pCell-CalcAfterLoad(mrCxt); +pCell-CalcAfterLoad(mrCxt, mbStartListening); } }; @@ -3283,9 +3286,9 @@ bool ScColumn::CompileErrorCells( sc::CompileFormulaContext rCxt, sal_uInt16 nE return aHdl.isCompiled(); } -void ScColumn::CalcAfterLoad( sc::CompileFormulaContext rCxt ) +void ScColumn::CalcAfterLoad( sc::CompileFormulaContext rCxt, bool bStartListening ) { -CalcAfterLoadHandler aFunc(rCxt); +CalcAfterLoadHandler aFunc(rCxt, bStartListening); sc::ProcessFormula(maCells, aFunc); } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 40a4672..a513898 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -3740,7 +3740,7 @@ bool ScDocument::CompileErrorCells(sal_uInt16 nErrCode) return bCompiled; } -void ScDocument::CalcAfterLoad() +void ScDocument::CalcAfterLoad( bool bStartListening ) { if (bIsClip)// Excel-Dateien werden aus dem Clipboard in ein Clip-Doc geladen return; // dann wird erst beim Einfuegen
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/column.hxx |2 +- sc/inc/document.hxx |2 +- sc/inc/formulacell.hxx |2 +- sc/inc/table.hxx|2 +- sc/source/core/data/column.cxx | 11 +++ sc/source/core/data/document.cxx|4 ++-- sc/source/core/data/formulacell.cxx |6 -- sc/source/core/data/table2.cxx |4 ++-- sc/source/filter/excel/read.cxx |4 ++-- 9 files changed, 21 insertions(+), 16 deletions(-) New commits: commit 49a3f0c43e8f0ad236445a374b9524634645f824 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Thu Nov 20 11:31:42 2014 -0500 No need to start listening in CalcAfterLoad for xls import. We do that prior to it, and in fact, doing it here would unregister all group area listeners and re-register non-group ones, which is massively slower with huge documents. Change-Id: I693f681df05f036eb1aa53554e601066c469f49a diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index a46e55d..da94024 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -355,7 +355,7 @@ public: voidSetDirtyAfterLoad(); voidSetTableOpDirty( const ScRange ); voidCalcAll(); -void CalcAfterLoad( sc::CompileFormulaContext rCxt ); +void CalcAfterLoad( sc::CompileFormulaContext rCxt, bool bStartListening ); void CompileAll( sc::CompileFormulaContext rCxt ); void CompileXML( sc::CompileFormulaContext rCxt, ScProgress rProgress ); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index d904473..ee43f2c 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1016,7 +1016,7 @@ public: voidSetTableOpDirty( const ScRange ); // for Interpreter TableOp voidInterpretDirtyCells( const ScRangeList rRanges ); SC_DLLPUBLIC void CalcAll(); -SC_DLLPUBLIC void CalcAfterLoad(); +SC_DLLPUBLIC void CalcAfterLoad( bool bStartListening = true ); voidCompileAll(); voidCompileXML(); diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 67381a0..50a6f6c 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -237,7 +237,7 @@ public: void CompileTokenArray( bool bNoListening = false ); void CompileTokenArray( sc::CompileFormulaContext rCxt, bool bNoListening = false ); void CompileXML( sc::CompileFormulaContext rCxt, ScProgress rProgress ); // compile temporary string tokens -void CalcAfterLoad( sc::CompileFormulaContext rCxt ); +void CalcAfterLoad( sc::CompileFormulaContext rCxt, bool bStartListening ); boolMarkUsedExternalReferences(); voidInterpret(); bool IsIterCell() const { return bIsIterCell; } diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 02a88ef..04ebaa9 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -533,7 +533,7 @@ public: voidSetDirtyVar(); voidSetTableOpDirty( const ScRange ); voidCalcAll(); -void CalcAfterLoad( sc::CompileFormulaContext rCxt ); +void CalcAfterLoad( sc::CompileFormulaContext rCxt, bool bStartListening ); void CompileAll( sc::CompileFormulaContext rCxt ); void CompileXML( sc::CompileFormulaContext rCxt, ScProgress rProgress ); diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index f382196..c0e2991 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2824,12 +2824,15 @@ public: class CalcAfterLoadHandler { sc::CompileFormulaContext mrCxt; +bool mbStartListening; + public: -CalcAfterLoadHandler( sc::CompileFormulaContext rCxt ) : mrCxt(rCxt) {} +CalcAfterLoadHandler( sc::CompileFormulaContext rCxt, bool bStartListening ) : +mrCxt(rCxt), mbStartListening(bStartListening) {} void operator() (size_t /*nRow*/, ScFormulaCell* pCell) { -pCell-CalcAfterLoad(mrCxt); +pCell-CalcAfterLoad(mrCxt, mbStartListening); } }; @@ -3257,9 +3260,9 @@ bool ScColumn::CompileErrorCells( sc::CompileFormulaContext rCxt, sal_uInt16 nE return aHdl.isCompiled(); } -void ScColumn::CalcAfterLoad( sc::CompileFormulaContext rCxt ) +void ScColumn::CalcAfterLoad( sc::CompileFormulaContext rCxt, bool bStartListening ) { -CalcAfterLoadHandler aFunc(rCxt); +CalcAfterLoadHandler aFunc(rCxt, bStartListening); sc::ProcessFormula(maCells, aFunc); } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index a8a3707..9f9e45e 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -3740,7 +3740,7 @@ bool ScDocument::CompileErrorCells(sal_uInt16 nErrCode) return bCompiled; } -void ScDocument::CalcAfterLoad() +void ScDocument::CalcAfterLoad( bool bStartListening ) { if (bIsClip)// Excel-Dateien werden aus dem Clipboard in ein Clip-Doc geladen return; // dann wird erst beim Einfuegen
[Libreoffice-commits] core.git: translations
translations |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 119dd45d6d11b20d422c4a7fac758c4b9e7d002d Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com Date: Thu Nov 20 13:12:28 2014 +0100 Updated core Project: translations 587e99affea726021dc41da2cc5a21a4b961249b diff --git a/translations b/translations index 6453172..587e99a 16 --- a/translations +++ b/translations @@ -1 +1 @@ -Subproject commit 6453172eac4a30a37224db66ddd76c13f614959d +Subproject commit 587e99affea726021dc41da2cc5a21a4b961249b ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] libvisio.git: src/lib
src/lib/VSDContentCollector.cpp |4 1 file changed, 4 insertions(+) New commits: commit a0f87f055629f21d43d6c58eabf3c978547e6f08 Author: David Tardon dtar...@redhat.com Date: Thu Nov 20 17:31:55 2014 +0100 fix page referencing itself as its background page Change-Id: I70d91a8f2f72cba6cd6ce4a3427af98edb6d0a4a diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp index a3cd0f1..87a5042 100644 --- a/src/lib/VSDContentCollector.cpp +++ b/src/lib/VSDContentCollector.cpp @@ -2762,6 +2762,10 @@ void libvisio::VSDContentCollector::endPage() { _handleLevelChange(0); _flushCurrentPage(); +// TODO: this check does not prevent two pages mutually referencing themselves +// as their background pages. Or even longer cycle of pages. +if (m_currentPage.m_backgroundPageID == m_currentPage.m_currentPageID) + m_currentPage.m_backgroundPageID = MINUS_ONE; if (m_isBackgroundPage) m_pages.addBackgroundPage(m_currentPage); else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/num-override-start.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx |7 +++ writerfilter/source/dmapper/NumberingManager.cxx | 11 +++ 3 files changed, 18 insertions(+) New commits: commit 1f73ba915794a881f0e3956a5465e46432b184c9 Author: Miklos Vajna vmik...@collabora.co.uk Date: Thu Nov 20 17:49:11 2014 +0100 DOCX filter: import w:startOverride Change-Id: Id95518c7ea38a974593a1880b4ef581ff49bcb90 diff --git a/sw/qa/extras/ooxmlexport/data/num-override-start.docx b/sw/qa/extras/ooxmlexport/data/num-override-start.docx new file mode 100644 index 000..b57a02c Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/num-override-start.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 96b0d0ee..d120db3 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -599,6 +599,13 @@ DECLARE_OOXMLEXPORT_TEST(testNumOverrideLvltext, num-override-lvltext.docx) CPPUNIT_ASSERT_EQUAL(OUString(0a), parseDump(//Special[@nType='POR_NUMBER']/pFont, color)); } +DECLARE_OOXMLEXPORT_TEST(testNumOverrideStart, num-override-start.docx) +{ +uno::Referencecontainer::XIndexAccess xRules = getProperty uno::Referencecontainer::XIndexAccess (getStyles(NumberingStyles)-getByName(WWNum1), NumberingRules); +// This was 1, i.e. the numbering on the second level was 1.1, not 1.3. +CPPUNIT_ASSERT_EQUAL(sal_Int16(3), comphelper::SequenceAsHashMap(xRules-getByIndex(1))[StartWith].getsal_Int16()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index af2c2e3..2412f8c 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -1047,6 +1047,17 @@ void ListsManager::lcl_sprm( Sprm rSprm ) pProperties-resolve(*this); } break; +case NS_ooxml::LN_CT_NumLvl_startOverride: +{ +if(m_pCurrentDefinition) +{ +if (ListLevel::Pointer pCurrentLevel = m_pCurrentDefinition-GetCurrentLevel()) +// w:num - w:lvlOverride - w:startOverride is the non-abstract equivalent of +// w:abstractNum - w:lvl - w:start +pCurrentLevel-SetValue(NS_ooxml::LN_CT_Lvl_start, nIntValue); +} +} +break; case NS_ooxml::LN_CT_AbstractNum_numStyleLink: { OUString sStyleName = rSprm.getValue( )-getString( ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - include/vcl sc/source vcl/source
include/vcl/outdev.hxx|1 - sc/source/ui/view/output2.cxx |2 +- vcl/source/app/svapp.cxx |2 +- vcl/source/outdev/bitmap.cxx | 22 -- vcl/source/window/window.cxx |2 +- 5 files changed, 3 insertions(+), 26 deletions(-) New commits: commit cc6cce6b1be75cd160fc858051e305961fe697dd Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 11:52:37 2014 +0100 One more IsMapMode() - IsMapModeEnabled(). Change-Id: Id8e5ca61eedb7607b5ef9d7e67bee47c87d4990b diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index f81eb3d..fc3535e 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -795,7 +795,7 @@ bool ScDrawStringsVars::HasEditCharacters() const double ScOutputData::GetStretch() { -if ( mpRefDevice-IsMapMode() ) +if ( mpRefDevice-IsMapModeEnabled() ) { // If a non-trivial MapMode is set, its scale is now already // taken into account in the OutputDevice's font handling commit 3a6f1c6c65bc78f1d13a924b028f7ed38fc717c4 Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 11:04:24 2014 +0100 vcl: If there it a MapMode, it is applied. Based on that, I believe this condition can go too. Change-Id: I88d8211678ca148bdf85729f57893e1476a52fc9 diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index fe2b835..93c37c4 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -522,17 +522,6 @@ void OutputDevice::DrawDeviceBitmap( const Point rDestPt, const Size rDestSize SalBitmap* pSalAlphaBmp = pMaskBmp-ImplGetSalBitmap(); bool bTryDirectPaint(pSalSrcBmp pSalAlphaBmp); -if (bTryDirectPaint) -{ -// only paint direct when no MapMode, else the -// more expensive conversions may be done for short-time Bitmap/BitmapEx -// used for buffering only -if (IsMapModeEnabled()) -{ -bTryDirectPaint = false; -} -} - if (bTryDirectPaint mpGraphics-DrawAlphaBitmap(aPosAry, *pSalSrcBmp, *pSalAlphaBmp, this)) { // tried to paint as alpha directly. If tis worked, we are done (except @@ -661,17 +650,6 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap rBmp, const AlphaMask r // separate alpha VDev bool bTryDirectPaint(!mpAlphaVDev !pDisableNative !bHMirr !bVMirr); -if (bTryDirectPaint) -{ -// only paint direct when no MapMode, else the -// more expensive conversions may be done for short-time Bitmap/BitmapEx -// used for buffering only -if (IsMapModeEnabled()) -{ -bTryDirectPaint = false; -} -} - if(bTryDirectPaint) { Point aRelPt = aOutPt + Point( mnOutOffX, mnOutOffY ); commit f622648b23ddab9387dd72116d2105fe2e59ff76 Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 10:14:23 2014 +0100 vcl: Kill IsMapMode(), it means the same as IsMapModeEnabled(). Change-Id: I65fd40b8268cb0a27ba40da60fcf8e84cc8f7661 diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index d80d394..dfe88aa 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1556,7 +1556,6 @@ public: virtual voidSetMapMode( const MapMode rNewMapMode ); virtual voidSetRelativeMapMode( const MapMode rNewMapMode ); const MapMode GetMapMode() const { return maMapMode; } -boolIsMapMode() const { return mbMap; } // #i75163# basegfx::B2DHomMatrix GetViewTransformation() const; diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index c9dd3c7..8d99977 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -595,7 +595,7 @@ void Application::SetSettings( const AllSettings rSettings ) { pVirDev-mnDPIX = pFirstFrame-mnDPIX; pVirDev-mnDPIY = pFirstFrame-mnDPIY; -if ( pVirDev-IsMapMode() ) +if (pVirDev-IsMapModeEnabled()) { MapMode aMapMode = pVirDev-GetMapMode(); pVirDev-SetMapMode(); diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 4b0583b..fe2b835 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -527,7 +527,7 @@ void OutputDevice::DrawDeviceBitmap( const Point rDestPt, const Size rDestSize // only paint direct when no MapMode, else the // more expensive conversions may be done for
[Libreoffice-commits] core.git: sc/source
sc/source/core/opencl/openclwrapper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 06d90253c2890d437063aae263a1f9a5f9280ad8 Author: Tor Lillqvist t...@collabora.com Date: Thu Nov 20 19:32:26 2014 +0200 Use U_SUCCESS Change-Id: If16848fc47bfa28c30c9ce4b547aeb68cf166d90 diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx index 1e4bb7a..66af89f 100644 --- a/sc/source/core/opencl/openclwrapper.cxx +++ b/sc/source/core/opencl/openclwrapper.cxx @@ -529,7 +529,7 @@ bool match(const OUString rPattern, const OUString rInput) icu::UnicodeString sIcuInput(reinterpret_castconst UChar*(rInput.getStr()), rInput.getLength()); RegexMatcher aMatcher(sIcuPattern, sIcuInput, 0, nIcuError); -if (nIcuError == U_ZERO_ERROR aMatcher.matches(nIcuError) nIcuError == U_ZERO_ERROR) +if (U_SUCCESS(nIcuError) aMatcher.matches(nIcuError) U_SUCCESS(nIcuError)) return true; return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sax/source sw/qa
sax/source/fastparser/fastparser.cxx | 59 -- sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |1 2 files changed, 25 insertions(+), 35 deletions(-) New commits: commit 1307c65d74fc9a1241f0a50142921cadac1e882b Author: LuboÅ¡ LuÅák l.lu...@collabora.com Date: Thu Nov 20 13:57:46 2014 +0100 proper error reporting from libxml2 Change-Id: Ia173f7f4c88c90b6d54c9a47d6ae18b933502678 diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index e1d22d2..bf3aa01 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -532,46 +532,20 @@ Event Entity::getEvent( CallbackType aType ) return rEvent; } -OUString lclGetErrorMessage( xmlParserCtxtPtr, const OUString sSystemId, sal_Int32 nLine ) +OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, const OUString sSystemId, sal_Int32 nLine ) { -const sal_Char* pMessage = ; -#if 0 -pMessage = Error; -switch( xmlE ) -{ -case XML_ERROR_NONE:pMessage = No; break; -case XML_ERROR_NO_MEMORY: pMessage = no memory; break; -case XML_ERROR_SYNTAX: pMessage = syntax; break; -case XML_ERROR_NO_ELEMENTS: pMessage = no elements; break; -case XML_ERROR_INVALID_TOKEN: pMessage = invalid token; break; -case XML_ERROR_UNCLOSED_TOKEN: pMessage = unclosed token;break; -case XML_ERROR_PARTIAL_CHAR:pMessage = partial char; break; -case XML_ERROR_TAG_MISMATCH:pMessage = tag mismatch; break; -case XML_ERROR_DUPLICATE_ATTRIBUTE: pMessage = duplicate attribute; break; -case XML_ERROR_JUNK_AFTER_DOC_ELEMENT: pMessage = junk after doc element;break; -case XML_ERROR_PARAM_ENTITY_REF:pMessage = parameter entity reference;break; -case XML_ERROR_UNDEFINED_ENTITY:pMessage = undefined entity; break; -case XML_ERROR_RECURSIVE_ENTITY_REF:pMessage = recursive entity reference;break; -case XML_ERROR_ASYNC_ENTITY:pMessage = async entity; break; -case XML_ERROR_BAD_CHAR_REF:pMessage = bad char reference;break; -case XML_ERROR_BINARY_ENTITY_REF: pMessage = binary entity reference; break; -case XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF: pMessage = attribute external entity reference; break; -case XML_ERROR_MISPLACED_XML_PI:pMessage = misplaced xml processing instruction; break; -case XML_ERROR_UNKNOWN_ENCODING:pMessage = unknown encoding; break; -case XML_ERROR_INCORRECT_ENCODING: pMessage = incorrect encoding;break; -case XML_ERROR_UNCLOSED_CDATA_SECTION: pMessage = unclosed cdata section;break; -case XML_ERROR_EXTERNAL_ENTITY_HANDLING:pMessage = external entity reference; break; -case XML_ERROR_NOT_STANDALONE: pMessage = not standalone;break; -default:; -} -#endif +const sal_Char* pMessage; +xmlErrorPtr error = xmlCtxtGetLastError( ctxt ); +if( error error-message ) +pMessage = error-message; +else +pMessage = unknown error; OUStringBuffer aBuffer( '[' ); aBuffer.append( sSystemId ); aBuffer.append( line ); aBuffer.append( nLine ); aBuffer.append( ]: ); aBuffer.appendAscii( pMessage ); -aBuffer.append( error ); return aBuffer.makeStringAndClear(); } commit 0df9ac47dfa287249e77bb8f6a324a94a48d Author: LuboÅ¡ LuÅák l.lu...@collabora.com Date: Thu Nov 20 13:42:16 2014 +0100 make FastSaxParser provide the whole content in one characters() call SAX interface is not required to provide the whole node content in one characters() call (e.g. if there's an entity that needs decoding). However it's easier to consumers to assume this (e.g. writerfilter's DomainMapper::lcl_utext() handles datecontrol that way), and expat apparently never used this. However this can happen with libxml2, so ensure such consumers still work. Change-Id: Ib564f372fbea8451f84553a6d49a07d091a950e9 diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 38a4bbb..e1d22d2 100644 ---
[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - 2 commits - include/vcl vcl/inc vcl/source vcl/win
include/vcl/salgtype.hxx |7 +++ vcl/inc/win/salgdi.h | 44 ++- vcl/source/outdev/bitmap.cxx |6 +- vcl/win/source/gdi/salgdi.cxx| 55 +++ vcl/win/source/gdi/salnativewidgets-luna.cxx | 54 +++ vcl/win/source/gdi/salvd.cxx |6 +- vcl/win/source/gdi/winlayout.cxx | 62 +++ 7 files changed, 175 insertions(+), 59 deletions(-) New commits: commit cab741ef1ed6171ae10f7a51f0ed8d50983ad3dd Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 18:49:03 2014 +0100 windows opengl: Implement the native theming with OpenGL. Change-Id: If8eb5cef228f4eb28e16de3e3135742282403cdc diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index c87af5f..1af7807 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -39,6 +39,7 @@ class FontSelectPattern; class ImplWinFontEntry; class ImplFontAttrCache; +class OpenGLTexture; class PhysicalFontCollection; class SalGraphicsImpl; class WinOpenGLSalGraphicsImpl; @@ -154,7 +155,7 @@ private: HBITMAP mhBitmap; /// DIBSection data. -sal_uInt8 *mpData; +sal_uInt32 *mpData; /// Mapping between the GDI position and OpenGL, to use for OpenGL drawing. SalTwoRect maRects; @@ -168,8 +169,13 @@ public: HDC getCompatibleHDC() { return mhCompatibleDC; } -/// Call the WinOpenGLSalGraphicsImpl's DrawMask(). -void DrawMask(SalColor color); +SalTwoRect getTwoRect() { return maRects; } + +/// Reset the DC with the defined color. +void fill(sal_uInt32 color); + +/// Obtain the texture; the caller must delete it after use. +OpenGLTexture* getTexture(); }; class WinSalGraphics : public SalGraphics @@ -177,9 +183,12 @@ class WinSalGraphics : public SalGraphics friend class WinSalGraphicsImpl; friend class ScopedFont; friend class OpenGLCompatibleDC; -private: +friend class WinLayout; + +protected: boost::scoped_ptrSalGraphicsImpl mpImpl; +private: HDC mhLocalDC; // HDC boolmbPrinter : 1; // is Printer boolmbVirDev : 1; // is VirDev diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx index d011f31..678067d 100644 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -601,18 +601,23 @@ OpenGLCompatibleDC::~OpenGLCompatibleDC() } } -void OpenGLCompatibleDC::DrawMask(SalColor color) +void OpenGLCompatibleDC::fill(sal_uInt32 color) { -if (!mpImpl) +if (!mpData) return; -// turn what's in the mpData into a texture -OpenGLTexture aTexture(maRects.mnSrcWidth, maRects.mnSrcHeight, GL_RGBA, GL_UNSIGNED_BYTE, mpData); -CHECK_GL_ERROR(); +sal_uInt32 *p = mpData; +for (int i = maRects.mnSrcWidth * maRects.mnSrcHeight; i 0; --i) +*p++ = color; +} -mpImpl-PreDraw(); -mpImpl-DrawMask(aTexture, color, maRects); -mpImpl-PostDraw(); +OpenGLTexture* OpenGLCompatibleDC::getTexture() +{ +if (!mpImpl) +return NULL; + +// turn what's in the mpData into a texture +return new OpenGLTexture(maRects.mnSrcWidth, maRects.mnSrcHeight, GL_RGBA, GL_UNSIGNED_BYTE, reinterpret_castsal_uInt8*(mpData)); } WinSalGraphics::WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd): diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 8fcc16e..8c87710 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -35,6 +35,7 @@ #include osl/module.h +#include opengl/win/gdiimpl.hxx #include vcl/svapp.hxx #include vcl/settings.hxx @@ -1260,18 +1261,53 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, rc.top= buttonRect.Top(); rc.bottom = buttonRect.Bottom()+1; -// set default text alignment -int ta = SetTextAlign( getHDC(), TA_LEFT|TA_TOP|TA_NOUPDATECP ); +OUString aCaptionStr(aCaption.replace('~', '')); // translate mnemonics -OUString aCaptionStr( aCaption.replace('~', '') ); // translate mnemonics -bOk = ImplDrawNativeControl(getHDC(), hTheme, rc, -nType, nPart, nState, aValue, -aCaptionStr ); +WinOpenGLSalGraphicsImpl *pImpl = dynamic_castWinOpenGLSalGraphicsImpl*(mpImpl.get()); +if (pImpl == NULL) +{ +// set default text alignment +int ta = SetTextAlign(getHDC(), TA_LEFT|TA_TOP|TA_NOUPDATECP); + +bOk = ImplDrawNativeControl(getHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr); + +// restore alignment +SetTextAlign(getHDC(), ta); +} +else +{ +// We can do OpenGL +OpenGLCompatibleDC aBlackDC(*this, buttonRect.Left(), buttonRect.Top(),
[Libreoffice-commits] core.git: 2 commits - include/vcl vcl/inc vcl/source vcl/win
include/vcl/salgtype.hxx |7 +++ vcl/inc/win/salgdi.h | 44 ++- vcl/source/outdev/bitmap.cxx |6 +- vcl/win/source/gdi/salgdi.cxx| 55 +++ vcl/win/source/gdi/salnativewidgets-luna.cxx | 54 +++ vcl/win/source/gdi/salvd.cxx |6 +- vcl/win/source/gdi/winlayout.cxx | 62 +++ 7 files changed, 175 insertions(+), 59 deletions(-) New commits: commit 57d6b92b69a31260dea0d84fcd1fc5866ada7adb Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 18:49:03 2014 +0100 windows opengl: Implement the native theming with OpenGL. Change-Id: If8eb5cef228f4eb28e16de3e3135742282403cdc diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 831a703..8d88784 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -39,6 +39,7 @@ class FontSelectPattern; class ImplWinFontEntry; class ImplFontAttrCache; +class OpenGLTexture; class PhysicalFontCollection; class SalGraphicsImpl; class WinOpenGLSalGraphicsImpl; @@ -154,7 +155,7 @@ private: HBITMAP mhBitmap; /// DIBSection data. -sal_uInt8 *mpData; +sal_uInt32 *mpData; /// Mapping between the GDI position and OpenGL, to use for OpenGL drawing. SalTwoRect maRects; @@ -168,8 +169,13 @@ public: HDC getCompatibleHDC() { return mhCompatibleDC; } -/// Call the WinOpenGLSalGraphicsImpl's DrawMask(). -void DrawMask(SalColor color); +SalTwoRect getTwoRect() { return maRects; } + +/// Reset the DC with the defined color. +void fill(sal_uInt32 color); + +/// Obtain the texture; the caller must delete it after use. +OpenGLTexture* getTexture(); }; class WinSalGraphics : public SalGraphics @@ -177,9 +183,12 @@ class WinSalGraphics : public SalGraphics friend class WinSalGraphicsImpl; friend class ScopedFont; friend class OpenGLCompatibleDC; -private: +friend class WinLayout; + +protected: boost::scoped_ptrSalGraphicsImpl mpImpl; +private: HDC mhLocalDC; // HDC boolmbPrinter : 1; // is Printer boolmbVirDev : 1; // is VirDev diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx index d011f31..678067d 100644 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -601,18 +601,23 @@ OpenGLCompatibleDC::~OpenGLCompatibleDC() } } -void OpenGLCompatibleDC::DrawMask(SalColor color) +void OpenGLCompatibleDC::fill(sal_uInt32 color) { -if (!mpImpl) +if (!mpData) return; -// turn what's in the mpData into a texture -OpenGLTexture aTexture(maRects.mnSrcWidth, maRects.mnSrcHeight, GL_RGBA, GL_UNSIGNED_BYTE, mpData); -CHECK_GL_ERROR(); +sal_uInt32 *p = mpData; +for (int i = maRects.mnSrcWidth * maRects.mnSrcHeight; i 0; --i) +*p++ = color; +} -mpImpl-PreDraw(); -mpImpl-DrawMask(aTexture, color, maRects); -mpImpl-PostDraw(); +OpenGLTexture* OpenGLCompatibleDC::getTexture() +{ +if (!mpImpl) +return NULL; + +// turn what's in the mpData into a texture +return new OpenGLTexture(maRects.mnSrcWidth, maRects.mnSrcHeight, GL_RGBA, GL_UNSIGNED_BYTE, reinterpret_castsal_uInt8*(mpData)); } WinSalGraphics::WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd): diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 8fcc16e..8c87710 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -35,6 +35,7 @@ #include osl/module.h +#include opengl/win/gdiimpl.hxx #include vcl/svapp.hxx #include vcl/settings.hxx @@ -1260,18 +1261,53 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, rc.top= buttonRect.Top(); rc.bottom = buttonRect.Bottom()+1; -// set default text alignment -int ta = SetTextAlign( getHDC(), TA_LEFT|TA_TOP|TA_NOUPDATECP ); +OUString aCaptionStr(aCaption.replace('~', '')); // translate mnemonics -OUString aCaptionStr( aCaption.replace('~', '') ); // translate mnemonics -bOk = ImplDrawNativeControl(getHDC(), hTheme, rc, -nType, nPart, nState, aValue, -aCaptionStr ); +WinOpenGLSalGraphicsImpl *pImpl = dynamic_castWinOpenGLSalGraphicsImpl*(mpImpl.get()); +if (pImpl == NULL) +{ +// set default text alignment +int ta = SetTextAlign(getHDC(), TA_LEFT|TA_TOP|TA_NOUPDATECP); + +bOk = ImplDrawNativeControl(getHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr); + +// restore alignment +SetTextAlign(getHDC(), ta); +} +else +{ +// We can do OpenGL +OpenGLCompatibleDC aBlackDC(*this, buttonRect.Left(), buttonRect.Top(),
[Libreoffice-commits] translations.git: Changes to 'libreoffice-4-4'
New branch 'libreoffice-4-4' available with the following commits: commit eb9f7b932a537ec2bd54d8191bc9356b944f3852 Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com Date: Thu Nov 20 19:06:05 2014 +0100 Branch libreoffice-4-4 This is 'libreoffice-4-4' - the stable branch for the 4.4.x releases. The commit rules are different according to the development phase: + 4.4.0 beta phase: + any bug fixes are allowed without review + late features need approval by 3 people with different affiliation + 4.4.0 rc phase and later: + fixes need approval by one reviewer + late features need approval by 3 more people with different affiliation IMPORTANT: Every developer is responsible for pushing the fixes into all appropriate branches. Note that we do not plan any merge from this branch to master or vice versa. Please, help use to make stable and usable release. If you want to build something cool, unstable, and risky, use master. Change-Id: Ib4161b3a51ec2568f0c48ebbe9d0dabf5dd40b6b ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dictionaries.git: Changes to 'libreoffice-4-4'
New branch 'libreoffice-4-4' available with the following commits: commit 8a8341b0f52091fec03830d36c6f551efa21d5b0 Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com Date: Thu Nov 20 19:06:05 2014 +0100 Branch libreoffice-4-4 This is 'libreoffice-4-4' - the stable branch for the 4.4.x releases. The commit rules are different according to the development phase: + 4.4.0 beta phase: + any bug fixes are allowed without review + late features need approval by 3 people with different affiliation + 4.4.0 rc phase and later: + fixes need approval by one reviewer + late features need approval by 3 more people with different affiliation IMPORTANT: Every developer is responsible for pushing the fixes into all appropriate branches. Note that we do not plan any merge from this branch to master or vice versa. Please, help use to make stable and usable release. If you want to build something cool, unstable, and risky, use master. Change-Id: I1d36519720f73714d2a742da414d828273ee0910 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: Changes to 'libreoffice-4-4'
New branch 'libreoffice-4-4' available with the following commits: commit 980c7cedff5d6b36fc391bb036d9da87350680ea Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com Date: Thu Nov 20 19:06:05 2014 +0100 Branch libreoffice-4-4 This is 'libreoffice-4-4' - the stable branch for the 4.4.x releases. The commit rules are different according to the development phase: + 4.4.0 beta phase: + any bug fixes are allowed without review + late features need approval by 3 people with different affiliation + 4.4.0 rc phase and later: + fixes need approval by one reviewer + late features need approval by 3 more people with different affiliation IMPORTANT: Every developer is responsible for pushing the fixes into all appropriate branches. Note that we do not plan any merge from this branch to master or vice versa. Please, help use to make stable and usable release. If you want to build something cool, unstable, and risky, use master. Change-Id: I2e4319e8af385d4e55ea3e93e37513bd2af887d4 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: configure.ac
configure.ac |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2851ce5afd0f37764cbbc2c2a9a63c7adc844311 Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com Date: Thu Nov 20 19:10:20 2014 +0100 bump product version to 4.5.0.0.alpha0+ Change-Id: Ic79dd9216a6b9ab0d015f9bf6817d1a5e5b92109 diff --git a/configure.ac b/configure.ac index 5bafb48..fe56ff3 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([LibreOffice],[4.4.0.0.alpha2+],[],[],[http://documentfoundation.org/]) +AC_INIT([LibreOffice],[4.5.0.0.alpha0+],[],[],[http://documentfoundation.org/]) AC_PREREQ([2.59]) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'libreoffice-4-4'
New branch 'libreoffice-4-4' available with the following commits: commit 78187c2ab1f5f27254f67f6a113b11866e83f8bb Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com Date: Thu Nov 20 19:14:43 2014 +0100 bump product version to 4.4.0.0.beta1+ Change-Id: I4f22ea3c4fa7b0714166b3d59c3002a9e22b460e commit e4a2289c5c0d02246cb36d2b10f1400c1abf79ae Author: Christian Lohmaier lohmaier+libreoff...@googlemail.com Date: Thu Nov 20 19:06:25 2014 +0100 Branch libreoffice-4-4 This is 'libreoffice-4-4' - the stable branch for the 4.4.x releases. The commit rules are different according to the development phase: + 4.4.0 beta phase: + any bug fixes are allowed without review + late features need approval by 3 people with different affiliation + 4.4.0 rc phase and later: + fixes need approval by one reviewer + late features need approval by 3 more people with different affiliation IMPORTANT: Every developer is responsible for pushing the fixes into all appropriate branches. Note that we do not plan any merge from this branch to master or vice versa. Please, help use to make stable and usable release. If you want to build something cool, unstable, and risky, use master. Change-Id: I242f543e17225a9c7ac242a4a3794e1b1381f87d ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: compilerplugins/clang sw/source
compilerplugins/clang/store/cascadingcondop.cxx | 34 +++- compilerplugins/clang/store/cascadingcondop.hxx |4 ++ sw/source/core/doc/doccorr.cxx |9 ++ 3 files changed, 39 insertions(+), 8 deletions(-) New commits: commit 395d6a96aaee78abc5c4316e010df1e8c05ceca7 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Wed Nov 19 17:46:01 2014 +0100 cascading conditional operators, give a hint on complexity Change-Id: Ie9d0b07a32cc17705db735ea18f70f28d57badd4 Reviewed-on: https://gerrit.libreoffice.org/12990 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/compilerplugins/clang/store/cascadingcondop.cxx b/compilerplugins/clang/store/cascadingcondop.cxx index f18a93b..722b981 100644 --- a/compilerplugins/clang/store/cascadingcondop.cxx +++ b/compilerplugins/clang/store/cascadingcondop.cxx @@ -14,8 +14,8 @@ /* This is a compile check. -It checks for conditional operators in conditional operators, which are -errorprone, e.g. +It checks for complex statements with conditional operators in conditional +operators, which are errorprone, e.g. Thing foo = IsBar() ? ( IsBaz() ? b1 : b2 ) : b3; However, it finds 556 cases in sw/source alone, thus likely needs some more @@ -24,9 +24,19 @@ a certain length in characters (but that needs the Context/SourceManager, which I havent played with yet). */ +// the value is rather arbitrary, but code above this number of stmts begins to +// be smelly +static const int stmtlimit = 50; + namespace loplugin { +struct WalkCounter +{ +int stmtcount; +bool cascading; +}; + // Ctor, nothing special, pass the argument(s). CascadingCondOp::CascadingCondOp( const InstantiationData data ) : Plugin( data ) @@ -41,20 +51,30 @@ void CascadingCondOp::run() TraverseDecl( compiler.getASTContext().getTranslationUnitDecl()); } -void CascadingCondOp::Walk( const Stmt* stmt ) +void CascadingCondOp::Walk( const Stmt* stmt, WalkCounter c ) { for(Stmt::const_child_iterator it = stmt-child_begin(); it != stmt-child_end(); ++it) { -if ( const ConditionalOperator* condop = dyn_cast ConditionalOperator ( *it )) -report( DiagnosticsEngine::Warning, cascading conditional operator, condop-getLocStart()); -Walk(*it); +++c.stmtcount; +if ( dyn_cast ConditionalOperator ( *it )) +c.cascading = true; +Walk(*it, c); } } bool CascadingCondOp::VisitStmt( const Stmt* stmt ) { if ( const ConditionalOperator* condop = dyn_cast ConditionalOperator ( stmt )) -Walk(condop); +{ +WalkCounter c = { 0, false }; +Walk(condop, c); +if(c.cascading c.stmtcount = stmtlimit) +{ +std::string msg(cascading conditional operator, complexity: ); +msg.append(std::to_string(c.stmtcount)); +report( DiagnosticsEngine::Warning, msg, condop-getLocStart()); +} +} return true; } diff --git a/compilerplugins/clang/store/cascadingcondop.hxx b/compilerplugins/clang/store/cascadingcondop.hxx index e648bdf..8d41177 100644 --- a/compilerplugins/clang/store/cascadingcondop.hxx +++ b/compilerplugins/clang/store/cascadingcondop.hxx @@ -17,6 +17,8 @@ namespace loplugin { +struct WalkCounter; + // The class implementing the plugin action. class CascadingCondOp // Inherits from the Clang class that will allow examing the Clang AST tree (i.e. syntax tree). @@ -27,7 +29,7 @@ class CascadingCondOp public: CascadingCondOp( const InstantiationData data ); virtual void run() override; -void Walk( const Stmt* stmt ); +void Walk( const Stmt* stmt, WalkCounter c ); bool VisitStmt( const Stmt* stmt ); }; diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index 3cc38fa..981b7da 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -358,4 +358,13 @@ SwEditShell* SwDoc::GetEditShell() return GetEditShell(); } +//bool foo() +//{ +//bool b1 = true ? true : false; +//bool b2 = (true ? true : false) ? true : false; +//bool b3 = true ? (true ? true : false) : false; +//bool b4 = true ? true : (true ? true : false); +//return false; +//} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/libreoffice-4.4.0.0.beta1'
Tag 'libreoffice-4.4.0.0.beta1' created by Christian Lohmaier lohmaier+libreoff...@googlemail.com at 2014-11-20 18:13 -0800 Tag libreoffice-4.4.0.0.beta1 -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAABAgAGBQJUbi9UAAoJEPQ0oe+v7q6jZuoP/A/Nrzb9+XyxGpEoAoc8uIQS h8XrKohCxAGwBbT08Z8vaq2/0YVK9IRP8F9bdv2q6NO6IxlqhPdvlkO1kWDuegT3 7x5AHGV7Ge9ub7GIRdS69Wmk9urq31FnLesvBqPSR2hXDQy3qCz22Tp6k3cEBpS1 co306UukbglMRs/M9U2tj9DOOr0Yb/aDFc9cKsBUdqIRrt5K2VeJ9aKSEiUR9Omd Mg2VCwsKLt1KotVyPDuTzPrp36dpMP1aM/teGG0iB98p55KCTKVsdQAenc1wmbo7 Kf4j2MevDGEN70PGIqjQ0WpK0cc3KK9fuR77u9I99XiTR4QCN//v5wjg7dzbVjOE ZeIzV00ENu5zYyah4+CdUXZKXRvmyW09vcHlUuuC95JuspijV6LvsJtEfNE9u87C Lu1gsqjLwMMVCNl2Yw6HK3RxR17OSvVekkGINqYvWwkndQRic6zn4PjtWYru7lsw 2Ax0k5O+bbVcH8GX2qXCvIIG+dyw3wEkXHD2WkFFk1AMotqI6u4wSMGD/eDHz9dJ yQ+gpL3h0BKtCO6kdJZauCvJve/BHRZsYb1Li+RBTCklqOGDClkidE9mrbW0t4oi LRvzfu4zM3CAFJVYwy8ZbDIwm/RKERRRLjly+1y1CcXzPhTAOKdOstpotSfjBKTa F902tK0a340ZtI+6k7Gr =2W9b -END PGP SIGNATURE- Changes since libreoffice-4-3-branch-point-9: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] translations.git: Changes to 'refs/tags/libreoffice-4.4.0.0.beta1'
Tag 'libreoffice-4.4.0.0.beta1' created by Christian Lohmaier lohmaier+libreoff...@googlemail.com at 2014-11-20 18:13 -0800 Tag libreoffice-4.4.0.0.beta1 -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAABAgAGBQJUbi9bAAoJEPQ0oe+v7q6j3eoP/2qddX1WzabSwwFLplsHg/IB O+Hyleq2R3+d69Bp13WLEA2C0c6Kc5hxmNnPTpdmPHI8MC1gMDoWYsuOuZYamalD xfyAyW58YRthds6SNLfh5JDDQrU/Rer5G/b44/oCl6w8E8PAHm3M58JuXjvV2Aiw 9QPAdL2CHvBjn+eEXMpnSp3tjGx9BFzpoNZkgqv1Kjy5pUAxIdQPyxLnMrb03tiY sYNRZjpywX7+s8h7SETQMEDXXaatSDGa5dLiY5SCTnB7797OP0gS49AhBDNWYw75 ac3mOwNFRMFqnNInC/oy5erl5SNJ1YIq6Zm6yIOn7rf60S4/06duISS/B/BWuPmv RoEmYQN8KT+t7VilM2kOu9Kvc2Jl2KocI/zv0czEfo181cni1D1yAA+wf6JgDa0/ D+q2CAmKWSo9VaceT8T9EIL0BJANgsCkSEUgpTIHBeZdwMzn/1vV4ZE/Q60ji1wc 5JFaL/eIOt9kB00xdvnE1kgBPEox8YLDROJmlMTTn9UvwKtRgHGnwJ+bdxw+o9LR 8RB94sXgsLlIJKz5U4ZqDXBtt0vKICwlu0UOY5H0DohCUiY9S2A7+RWJ8aci4QBH TqTQ2LE69eW9lJHsQrb9eG6zfAahueTygO8RU25Zgo7tB6DcIGyS5Ni29q2QxR37 +C2GO9KoA0ML2yu5o7fc =AzgS -END PGP SIGNATURE- Changes since libreoffice-4-3-branch-point-13: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: compilerplugins/clang
compilerplugins/clang/store/cascadingassignop.cxx | 94 ++ compilerplugins/clang/store/cascadingassignop.hxx | 40 + 2 files changed, 134 insertions(+) New commits: commit 6e226f5ed86efe942d5c49112e2115a70203edce Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Wed Nov 19 19:26:11 2014 +0100 also look for cascading assignments Change-Id: I7fa18403698530eec379589c76631f0aa367b215 Reviewed-on: https://gerrit.libreoffice.org/12991 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/compilerplugins/clang/store/cascadingassignop.cxx b/compilerplugins/clang/store/cascadingassignop.cxx new file mode 100644 index 000..0a88b0c --- /dev/null +++ b/compilerplugins/clang/store/cascadingassignop.cxx @@ -0,0 +1,94 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * Based on LLVM/Clang. + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + */ + +#include cascadingassignop.hxx + +/* +This is a compile check. + +It checks for complex statements with conditional operators in conditional +operators, which are errorprone, e.g. + Thing foo = IsBar() ? ( IsBaz() ? b1 : b2 ) : b3; + +However, it finds 556 cases in sw/source alone, thus likely needs some more +restricting, e.g. by checking for multiline conditional operator statements or +a certain length in characters (but that needs the Context/SourceManager, which +I havent played with yet). +*/ + +// the value is rather arbitrary, but code above this number of stmts begins to +// be smelly +static const int stmtlimit = 20; + +namespace loplugin +{ + +struct WalkCounter +{ +int stmtcount; +bool cascading; +bool conditionals; +}; + +// Ctor, nothing special, pass the argument(s). +CascadingAssignOp::CascadingAssignOp( const InstantiationData data ) +: Plugin( data ) +{ +} + +// Perform the actual action. +void CascadingAssignOp::run() +{ +// Traverse the whole AST of the translation unit (i.e. examine the whole source file). +// The Clang AST helper class will call VisitReturnStmt for every return statement. +TraverseDecl( compiler.getASTContext().getTranslationUnitDecl()); +} + +void CascadingAssignOp::Walk( const Stmt* stmt, WalkCounter c ) +{ +for(Stmt::const_child_iterator it = stmt-child_begin(); it != stmt-child_end(); ++it) +{ +++c.stmtcount; +const BinaryOperator* binop = dyn_cast BinaryOperator ( *it ); +if ( binop ) +{ +if ( (binop-isAssignmentOp() || binop-isCompoundAssignmentOp())) +c.cascading = true; +if ( dyn_cast AbstractConditionalOperator ( binop ) || binop-isLogicalOp()) +c.conditionals = true; +} +Walk(*it, c); +} +} + +bool CascadingAssignOp::VisitStmt( const Stmt* stmt ) +{ +const BinaryOperator* binop = dyn_cast BinaryOperator ( stmt ); +if ( binop (binop-isAssignmentOp() || binop-isCompoundAssignmentOp())) +{ +WalkCounter c = { 0, false, false }; +Walk(binop, c); +if(c.cascading c.conditionals c.stmtcount = stmtlimit) +{ +std::string msg(cascading assign operator mixing in conditionals, complexity: ); +msg.append(std::to_string(c.stmtcount)); +report( DiagnosticsEngine::Warning, msg, binop-getLocStart()); +} +} +return true; +} + +// Register the plugin action with the LO plugin handling. +static Plugin::Registration CascadingAssignOp X( cascadingassignop ); + +} // namespace loplugin + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/store/cascadingassignop.hxx b/compilerplugins/clang/store/cascadingassignop.hxx new file mode 100644 index 000..fa776c7 --- /dev/null +++ b/compilerplugins/clang/store/cascadingassignop.hxx @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * Based on LLVM/Clang. + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + */ + +#ifndef CASCADINGCONDOP_H +#define CASCADINGCONDOP_H + +#include plugin.hxx + +namespace loplugin +{ + +struct WalkCounter; + +// The class implementing the plugin action. +class CascadingAssignOp +// Inherits from the Clang class that will allow examing the Clang AST tree (i.e. syntax tree). +: public RecursiveASTVisitor CascadingAssignOp +// And the base class for LO Clang plugins. +, public Plugin +{ +public: +CascadingAssignOp( const InstantiationData data ); +virtual void run() override; +void Walk( const Stmt* stmt, WalkCounter c ); +bool VisitStmt(
[Libreoffice-commits] help.git: Changes to 'refs/tags/libreoffice-4.4.0.0.beta1'
Tag 'libreoffice-4.4.0.0.beta1' created by Christian Lohmaier lohmaier+libreoff...@googlemail.com at 2014-11-20 18:13 -0800 Tag libreoffice-4.4.0.0.beta1 -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAABAgAGBQJUbi9YAAoJEPQ0oe+v7q6jzIgQALXfobcB3JqQONQh+4mnFQYH QBkILpQ4FyPspHEwIva5gc1KpSDbtPX1b82Oa62STa7zrUihPZDTJzsC5y4l6Bqy aT2l0bqFcGn6ZUS2ympmW1VBLdZm63T09owsUGouvZ3Gxl6QwncJR2lBf5PcuqtD fyxsULq7ipTWxtmPdCrPEC+Kkfvi1Rj+On95fNestY1+CDMNTi5PDWEtd/8S7z6s sdKufB4Kckrsh3WaxlNEli6bWAtCvH6iLwE2L5mtBLwZZXxshbA9OjyhJu3y4Vei YJQgYG8A6YMvZZtfTYVmEAnXpkNe6ogZAw1XV2b6jN3ZltR4gDAtL6fyU8aM7zwF bFdX0ygVTXdMJIDpVYsAG/pbSzoqVOK6rIh4xwZTXOP4RWQM7iFJgspdDQUv3f+z gIH1QK5F3BwfCoLTAKbNrYCzd3hp+rGDfkpDMDGmb71EmGnxsYywbSUXTfaj1YuH nJC1YW+sGmbGITjX540wPnRdQM/TWoTXEZ7ZcO7H6HeJ68TwUogPPVmf4Mp9oBKz ndvG5r7L58gEs968iqOSI+LpdPn+oaWJFEnOOzUQenWWFwVyLd3V7nahpI051mrF nxjlAMeMJIUzm9MqhGKmQ4IAIxhwJgA53iraP/yicbws0lAWWP7TnKbxGi5dsYlc rs0amt82q7SDagT0+L8Q =5P7D -END PGP SIGNATURE- Changes since libreoffice-4-3-branch-point-142: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/tags/libreoffice-4.4.0.0.beta1'
Tag 'libreoffice-4.4.0.0.beta1' created by Christian Lohmaier lohmaier+libreoff...@googlemail.com at 2014-11-20 18:13 -0800 Tag libreoffice-4.4.0.0.beta1 -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAABAgAGBQJUbi9eAAoJEPQ0oe+v7q6jAHkQAK/q86Nb3kBPwhTsV0hqF3ws JuCWk+8TmYJ9rGiukVdD6pOIwJFYf4Rx9Q1tC7u9k5zZYhsdpzi3JlsqF26IP+lI 3Ze802L8H/3qiCOkUkPvmIlSykOtoe4ssGqvIGZH5CZ5wSWhhA1j86x/ZMtoZNQh I9DlAs+vP0wRGpeyI0OGChT9dX85j2MDOCC1IfOyc1+K6BvKkN8aQwui8Fle/S6T eZbkhjtqG1EE4h51tbaOb/XAyEIl518NrUBoSSgZtj0xAUREOqJvmhX8pQiEnYiD /1vhRBDQLLyb31a6E8Dhj0U3X0+CLPuhzUgRBWkBPjcLv+/2LDZPYiB+kmaMp/dP EfJug9RQZExYgsfRoplwII/9+MPqgGUHdOpVqfm7qSqpW11OysyPbxo7t0KJTfh2 yZG11AZ8OS8eu4D77iUeUM6kUSkcj9BJzp2Y055nd4uwaRA6jujgQeeMkZHcn8SW vR/zLYxxyRzORv7PorMkPM4x/htaNfCZpqDFkySUTKgydVAxxAvCiJdExOFGv8BQ 2i4tGUQMsL5qKsCeToZTsnDeQK0vA8vz7+tABLYm4yL27j37lw4ku7MBKMdPrfZG crmTd66AwCKtWHokvr9ecK+2aJjJMRX7Wh6mXOSAFhs3q1/PHXBHZTCyGElP4he8 PIDiCX88mIoLvL34S8Yg =i+AG -END PGP SIGNATURE- Changes since libreoffice-4-3-branch-point-11093: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/doc/DocumentContentOperationsManager.cxx | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) New commits: commit b5349435d6d149106a573bf891cf99743392f114 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Wed Nov 19 21:21:23 2014 +0100 refactor assignment out of expression Change-Id: Ief32b521eece3fde1a1de6782443ca6a098dee3d Reviewed-on: https://gerrit.libreoffice.org/12992 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index cd25464..6955cde 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -2032,15 +2032,18 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM rPaM, SwPosition rPos, // where the rPaM is located. // If the Content was moved to the back and the SavePam's SPoint is // in the next Node, we have to deal with this when saving the Undo object! -SwTxtNode * pPamTxtNd = 0; +SwTxtNode * pPamTxtNd = nullptr; // Is passed to SwUndoMove, which happens when subsequently calling Undo JoinNext. // If it's not possible to call Undo JoinNext here. bool bJoin = bSplit pTNd; -bCorrSavePam = bCorrSavePam -0 != ( pPamTxtNd = rPaM.GetNode().GetTxtNode() ) - pPamTxtNd-CanJoinNext() - (*rPaM.GetPoint() = *aSavePam.GetPoint()); +if( bCorrSavePam ) +{ +pPamTxtNd = rPaM.GetNode().GetTxtNode(); +bCorrSavePam = (pPamTxtNd != nullptr) + pPamTxtNd-CanJoinNext() + (*rPaM.GetPoint() = *aSavePam.GetPoint()); +} // Do two Nodes have to be joined at the SavePam? if( bJoin pTNd-CanJoinNext() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/text/widorp.cxx | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) New commits: commit 88f899c7a0a718aba3fb5c0c090a8af85ba72fe2 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Wed Nov 19 22:02:28 2014 +0100 refactor assignment out of complex expression Change-Id: I55ecededc829a6cd1a7bb1aeb2bcae65406e0b2b Reviewed-on: https://gerrit.libreoffice.org/12993 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx index 76fc1c0..a3e2809 100644 --- a/sw/source/core/text/widorp.cxx +++ b/sw/source/core/text/widorp.cxx @@ -60,12 +60,14 @@ SwTxtFrmBreak::SwTxtFrmBreak( SwTxtFrm *pNewFrm, const SwTwips nRst ) SWAP_IF_SWAPPED( pFrm ) SWRECTFN( pFrm ) nOrigin = (pFrm-*fnRect-fnGetPrtTop)(); -SwSectionFrm* pSct; -bKeep = !pFrm-IsMoveable() || IsNastyFollow( pFrm ) || -( pFrm-IsInSct() (pSct=pFrm-FindSctFrm())-Lower()-IsColumnFrm() - !pSct-MoveAllowed( pFrm ) ) || -!pFrm-GetTxtNode()-GetSwAttrSet().GetSplit().GetValue() || -pFrm-GetTxtNode()-GetSwAttrSet().GetKeep().GetValue(); +bKeep = !pFrm-IsMoveable() || IsNastyFollow( pFrm ); +if( !bKeep pFrm-IsInSct() ) +{ +const SwSectionFrm* const pSct = pFrm-FindSctFrm(); +bKeep = pSct-Lower()-IsColumnFrm() !pSct-MoveAllowed( pFrm ); +} +bKeep = bKeep || !pFrm-GetTxtNode()-GetSwAttrSet().GetSplit().GetValue() || +pFrm-GetTxtNode()-GetSwAttrSet().GetKeep().GetValue(); bBreak = false; if( !nRstHeight !pFrm-IsFollow() pFrm-IsInFtn() pFrm-HasPara() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/filter/html/htmlflywriter.cxx |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) New commits: commit 6759ca10dcf5414f02439d0a544ed50433bb477e Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Wed Nov 19 22:12:16 2014 +0100 refactor assignment out of complex expression Change-Id: I20dedb69e562869dba90db15e9902e714680bf03 Reviewed-on: https://gerrit.libreoffice.org/12994 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 65b5fad..92608b6 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -1842,9 +1842,12 @@ void SwHTMLWriter::AddLinkTarget( const OUString rURL ) bFound = true; break; case '%': -bFound = (rURL.getLength() - nPos) =3 - rURL[ nPos+1 ] == '7' - ((c =rURL[ nPos+2 ]) == 'C' || c == 'c'); +bFound = (rURL.getLength() - nPos) =3 rURL[ nPos+1 ] == '7'; +if(bFound) +{ +c = rURL[ nPos+2 ]; +bFound = (c == 'C' || c == 'c'); +} if( bFound ) bEncoded = true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/access/accfrmobjmap.hxx | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) New commits: commit 833936eb526fed3de821247e42198e068c962607 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Wed Nov 19 22:50:38 2014 +0100 expand complex cascading conditional operator Change-Id: I316cd743070261249eef42872ee2b0a05f930b7e Reviewed-on: https://gerrit.libreoffice.org/12995 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx index ac23315..bedd811 100644 --- a/sw/source/core/access/accfrmobjmap.hxx +++ b/sw/source/core/access/accfrmobjmap.hxx @@ -56,11 +56,20 @@ public: bool operator()( const SwAccessibleChildMapKey r1, const SwAccessibleChildMapKey r2 ) const { -return (r1.eLayerId == r2.eLayerId) ? - ( (r1.nPosNum == r2.nPosNum) ?(r1.nOrdNum r2.nOrdNum) : - (r1.nPosNum.getY() == r2.nPosNum.getY()? r1.nPosNum.getX() r2.nPosNum.getX() : -r1.nPosNum.getY() r2.nPosNum.getY()) ) : - (r1.eLayerId r2.eLayerId); +if(r1.eLayerId == r2.eLayerId) +{ +if(r1.nPosNum == r2.nPosNum) +return r1.nOrdNum r2.nOrdNum; +else +{ +if(r1.nPosNum.getY() == r2.nPosNum.getY()) +return r1.nPosNum.getX() r2.nPosNum.getX(); +else +return r1.nPosNum.getY() r2.nPosNum.getY(); +} +} +else +return r1.eLayerId r2.eLayerId; } /* MT: Need to get this position parameter stuff in dev300 somehow... ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/layout/flycnt.cxx | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) New commits: commit 0c5cbcd776f3f71226ea59d7d8e5d2c20f3c5c00 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 00:02:44 2014 +0100 simplify Change-Id: Ib7bfe8d479ab4f0445f5a95b3108b48531f70101 Reviewed-on: https://gerrit.libreoffice.org/12997 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index f09b010..b23b6190 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1202,30 +1202,15 @@ void SwFlyAtCntFrm::SetAbsPos( const Point rNew ) if ( pCnt-Frm().IsInside( aNew ) ) { // #i70582# -SwTwips nTopForObjPos; if ( bVert ) { -nTopForObjPos = pCnt-Frm().Left(); +nY = pCnt-Frm().Left() - rNew.X(); if ( bVertL2R ) -nTopForObjPos += pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); -else -nTopForObjPos += pCnt-Frm().Width() - pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +nY = -nY; +nY -= pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); } else -{ -nTopForObjPos = pCnt-Frm().Top() + pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); -} -if( bVert ) -{ -if ( bVertL2R ) -nY = rNew.X() - nTopForObjPos; -else -nY = nTopForObjPos - rNew.X() - Frm().Width(); -} -else -{ -nY = rNew.Y() - nTopForObjPos; -} +nY = rNew.Y() - pCnt-Frm().Top() + pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/layout/flycnt.cxx | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) New commits: commit 99099bb59a19a8367cb9c7c68470a31b09089144 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Wed Nov 19 23:47:35 2014 +0100 expand complex cascading conditional operator Change-Id: I290797eba555617e39ced5ba8e6c209fd6d0780f Reviewed-on: https://gerrit.libreoffice.org/12996 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 4aae102..f09b010 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1202,16 +1202,19 @@ void SwFlyAtCntFrm::SetAbsPos( const Point rNew ) if ( pCnt-Frm().IsInside( aNew ) ) { // #i70582# -const SwTwips nTopForObjPos = -bVert -? ( bVertL2R -? ( pCnt-Frm().Left() + - pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) -: ( pCnt-Frm().Left() + -pCnt-Frm().Width() - - pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) ) -: ( pCnt-Frm().Top() + -pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ); +SwTwips nTopForObjPos; +if ( bVert ) +{ +nTopForObjPos = pCnt-Frm().Left(); +if ( bVertL2R ) +nTopForObjPos += pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +else +nTopForObjPos += pCnt-Frm().Width() - pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +} +else +{ +nTopForObjPos = pCnt-Frm().Top() + pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +} if( bVert ) { if ( bVertL2R ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/layout/flycnt.cxx | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) New commits: commit be049d3d2e84b99c7c62fd5931fa69b3827bb6d2 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 00:09:40 2014 +0100 expand complex cascading conditional operator Change-Id: I5702b1acd214d7ef862d72fa1a0a0dc8a09c351e Reviewed-on: https://gerrit.libreoffice.org/12998 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index b23b6190..68d3e58 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -562,16 +562,17 @@ static const SwFrm * lcl_CalcDownDist( SwDistance rRet, //Follow the text flow. // #i70582# // -- OD 2009-03-05 - adopted for Support for Classical Mongolian Script -const SwTwips nTopForObjPos = -bVert -? ( bVertL2R -? ( pCnt-Frm().Left() + -pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) -: ( pCnt-Frm().Left() + -pCnt-Frm().Width() - -pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) ) -: ( pCnt-Frm().Top() + -pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ); +SwTwips nTopForObjPos; +if ( bVert ) +{ +nTopForObjPos = pCnt-Frm().Left(); +if ( bVertL2R ) +nTopForObjPos += pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +else +nTopForObjPos += pCnt-Frm().Width() - pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +} +else +nTopForObjPos = pCnt-Frm().Top() + pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); if ( pUp-Frm().IsInside( rPt ) ) { // rPt point is inside environment of given content frame ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/core/layout/flycnt.cxx | 47 +++ 1 file changed, 24 insertions(+), 23 deletions(-) New commits: commit 36a7bf728d3b68e371b74a15b86ef1ba9cbba83f Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 00:25:49 2014 +0100 refactor into a local function Change-Id: Id0ba44466216a5fababb7afe891c032aaafe9fee Reviewed-on: https://gerrit.libreoffice.org/13000 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 425967a..1c2cd21 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -46,6 +46,26 @@ using namespace ::com::sun::star; +namespace +{ + +static inline SwTwips lcl_GetTopForObjPos(const SwCntntFrm* pCnt, const bool bVert, const bool bVertL2R) +{ +if ( bVert ) +{ +SwTwips aResult = pCnt-Frm().Left(); +if ( bVertL2R ) +aResult += pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +else +aResult += pCnt-Frm().Width() - pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +return aResult; +} +else +return pCnt-Frm().Top() + pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +} + +} + SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : SwFlyFreeFrm( pFmt, pSib, pAnch ) { @@ -562,17 +582,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance rRet, //Follow the text flow. // #i70582# // -- OD 2009-03-05 - adopted for Support for Classical Mongolian Script -SwTwips nTopForObjPos; -if ( bVert ) -{ -nTopForObjPos = pCnt-Frm().Left(); -if ( bVertL2R ) -nTopForObjPos += pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); -else -nTopForObjPos += pCnt-Frm().Width() - pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); -} -else -nTopForObjPos = pCnt-Frm().Top() + pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); +const SwTwips nTopForObjPos = lcl_GetTopForObjPos(pCnt, bVert, bVertL2R); if ( pUp-Frm().IsInside( rPt ) ) { // rPt point is inside environment of given content frame @@ -1260,16 +1270,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point rNew ) if ( nY == LONG_MAX ) { // #i70582# -const SwTwips nTopForObjPos = -bVert -? ( bVertL2R -? ( pCnt-Frm().Left() + - pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) -: ( pCnt-Frm().Left() + -pCnt-Frm().Width() - - pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) ) -: ( pCnt-Frm().Top() + -pCnt-GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ); +const SwTwips nTopForObjPos = lcl_GetTopForObjPos(pCnt, bVert, bVertL2R); if( bVert ) { if ( bVertL2R ) commit b18adcfd672d9bf7ad412715fbe4c76b998445c2 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 00:13:28 2014 +0100 fix mismerged indent Change-Id: Ia1f2c822601ac41274b2b3d5a16778c7df472230 Reviewed-on: https://gerrit.libreoffice.org/12999 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 68d3e58..425967a 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -579,7 +579,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance rRet, // #i70582# if( bVert ) { - if ( bVertL2R ) +if ( bVertL2R ) rRet.nMain = rPt.X() - nTopForObjPos; else rRet.nMain = nTopForObjPos - rPt.X(); @@ -608,7 +608,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance rRet, // #i70582# if( bVert ) { - if ( bVertL2R ) +if ( bVertL2R ) rRet.nMain = rPt.X() - nTopForObjPos; else rRet.nMain = nTopForObjPos - rPt.X(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/core/text/frmcrsr.cxx | 14 ++ sw/source/core/txtnode/thints.cxx | 21 + 2 files changed, 23 insertions(+), 12 deletions(-) New commits: commit 2d78288637281f17862c3d155430629025c3afd5 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 01:01:44 2014 +0100 expand complex cascading conditional operator Change-Id: Ide0224156e8246768c62d69f0cfa864068f0d1ed Reviewed-on: https://gerrit.libreoffice.org/13002 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 5ec497a..7cab8d8 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -3405,15 +3405,20 @@ sal_uInt16 SwTxtNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, const sal_Int32 *pEndIdx = pHt-End(); // Ueberlappt das Attribut den Bereich? -if (!pEndIdx) +if( !pEndIdx ) continue; - -if( nLen ? ( nAttrStart nEnd nBegin *pEndIdx ) - : (( nAttrStart nBegin -( pHt-DontExpand() ? nBegin *pEndIdx -: nBegin = *pEndIdx )) || -( nBegin == nAttrStart -( nAttrStart == *pEndIdx || !nBegin ))) ) +if( nLen ) +{ +if( nAttrStart = nEnd || nBegin = *pEndIdx ) +continue; +} +else if( nBegin != nAttrStart || ( nAttrStart != *pEndIdx nBegin )) +{ +if( nAttrStart = nBegin ) +continue; +if( pHt-DontExpand() ? nBegin = *pEndIdx : nBegin *pEndIdx) +continue; +} { const SfxPoolItem* pItem = CharFmt::GetItem( *pHt, nWhichId ); const sal_uInt16 nLng = ((SvxLanguageItem*)pItem)-GetLanguage(); commit 907366ac2063e73aa6018a9e938dd079e858c648 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 00:36:01 2014 +0100 expand complex cascading conditional operator Change-Id: Ia139d06e04e04871373b9413a4f6386e87738df5 Reviewed-on: https://gerrit.libreoffice.org/13001 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index b18d2bf..445720f 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -368,10 +368,16 @@ bool SwTxtFrm::GetAutoPos( SwRect rOrig, const SwPosition rPos ) const SwTwips nUpperMaxY = (pTmpFrm-*fnRect-fnGetPrtBottom)(); // nMaxY is in absolute value -SwTwips nMaxY = bVert ? -( bVertL2R ? std::min( (pFrm-*fnRect-fnGetPrtBottom)(), nUpperMaxY ) : std::max( (pFrm-*fnRect-fnGetPrtBottom)(), nUpperMaxY ) ) : -std::min( (pFrm-*fnRect-fnGetPrtBottom)(), nUpperMaxY ); - +SwTwips nMaxY; +if ( bVert ) +{ +if ( bVertL2R ) +nMaxY = std::min( (pFrm-*fnRect-fnGetPrtBottom)(), nUpperMaxY ); +else +nMaxY = std::max( (pFrm-*fnRect-fnGetPrtBottom)(), nUpperMaxY ); +} +else +nMaxY = std::min( (pFrm-*fnRect-fnGetPrtBottom)(), nUpperMaxY ); if ( pFrm-IsEmpty() || ! (pFrm-Prt().*fnRect-fnGetHeight)() ) { Point aPnt1 = pFrm-Frm().Pos() + pFrm-Prt().Pos(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/txtnode/thints.cxx | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) New commits: commit e757bccfabf3bd00afd0eecb0ddcb656c7217904 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 01:09:59 2014 +0100 simplify after expand Change-Id: Ibcb863b32e5dfb6a2cba9db418c8e8d489e9577f Reviewed-on: https://gerrit.libreoffice.org/13003 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 7cab8d8..095b20d 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -3419,16 +3419,14 @@ sal_uInt16 SwTxtNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, if( pHt-DontExpand() ? nBegin = *pEndIdx : nBegin *pEndIdx) continue; } -{ -const SfxPoolItem* pItem = CharFmt::GetItem( *pHt, nWhichId ); -const sal_uInt16 nLng = ((SvxLanguageItem*)pItem)-GetLanguage(); - -// Umfasst das Attribut den Bereich komplett? -if( nAttrStart = nBegin nEnd = *pEndIdx ) -nRet = nLng; -else if( LANGUAGE_DONTKNOW == nRet ) -nRet = nLng; // partielle Ueberlappung, der 1. gewinnt -} +const SfxPoolItem* pItem = CharFmt::GetItem( *pHt, nWhichId ); +const sal_uInt16 nLng = ((SvxLanguageItem*)pItem)-GetLanguage(); + +// Umfasst das Attribut den Bereich komplett? +if( nAttrStart = nBegin nEnd = *pEndIdx ) +nRet = nLng; +else if( LANGUAGE_DONTKNOW == nRet ) +nRet = nLng; // partielle Ueberlappung, der 1. gewinnt } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/unocore/unostyle.cxx | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) New commits: commit 15298a55fbde6352f260b919c0e600737e01d4a7 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 01:23:10 2014 +0100 expand complex cascading conditional operator Change-Id: Iad995dcd6f1a65a623e7a1bfac8038ce568d40c0 Reviewed-on: https://gerrit.libreoffice.org/13005 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 57ab928..a66533c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -700,11 +700,17 @@ uno::Any SwXStyleFamily::getByIndex(sal_Int32 nTempIndex) uno::Reference style::XStyle xStyle = _FindStyle(sStyleName); if(!xStyle.is()) { -xStyle = eFamily == SFX_STYLE_FAMILY_PAGE ? -new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName) : -eFamily == SFX_STYLE_FAMILY_FRAME ? -new SwXFrameStyle(*pBasePool, pDocShell-GetDoc(), pBase-GetName()): -new SwXStyle(*pBasePool, eFamily, pDocShell-GetDoc(), sStyleName); +switch(eFamily) +{ +case SFX_STYLE_FAMILY_PAGE: +xStyle = new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName); +break; +case SFX_STYLE_FAMILY_FRAME: +xStyle = new SwXFrameStyle(*pBasePool, pDocShell-GetDoc(), pBase-GetName()); +break; +default: +xStyle = new SwXStyle(*pBasePool, eFamily, pDocShell-GetDoc(), sStyleName); +} } aRet.setValue(xStyle, cppu::UnoTypestyle::XStyle::get()); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/unocore/unosect.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 1a27475accffed4134f884f86c28d17110e0b8fd Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 01:16:33 2014 +0100 expand complex cascading conditional operator Change-Id: Ife2f8bd92bbcca8daba510ca021d99bf7ee86af9 Reviewed-on: https://gerrit.libreoffice.org/13004 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 2ebca72..396b50a 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -301,11 +301,11 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) { m_pImpl-m_sName = TextSection; } -SectionType eType = (m_pImpl-m_pProps-m_bDDE) -? DDE_LINK_SECTION -: ((!m_pImpl-m_pProps-m_sLinkFileName.isEmpty() || -!m_pImpl-m_pProps-m_sSectionRegion.isEmpty()) -? FILE_LINK_SECTION : CONTENT_SECTION); +SectionType eType(FILE_LINK_SECTION); +if( m_pImpl-m_pProps-m_bDDE ) +eType = DDE_LINK_SECTION; +else if( m_pImpl-m_pProps-m_sLinkFileName.isEmpty() m_pImpl-m_pProps-m_sSectionRegion.isEmpty() ) +eType = CONTENT_SECTION; // index header section? if (m_pImpl-m_bIndexHeader) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/unocore/unostyle.cxx | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) New commits: commit 1e92234dd3726536410678b58b8195095922e9c0 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 01:25:56 2014 +0100 expand complex cascading conditional operator Change-Id: I3546589bbfaf1f19a9e283bc33a4a9e65e516dbc Reviewed-on: https://gerrit.libreoffice.org/13006 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index a66533c..c2b0982 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -745,11 +745,17 @@ uno::Any SwXStyleFamily::getByName(const OUString rName) uno::Reference style::XStyle xStyle = _FindStyle(sStyleName); if(!xStyle.is()) { -xStyle = eFamily == SFX_STYLE_FAMILY_PAGE ? -new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName) : -eFamily == SFX_STYLE_FAMILY_FRAME ? -new SwXFrameStyle(*pBasePool, pDocShell-GetDoc(), pBase-GetName()): -new SwXStyle(*pBasePool, eFamily, pDocShell-GetDoc(), sStyleName); +switch(eFamily) +{ +case SFX_STYLE_FAMILY_PAGE: +xStyle = new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName); +break; +case SFX_STYLE_FAMILY_FRAME: +xStyle = new SwXFrameStyle(*pBasePool, pDocShell-GetDoc(), pBase-GetName()): +break; +default: +new SwXStyle(*pBasePool, eFamily, pDocShell-GetDoc(), sStyleName); +} } aRet.setValue(xStyle, cppu::UnoTypestyle::XStyle::get()); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/core/doc/DocumentContentOperationsManager.cxx | 17 +--- sw/source/core/unocore/unostyle.cxx |4 +-- sw/source/filter/ww8/wrtw8sty.cxx |7 -- 3 files changed, 17 insertions(+), 11 deletions(-) New commits: commit 6c015afd0c9d1b9c64a127ceab24a37969699239 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 17:10:45 2014 +0100 expand complex cascading conditional operator, step 1 Change-Id: I7d33d587b94877dac2ca1e9f4bb90baba3aea6ac Reviewed-on: https://gerrit.libreoffice.org/13008 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 6955cde..9d93f36 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -3202,17 +3202,20 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( SwFmtAnchor const*const pAnchor = pFmt-GetAnchor(); SwPosition const*const pAPos = pAnchor-GetCntntAnchor(); bool bAtCntnt = (pAnchor-GetAnchorId() == FLY_AT_PARA); -if ( pAPos - ( bAtCntnt || - (pAnchor-GetAnchorId() == FLY_AT_FLY) || - (pAnchor-GetAnchorId() == FLY_AT_CHAR)) - (( bCopyFlyAtFly FLY_AT_FLY == pAnchor-GetAnchorId() ) +if ( !pAPos ) +continue; +if ( !bAtCntnt + pAnchor-GetAnchorId() != FLY_AT_FLY + pAnchor-GetAnchorId() != FLY_AT_CHAR) +continue; +if (( bCopyFlyAtFly FLY_AT_FLY == pAnchor-GetAnchorId() ) ? rRg.aStart = pAPos-nNode.GetIndex() + 1 : ( m_rDoc.getIDocumentRedlineAccess().IsRedlineMove() ? rRg.aStart pAPos-nNode -: rRg.aStart = pAPos-nNode )) - pAPos-nNode = rRg.aEnd ) +: rRg.aStart = pAPos-nNode )) { +if ( pAPos-nNode rRg.aEnd ) +continue; //frames at the last source node are not always copied: //- if the node is empty and is the last node of the document or a table cell // or a text frame then tey have to be copied commit e7f58e05ee2726f3b3f7af6ab255c613ccd47200 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 01:40:24 2014 +0100 expand complex cascading conditional operator Change-Id: I8e489db0dbbd1bb420a3fa477232a86d2cd10b62 Reviewed-on: https://gerrit.libreoffice.org/13007 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index c2b0982..4dbb903 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -751,10 +751,10 @@ uno::Any SwXStyleFamily::getByName(const OUString rName) xStyle = new SwXPageStyle(*pBasePool, pDocShell, eFamily, sStyleName); break; case SFX_STYLE_FAMILY_FRAME: -xStyle = new SwXFrameStyle(*pBasePool, pDocShell-GetDoc(), pBase-GetName()): +xStyle = new SwXFrameStyle(*pBasePool, pDocShell-GetDoc(), pBase-GetName()); break; default: -new SwXStyle(*pBasePool, eFamily, pDocShell-GetDoc(), sStyleName); +xStyle = new SwXStyle(*pBasePool, eFamily, pDocShell-GetDoc(), sStyleName); } } aRet.setValue(xStyle, cppu::UnoTypestyle::XStyle::get()); diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 4890157..7593e99 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -313,8 +313,11 @@ void MSWordStyles::BuildStyleIds() for (sal_uInt16 n = 1; n nUsedSlots; ++n) { -const OUString aName(pFmtA[n]? pFmtA[n]-GetName(): (m_aNumRules.find(n) != m_aNumRules.end() ? m_aNumRules[n]-GetName() : OUString())); - +OUString aName; +if(pFmtA[n]) +aName = pFmtA[n]-GetName(); +else if (m_aNumRules.find(n) != m_aNumRules.end()) +aName = m_aNumRules[n]-GetName(); OStringBuffer aStyleIdBuf(aName.getLength()); for (int i = 0; i aName.getLength(); ++i) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/doc/DocumentContentOperationsManager.cxx | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit 59554f0405c5146b3cf8faad76771c31bd46fbf7 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 18:18:37 2014 +0100 expand complex cascading conditional operator, step 4 Change-Id: Iaef321f8f9afe436a77a15cb48b5b93003374b47 Reviewed-on: https://gerrit.libreoffice.org/13011 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index b2c9a82..2539bf7 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -3204,10 +3204,15 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( bool bAtCntnt = (pAnchor-GetAnchorId() == FLY_AT_PARA); if ( !pAPos ) continue; -if ( !bAtCntnt - pAnchor-GetAnchorId() != FLY_AT_FLY - pAnchor-GetAnchorId() != FLY_AT_CHAR) -continue; +switch ( pAnchor-GetAnchorId() ) +{ +case FLY_AT_FLY: +case FLY_AT_CHAR: +case FLY_AT_PARA: +break; +default: +continue; +} if ( bCopyFlyAtFly FLY_AT_FLY == pAnchor-GetAnchorId() ) { if( rRg.aStart pAPos-nNode.GetIndex() + 1 ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/doc/DocumentContentOperationsManager.cxx | 17 +++- 1 file changed, 12 insertions(+), 5 deletions(-) New commits: commit 096e33368064b05ad16282fbb27db6f46565ee5f Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 17:22:26 2014 +0100 expand complex cascading conditional operator, step 2 Change-Id: Id87035ac3d673cd9fd3f28ff1ef1325f421d10b6 Reviewed-on: https://gerrit.libreoffice.org/13009 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 9d93f36..b2c9a82 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -3208,11 +3208,18 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( pAnchor-GetAnchorId() != FLY_AT_FLY pAnchor-GetAnchorId() != FLY_AT_CHAR) continue; -if (( bCopyFlyAtFly FLY_AT_FLY == pAnchor-GetAnchorId() ) -? rRg.aStart = pAPos-nNode.GetIndex() + 1 -: ( m_rDoc.getIDocumentRedlineAccess().IsRedlineMove() -? rRg.aStart pAPos-nNode -: rRg.aStart = pAPos-nNode )) +if ( bCopyFlyAtFly FLY_AT_FLY == pAnchor-GetAnchorId() ) +{ +if( rRg.aStart pAPos-nNode.GetIndex() + 1 ) +continue; +} +else +{ +if ( m_rDoc.getIDocumentRedlineAccess().IsRedlineMove() +? rRg.aStart = pAPos-nNode +: rRg.aStart pAPos-nNode ) +continue; +} { if ( pAPos-nNode rRg.aEnd ) continue; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/doc/DocumentContentOperationsManager.cxx | 82 +++- 1 file changed, 40 insertions(+), 42 deletions(-) New commits: commit 935848ec927a23772d078b82dc3d169e4fd763d0 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 17:24:13 2014 +0100 expand complex cascading conditional operator, step 3 Change-Id: I0bfa2d09b2f3048ada2518868bcee32689ecb6ca Reviewed-on: https://gerrit.libreoffice.org/13010 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 2539bf7..6e10d06 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -3225,60 +3225,58 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( : rRg.aStart pAPos-nNode ) continue; } +if ( pAPos-nNode rRg.aEnd ) +continue; +//frames at the last source node are not always copied: +//- if the node is empty and is the last node of the document or a table cell +// or a text frame then tey have to be copied +//- if the content index in this node is 0 then paragph and frame bound objects are copied +//- to-character bound objects are copied if their index is = nEndContentIndex +bool bAdd = false; +if( pAPos-nNode rRg.aEnd ) +bAdd = true; +if (!bAdd !m_rDoc.getIDocumentRedlineAccess().IsRedlineMove()) // fdo#40599: not for redline move { -if ( pAPos-nNode rRg.aEnd ) -continue; -//frames at the last source node are not always copied: -//- if the node is empty and is the last node of the document or a table cell -// or a text frame then tey have to be copied -//- if the content index in this node is 0 then paragph and frame bound objects are copied -//- to-character bound objects are copied if their index is = nEndContentIndex -bool bAdd = false; -if( pAPos-nNode rRg.aEnd ) -bAdd = true; -if (!bAdd !m_rDoc.getIDocumentRedlineAccess().IsRedlineMove()) // fdo#40599: not for redline move +bool bEmptyNode = false; +bool bLastNode = false; +// is the node empty? +const SwNodes rNodes = pAPos-nNode.GetNodes(); +SwTxtNode* pTxtNode; +if( 0 != ( pTxtNode = pAPos-nNode.GetNode().GetTxtNode() )) { -bool bEmptyNode = false; -bool bLastNode = false; -// is the node empty? -const SwNodes rNodes = pAPos-nNode.GetNodes(); -SwTxtNode* pTxtNode; -if( 0 != ( pTxtNode = pAPos-nNode.GetNode().GetTxtNode() )) +bEmptyNode = pTxtNode-GetTxt().isEmpty(); +if( bEmptyNode ) { -bEmptyNode = pTxtNode-GetTxt().isEmpty(); -if( bEmptyNode ) +//last node information is only necessary to know for the last TextNode +SwNodeIndex aTmp( pAPos-nNode ); +++aTmp;//goto next node +while (aTmp.GetNode().IsEndNode()) { -//last node information is only necessary to know for the last TextNode -SwNodeIndex aTmp( pAPos-nNode ); -++aTmp;//goto next node -while (aTmp.GetNode().IsEndNode()) +if( aTmp == rNodes.GetEndOfContent().GetIndex() ) { -if( aTmp == rNodes.GetEndOfContent().GetIndex() ) -{ -bLastNode = true; -break; -} -++aTmp; +bLastNode = true; +break; } +++aTmp; } } -bAdd = bLastNode bEmptyNode; -if( !bAdd ) -{ -if( bAtCntnt ) -bAdd = nEndContentIndex 0; -else -bAdd = pAPos-nContent = nEndContentIndex; -} } -if( bAdd ) +bAdd = bLastNode bEmptyNode; +if( !bAdd ) { -// Make sure draw formats don't refer to content, so that such -// content can be removed without problems. -SwTextBoxHelper::resetLink(pFmt, aOldContent); -aSet.insert( _ZSortFly( pFmt,
[Libreoffice-commits] core.git: sw/source
sw/source/core/doc/DocumentContentOperationsManager.cxx | 22 ++-- 1 file changed, 9 insertions(+), 13 deletions(-) New commits: commit 3fcb0c3aa8d58a819aa21eb9743eaa6da7394819 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Thu Nov 20 19:03:43 2014 +0100 expand complex cascading conditional operator, step 5 Change-Id: Ia96f59911f20e4baf342a512a010c84e91b1f21d Reviewed-on: https://gerrit.libreoffice.org/13012 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 6e10d06..7fa56d1 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -3182,7 +3182,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( const SwNodeRange rRg, const sal_Int32 nEndContentIndex, const SwNodeIndex rStartIdx, -const bool bCopyFlyAtFly, +bool bCopyFlyAtFly, const bool bMergedFirstNode ) const { // First collect all Flys, sort them according to their ordering number, @@ -3207,24 +3207,20 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( switch ( pAnchor-GetAnchorId() ) { case FLY_AT_FLY: +if( bCopyFlyAtFly rRg.aStart pAPos-nNode.GetIndex() + 1 ) +continue; +break; case FLY_AT_CHAR: case FLY_AT_PARA: -break; +bCopyFlyAtFly = false; +break; default: continue; } -if ( bCopyFlyAtFly FLY_AT_FLY == pAnchor-GetAnchorId() ) -{ -if( rRg.aStart pAPos-nNode.GetIndex() + 1 ) -continue; -} -else -{ -if ( m_rDoc.getIDocumentRedlineAccess().IsRedlineMove() +if ( !bCopyFlyAtFly ( m_rDoc.getIDocumentRedlineAccess().IsRedlineMove() ? rRg.aStart = pAPos-nNode -: rRg.aStart pAPos-nNode ) -continue; -} +: rRg.aStart pAPos-nNode )) +continue; if ( pAPos-nNode rRg.aEnd ) continue; //frames at the last source node are not always copied: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Bug 75025] LibreOffice 4.3 most annoying bugs
https://bugs.freedesktop.org/show_bug.cgi?id=75025 Timur gti...@gmail.com changed: What|Removed |Added Depends on||61410 --- Comment #80 from Timur gti...@gmail.com --- I add again Bug 61410 - Save ODT as DOC or DOCX turns on Show Changes when Record Changes also on here. Not a damage, but it can confuse. -- You are receiving this mail because: You are on the CC list for the bug. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sc/source
sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx | 20 - sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc | 59 + sc/source/ui/StatisticsDialogs/StatisticsDialogs.src | 21 ++ 3 files changed, 67 insertions(+), 33 deletions(-) New commits: commit 77685ab68e5892cc72ba1c7283fb6658d2516cd0 Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Thu Nov 20 20:40:00 2014 +0100 Add string for transl. and Test statistic for Chi-Square Test Change-Id: I711c70a56021dfbba867e38a32331e662a6bb9d4 diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx index f4d092a..1e6483d 100644 --- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx @@ -35,7 +35,7 @@ ScChiSquareTestDialog::ScChiSquareTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, ChiSquareTestDialog, modules/scalc/ui/chisquaretestdialog.ui ) { -SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST)); +SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CHI_SQUARE_TEST)); } ScChiSquareTestDialog::~ScChiSquareTestDialog() @@ -48,7 +48,7 @@ bool ScChiSquareTestDialog::Close() sal_Int16 ScChiSquareTestDialog::GetUndoNameId() { -return STR_ZTEST_UNDO_NAME; +return STR_CHI_SQUARE_TEST; } ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) @@ -59,7 +59,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange(%RANGE%, mInputRange); -aOutput.writeBoldString(Independence Test (Chi-Square)); +aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CHI_SQUARE_TEST)); aOutput.newLine(); // Alpha @@ -70,7 +70,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // DF -aOutput.writeString(df); +aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_DEGREES_OF_FREEDOM_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate(=(COLUMNS(%RANGE%) - 1) * (ROWS(%RANGE%) - 1)); aTemplate.autoReplaceAddress(%DEGREES_OF_FREEDOM%, aOutput.current()); @@ -78,14 +78,22 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // p Value -aOutput.writeString(P-Value); +aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_P_VALUE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate(=CHITEST(%RANGE%; MMULT(MMULT(%RANGE%;TRANSPOSE(IF(COLUMN(%RANGE%;MMULT(TRANSPOSE(IF(ROW(%RANGE%)));%RANGE%)) / SUM(%RANGE%))); +aTemplate.autoReplaceAddress(%P_VALUE%, aOutput.current()); +aOutput.writeFormula(aTemplate.getTemplate()); +aOutput.newLine(); + +// Test Statistic +aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TEST_STATISTIC_LABEL)); +aOutput.nextColumn(); +aTemplate.setTemplate(=CHIINV(%P_VALUE%; %DEGREES_OF_FREEDOM%)); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // Critical value -aOutput.writeString(Critical Value); +aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CRITICAL_VALUE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate(=CHIINV(%ALPHA%; %DEGREES_OF_FREEDOM%)); aOutput.writeFormula(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc index c4fdd4c..662dc6d 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc +++ b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc @@ -61,6 +61,7 @@ #define STR_FTEST_UNDO_NAME 69 #define STR_ZTEST 70 #define STR_ZTEST_UNDO_NAME 71 +#define STR_CHI_SQUARE_TEST 72 #define STR_COLUMN_LABEL_TEMPLATE 100 #define STR_ROW_LABEL_TEMPLATE 101 @@ -79,35 +80,39 @@ #define STR_ANOVA_LABEL_TOTAL 121 #define STR_ANOVA_TWO_FACTOR_LABEL 122 -#define STR_CORRELATION_LABEL 130 -#define STR_COVARIANCE_LABEL 131 -#define STR_LABEL_ALPHA132 -#define STR_VARIABLE_1_LABEL 133 -#define STR_VARIABLE_2_LABEL 134 -#define STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL 135 -#define STR_OBSERVATIONS_LABEL 136 -#define STR_OBSERVED_MEAN_DIFFERENCE_LABEL 137 +#define STR_CORRELATION_LABEL 140 +#define STR_COVARIANCE_LABEL141 +#define STR_LABEL_ALPHA 142 +#define STR_VARIABLE_1_LABEL143 +#define STR_VARIABLE_2_LABEL144 +#define STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL 145 +#define STR_OBSERVATIONS_LABEL 146 +#define
[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/source
sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx | 20 - sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc | 59 + sc/source/ui/StatisticsDialogs/StatisticsDialogs.src | 21 ++ 3 files changed, 67 insertions(+), 33 deletions(-) New commits: commit b92275b450efdb411c9aee7150e9adaeb452975b Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Thu Nov 20 20:40:00 2014 +0100 Add string for transl. and Test statistic for Chi-Square Test Change-Id: I711c70a56021dfbba867e38a32331e662a6bb9d4 diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx index f4d092a..1e6483d 100644 --- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx @@ -35,7 +35,7 @@ ScChiSquareTestDialog::ScChiSquareTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, ChiSquareTestDialog, modules/scalc/ui/chisquaretestdialog.ui ) { -SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ZTEST)); +SetText(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CHI_SQUARE_TEST)); } ScChiSquareTestDialog::~ScChiSquareTestDialog() @@ -48,7 +48,7 @@ bool ScChiSquareTestDialog::Close() sal_Int16 ScChiSquareTestDialog::GetUndoNameId() { -return STR_ZTEST_UNDO_NAME; +return STR_CHI_SQUARE_TEST; } ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) @@ -59,7 +59,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange(%RANGE%, mInputRange); -aOutput.writeBoldString(Independence Test (Chi-Square)); +aOutput.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CHI_SQUARE_TEST)); aOutput.newLine(); // Alpha @@ -70,7 +70,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // DF -aOutput.writeString(df); +aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_DEGREES_OF_FREEDOM_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate(=(COLUMNS(%RANGE%) - 1) * (ROWS(%RANGE%) - 1)); aTemplate.autoReplaceAddress(%DEGREES_OF_FREEDOM%, aOutput.current()); @@ -78,14 +78,22 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // p Value -aOutput.writeString(P-Value); +aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_P_VALUE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate(=CHITEST(%RANGE%; MMULT(MMULT(%RANGE%;TRANSPOSE(IF(COLUMN(%RANGE%;MMULT(TRANSPOSE(IF(ROW(%RANGE%)));%RANGE%)) / SUM(%RANGE%))); +aTemplate.autoReplaceAddress(%P_VALUE%, aOutput.current()); +aOutput.writeFormula(aTemplate.getTemplate()); +aOutput.newLine(); + +// Test Statistic +aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_TEST_STATISTIC_LABEL)); +aOutput.nextColumn(); +aTemplate.setTemplate(=CHIINV(%P_VALUE%; %DEGREES_OF_FREEDOM%)); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // Critical value -aOutput.writeString(Critical Value); +aOutput.writeString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_CRITICAL_VALUE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate(=CHIINV(%ALPHA%; %DEGREES_OF_FREEDOM%)); aOutput.writeFormula(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc index c4fdd4c..662dc6d 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc +++ b/sc/source/ui/StatisticsDialogs/StatisticsDialogs.hrc @@ -61,6 +61,7 @@ #define STR_FTEST_UNDO_NAME 69 #define STR_ZTEST 70 #define STR_ZTEST_UNDO_NAME 71 +#define STR_CHI_SQUARE_TEST 72 #define STR_COLUMN_LABEL_TEMPLATE 100 #define STR_ROW_LABEL_TEMPLATE 101 @@ -79,35 +80,39 @@ #define STR_ANOVA_LABEL_TOTAL 121 #define STR_ANOVA_TWO_FACTOR_LABEL 122 -#define STR_CORRELATION_LABEL 130 -#define STR_COVARIANCE_LABEL 131 -#define STR_LABEL_ALPHA132 -#define STR_VARIABLE_1_LABEL 133 -#define STR_VARIABLE_2_LABEL 134 -#define STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL 135 -#define STR_OBSERVATIONS_LABEL 136 -#define STR_OBSERVED_MEAN_DIFFERENCE_LABEL 137 +#define STR_CORRELATION_LABEL 140 +#define STR_COVARIANCE_LABEL141 +#define STR_LABEL_ALPHA 142 +#define STR_VARIABLE_1_LABEL143 +#define STR_VARIABLE_2_LABEL144 +#define STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL 145 +#define STR_OBSERVATIONS_LABEL 146 +#define
[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - vcl/win
vcl/win/source/gdi/salnativewidgets-luna.cxx |9 ++--- vcl/win/source/gdi/winlayout.cxx |3 +-- 2 files changed, 3 insertions(+), 9 deletions(-) New commits: commit 632106da226bfeedbcdcd0bc43790d001f4d8155 Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 19:12:16 2014 +0100 boost::scoped_ptr instead of manual pointer lifecycle management. Change-Id: I3b518065cead1c2805662326f063cb7b24d3d52a diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 8c87710..0789d4c 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -1288,23 +1288,18 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, if (ImplDrawNativeControl(aBlackDC.getCompatibleHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr) ImplDrawNativeControl(aWhiteDC.getCompatibleHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr)) { -OpenGLTexture *pBlackTexture = aBlackDC.getTexture(); +boost::scoped_ptrOpenGLTexture pBlackTexture(aBlackDC.getTexture()); if (!pBlackTexture) return false; -OpenGLTexture *pWhiteTexture = aWhiteDC.getTexture(); +boost::scoped_ptrOpenGLTexture pWhiteTexture(aWhiteDC.getTexture()); if (!pWhiteTexture) -{ -delete pBlackTexture; return false; -} pImpl-PreDraw(); pImpl-DrawTexture(*pBlackTexture, aBlackDC.getTwoRect()); // FIXME combine the textures - DrawTextureSynthesizedAlpha() pImpl-PostDraw(); -delete pBlackTexture; -delete pWhiteTexture; bOk = true; } } diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 3778db3..e405e49 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -218,13 +218,12 @@ void WinLayout::DrawText(SalGraphics rGraphics) const WinOpenGLSalGraphicsImpl *pImpl = dynamic_castWinOpenGLSalGraphicsImpl*(rWinGraphics.mpImpl.get()); if (pImpl) { -OpenGLTexture *pTexture = aDC.getTexture(); +boost::scoped_ptrOpenGLTexture pTexture(aDC.getTexture()); if (pTexture) { pImpl-PreDraw(); pImpl-DrawMask(*pTexture, salColor, aDC.getTwoRect()); pImpl-PostDraw(); -delete pTexture; } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/win
vcl/win/source/gdi/salnativewidgets-luna.cxx |9 ++--- vcl/win/source/gdi/winlayout.cxx |3 +-- 2 files changed, 3 insertions(+), 9 deletions(-) New commits: commit be5ef396a54da1a8aa4b9c23b43496f1f407e447 Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 19:12:16 2014 +0100 boost::scoped_ptr instead of manual pointer lifecycle management. Change-Id: I3b518065cead1c2805662326f063cb7b24d3d52a diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 8c87710..0789d4c 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -1288,23 +1288,18 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, if (ImplDrawNativeControl(aBlackDC.getCompatibleHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr) ImplDrawNativeControl(aWhiteDC.getCompatibleHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr)) { -OpenGLTexture *pBlackTexture = aBlackDC.getTexture(); +boost::scoped_ptrOpenGLTexture pBlackTexture(aBlackDC.getTexture()); if (!pBlackTexture) return false; -OpenGLTexture *pWhiteTexture = aWhiteDC.getTexture(); +boost::scoped_ptrOpenGLTexture pWhiteTexture(aWhiteDC.getTexture()); if (!pWhiteTexture) -{ -delete pBlackTexture; return false; -} pImpl-PreDraw(); pImpl-DrawTexture(*pBlackTexture, aBlackDC.getTwoRect()); // FIXME combine the textures - DrawTextureSynthesizedAlpha() pImpl-PostDraw(); -delete pBlackTexture; -delete pWhiteTexture; bOk = true; } } diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 3778db3..e405e49 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -218,13 +218,12 @@ void WinLayout::DrawText(SalGraphics rGraphics) const WinOpenGLSalGraphicsImpl *pImpl = dynamic_castWinOpenGLSalGraphicsImpl*(rWinGraphics.mpImpl.get()); if (pImpl) { -OpenGLTexture *pTexture = aDC.getTexture(); +boost::scoped_ptrOpenGLTexture pTexture(aDC.getTexture()); if (pTexture) { pImpl-PreDraw(); pImpl-DrawMask(*pTexture, salColor, aDC.getTwoRect()); pImpl-PostDraw(); -delete pTexture; } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - vcl/win
vcl/win/source/gdi/salnativewidgets-luna.cxx |9 ++--- vcl/win/source/gdi/winlayout.cxx |3 +-- 2 files changed, 3 insertions(+), 9 deletions(-) New commits: commit 52b7e6bfc848a467baf02c320c29e7f77b92cc93 Author: Jan Holesovsky ke...@collabora.com Date: Thu Nov 20 19:12:16 2014 +0100 boost::scoped_ptr instead of manual pointer lifecycle management. Change-Id: I3b518065cead1c2805662326f063cb7b24d3d52a diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 8c87710..0789d4c 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -1288,23 +1288,18 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, if (ImplDrawNativeControl(aBlackDC.getCompatibleHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr) ImplDrawNativeControl(aWhiteDC.getCompatibleHDC(), hTheme, rc, nType, nPart, nState, aValue, aCaptionStr)) { -OpenGLTexture *pBlackTexture = aBlackDC.getTexture(); +boost::scoped_ptrOpenGLTexture pBlackTexture(aBlackDC.getTexture()); if (!pBlackTexture) return false; -OpenGLTexture *pWhiteTexture = aWhiteDC.getTexture(); +boost::scoped_ptrOpenGLTexture pWhiteTexture(aWhiteDC.getTexture()); if (!pWhiteTexture) -{ -delete pBlackTexture; return false; -} pImpl-PreDraw(); pImpl-DrawTexture(*pBlackTexture, aBlackDC.getTwoRect()); // FIXME combine the textures - DrawTextureSynthesizedAlpha() pImpl-PostDraw(); -delete pBlackTexture; -delete pWhiteTexture; bOk = true; } } diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 3778db3..e405e49 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -218,13 +218,12 @@ void WinLayout::DrawText(SalGraphics rGraphics) const WinOpenGLSalGraphicsImpl *pImpl = dynamic_castWinOpenGLSalGraphicsImpl*(rWinGraphics.mpImpl.get()); if (pImpl) { -OpenGLTexture *pTexture = aDC.getTexture(); +boost::scoped_ptrOpenGLTexture pTexture(aDC.getTexture()); if (pTexture) { pImpl-PreDraw(); pImpl-DrawMask(*pTexture, salColor, aDC.getTwoRect()); pImpl-PostDraw(); -delete pTexture; } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Fix Penguin Penalty 17th October2014 ( mail-archive.com )
Dear Sir Did your website get hit by Google Penguin update on October 17th 2014? What basically is Google Penguin Update? It is actually a code name for Google algorithm which aims at decreasing your websites search engine rankings that violate Googles guidelines by using black hat SEO techniques to rank your webpage by giving number of spammy links to the page. We are one of those few SEO companies that can help you avoid penalties from Google Updates like Penguin and Panda. Our clients have survived all the previous and present updates with ease. They have never been hit because we use 100% white hat SEO techniques to rank Webpages. Simple thing that we do to keep websites away from any Penguin or Panda penalties is follow Google guidelines and we give Google users the best answers to their queries. If you are looking to increase the quality of your websites and to get more targeted traffic or save your websites from these Google penalties email us back with your interest. We will be glad to serve you and help you grow your business. Regards Julia kites SEO Manager ( TOB ) B7 Green Avenue, Amritsar 143001 Punjab NO CLICK in the subject to STOP EMAILS ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: include/vcl vcl/source
include/vcl/outdev.hxx |4 +++- vcl/source/app/svapp.cxx | 26 +- 2 files changed, 16 insertions(+), 14 deletions(-) New commits: commit a91d3c0751f75b08561bf7d047043471956af747 Author: Chris Sherlock chris.sherloc...@gmail.com Date: Fri Nov 21 01:34:07 2014 +1100 vcl: remove Application as friend of OutputDevice Change-Id: Id8296445c72334164db149440c60c89823c94e40 Reviewed-on: https://gerrit.libreoffice.org/12989 Reviewed-by: Chris Sherlock chris.sherloc...@gmail.com Tested-by: Chris Sherlock chris.sherloc...@gmail.com diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index dfe88aa..e1a9ca4 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -255,7 +255,6 @@ extern const sal_uLong nVCLLut[ 256 ]; class VCL_DLLPUBLIC OutputDevice: private boost::noncopyable { -friend class Application; friend class ::Bitmap; friend class ImplImageBmp; friend class Printer; @@ -463,6 +462,9 @@ public: */ SAL_DLLPRIVATE sal_Int32GetDPIY() const { return mnDPIY; } +SAL_DLLPRIVATE void SetDPIX( sal_Int32 nDPIX ) { mnDPIX = nDPIX; } +SAL_DLLPRIVATE void SetDPIY( sal_Int32 nDPIY ) { mnDPIY = nDPIY; } + sal_Int32 GetDPIScaleFactor() const { return mnDPIScaleFactor; } OutDevType GetOutDevType() const { return meOutDevType; } diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 8d99977..29f160e 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -548,8 +548,8 @@ void Application::SetSettings( const AllSettings rSettings ) long nOldDPIY = 0; if ( pFirstFrame ) { -nOldDPIX = pFirstFrame-mnDPIX; -nOldDPIY = pFirstFrame-mnDPIY; +nOldDPIX = pFirstFrame-GetDPIX(); +nOldDPIY = pFirstFrame-GetDPIY(); vcl::Window::ImplInitAppFontData(pFirstFrame); } vcl::Window* pFrame = pFirstFrame; @@ -583,19 +583,19 @@ void Application::SetSettings( const AllSettings rSettings ) pFirstFrame = pSVData-maWinData.mpFirstFrame; if ( pFirstFrame ) { -if ( (pFirstFrame-mnDPIX != nOldDPIX) || - (pFirstFrame-mnDPIY != nOldDPIY) ) +if ( (pFirstFrame-GetDPIX() != nOldDPIX) || + (pFirstFrame-GetDPIY() != nOldDPIY) ) { VirtualDevice* pVirDev = pSVData-maGDIData.mpFirstVirDev; while ( pVirDev ) { if ( pVirDev-mbScreenComp - (pVirDev-mnDPIX == nOldDPIX) - (pVirDev-mnDPIY == nOldDPIY) ) + (pVirDev-GetDPIX() == nOldDPIX) + (pVirDev-GetDPIY() == nOldDPIY) ) { -pVirDev-mnDPIX = pFirstFrame-mnDPIX; -pVirDev-mnDPIY = pFirstFrame-mnDPIY; -if (pVirDev-IsMapModeEnabled()) +pVirDev-SetDPIX( pFirstFrame-GetDPIX() ); +pVirDev-SetDPIY( pFirstFrame-GetDPIY() ); +if ( pVirDev-IsMapModeEnabled() ) { MapMode aMapMode = pVirDev-GetMapMode(); pVirDev-SetMapMode(); @@ -745,8 +745,8 @@ ImplSVEvent * Application::PostMouseEvent( sal_uLong nEvent, vcl::Window *pWin, { Point aTransformedPos( pMouseEvent-GetPosPixel() ); -aTransformedPos.X() += pWin-mnOutOffX; -aTransformedPos.Y() += pWin-mnOutOffY; +aTransformedPos.X() += pWin-GetOutOffXPixel(); +aTransformedPos.Y() += pWin-GetOutOffYPixel(); const MouseEvent aTransformedEvent( aTransformedPos, pMouseEvent-GetClicks(), pMouseEvent-GetMode(), pMouseEvent-GetButtons(), pMouseEvent-GetModifier() ); @@ -780,8 +780,8 @@ ImplSVEvent * Application::PostZoomEvent( sal_uLong nEvent, vcl::Window *pWin, Z { Point aTransformedPos( pZoomEvent-GetCenter() ); -aTransformedPos.X() += pWin-mnOutOffX; -aTransformedPos.Y() += pWin-mnOutOffY; +aTransformedPos.X() += pWin-GetOutOffXPixel(); +aTransformedPos.Y() += pWin-GetOutOffYPixel(); const ZoomEvent aTransformedEvent( aTransformedPos, pZoomEvent-GetScale() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] libcdr.git: 2 commits - src/lib
src/lib/CDRParser.cpp | 37 +++-- 1 file changed, 11 insertions(+), 26 deletions(-) New commits: commit 2a5b92b43336c3e0b82ffad6b06b8623d7007761 Author: David Tardon dtar...@redhat.com Date: Thu Nov 20 21:41:16 2014 +0100 optimize repeated seeks This speeds up parsing of a pathological case of a broken file from 0m29.644s to 0m0.028s. Change-Id: I438d8d3bfd84d3d52e8de18b2680a43948cda3ed diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp index 9a69913..2b70a2c 100644 --- a/src/lib/CDRParser.cpp +++ b/src/lib/CDRParser.cpp @@ -2596,22 +2596,13 @@ void libcdr::CDRParser::readStlt(librevenge::RVNGInputStream *input, unsigned le } unsigned numIntervals = readU32(input); CDR_DEBUG_MSG((CDRParser::readStlt numIntervals 0x%x\n, numIntervals)); -for (i=0; inumIntervals; ++i) -{ - input-seek(52, librevenge::RVNG_SEEK_CUR); -} +input-seek(52 * static_castlong(numIntervals), librevenge::RVNG_SEEK_CUR); unsigned numSet5s = readU32(input); CDR_DEBUG_MSG((CDRParser::readStlt numSet5s 0x%x\n, numSet5s)); -for (i=0; inumSet5s; ++i) -{ - input-seek(152, librevenge::RVNG_SEEK_CUR); -} +input-seek(152 * static_castlong(numSet5s), librevenge::RVNG_SEEK_CUR); unsigned numTabs = readU32(input); CDR_DEBUG_MSG((CDRParser::readStlt numTabs 0x%x\n, numTabs)); -for (i=0; inumTabs; ++i) -{ - input-seek(784, librevenge::RVNG_SEEK_CUR); -} +input-seek(784 * static_castlong(numTabs), librevenge::RVNG_SEEK_CUR); unsigned numBullets = readU32(input); CDR_DEBUG_MSG((CDRParser::readStlt numBullets 0x%x\n, numBullets)); for (i=0; inumBullets; ++i) @@ -2649,18 +2640,13 @@ void libcdr::CDRParser::readStlt(librevenge::RVNGInputStream *input, unsigned le } unsigned numHypens = readU32(input); CDR_DEBUG_MSG((CDRParser::readStlt numHypens 0x%x\n, numHypens)); -for (i=0; inumHypens; ++i) -{ - input-seek(32, librevenge::RVNG_SEEK_CUR); - if (m_version = 1300) -input-seek(4, librevenge::RVNG_SEEK_CUR); -} +long hypensLen = 32; +if (m_version = 1300) + hypensLen += 4; +input-seek(hypensLen * static_castlong(numHypens), librevenge::RVNG_SEEK_CUR); unsigned numDropcaps = readU32(input); CDR_DEBUG_MSG((CDRParser::readStlt numDropcaps 0x%x\n, numDropcaps)); -for (i=0; inumDropcaps; ++i) -{ - input-seek(28, librevenge::RVNG_SEEK_CUR); -} +input-seek(28 * static_castlong(numDropcaps), librevenge::RVNG_SEEK_CUR); try { bool set11Flag(false); @@ -2669,10 +2655,7 @@ void libcdr::CDRParser::readStlt(librevenge::RVNGInputStream *input, unsigned le set11Flag = true; unsigned numSet11s = readU32(input); CDR_DEBUG_MSG((CDRParser::readStlt numSet11s 0x%x\n, numSet11s)); -for (i=0; inumSet11s; ++i) -{ - input-seek(12, librevenge::RVNG_SEEK_CUR); -} +input-seek(12 * static_castlong(numSet11s), librevenge::RVNG_SEEK_CUR); } std::mapunsigned, CDRStltRecord styles; for (i=0; inumRecords; ++i) commit d08b5c8a09190852e21f8a2ae4b1720f13dbfbc4 Author: David Tardon dtar...@redhat.com Date: Thu Nov 20 20:17:08 2014 +0100 avoid extra big allocation Change-Id: Ibb22de59d17a85e8b0a8df8be277643fc9ba7f52 diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp index d9d66c9..9a69913 100644 --- a/src/lib/CDRParser.cpp +++ b/src/lib/CDRParser.cpp @@ -2044,6 +2044,8 @@ void libcdr::CDRParser::readLoda(librevenge::RVNGInputStream *input, unsigned le long startPosition = input-tell(); unsigned chunkLength = readUnsigned(input); unsigned numOfArgs = readUnsigned(input); + if (numOfArgs length / 4) // avoid extra big allocation in case of a broken file +numOfArgs = length / 4; unsigned startOfArgs = readUnsigned(input); unsigned startOfArgTypes = readUnsigned(input); unsigned chunkType = readUnsigned(input); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/LinkTarget.mk |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit 0ab8ef7095530652efb4ed2ae2365580c358025a Author: Stephan Bergmann sberg...@redhat.com Date: Thu Nov 20 22:35:06 2014 +0100 Fix build of ObjC(xx)Objects under COMPILER_PLUGIN_TOOL Change-Id: I7974ee3119e0959cec09eefd5d5e6dcf87e9bd51 diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 0887b6b..9478130 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -319,10 +319,10 @@ ifneq ($(COMPILER_PLUGIN_TOOL),) $(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_ALL_TARGET) $(call gb_ObjCxxObject__tool_command,$*,$) else - $(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDIR),%) $(call gb_Output_announce,$*.mm,$(true),OCX,3) $(call gb_CObject__command_pattern,$@,$(T_OBJCXXFLAGS) $(T_OBJCXXFLAGS_APPEND),$,$(call gb_ObjCxxObject_get_dep_target,$*),$(T_COMPILER_PLUGINS)) +endif ifeq ($(gb_FULLDEPS),$(true)) $(dir $(call gb_ObjCxxObject_get_dep_target,%)).dir : @@ -335,7 +335,6 @@ $(call gb_ObjCxxObject_get_dep_target,%) : $(if $(wildcard $@),touch $@) endif -endif # ObjCObject class @@ -347,10 +346,10 @@ ifneq ($(COMPILER_PLUGIN_TOOL),) $(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),%) $(gb_FORCE_COMPILE_ALL_TARGET) $(call gb_ObjCObject__tool_command,$*,$) else - $(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),%) $(call gb_Output_announce,$*.m,$(true),OCC,3) $(call gb_CObject__command_pattern,$@,$(T_OBJCFLAGS) $(T_OBJCFLAGS_APPEND),$,$(call gb_ObjCObject_get_dep_target,$*),$(T_COMPILER_PLUGINS)) +endif ifeq ($(gb_FULLDEPS),$(true)) $(dir $(call gb_ObjCObject_get_dep_target,%)).dir : @@ -363,7 +362,6 @@ $(call gb_ObjCObject_get_dep_target,%) : $(if $(wildcard $@),touch $@) endif -endif # AsmObject class ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits