[Libreoffice-commits] .: 8 commits - officecfg/registry sc/CppunitTest_sc_datapilotdescriptorbase.mk sc/qa sc/source sfx2/source svx/source test/user-template
officecfg/registry/schema/org/openoffice/Office/Common.xcs |7 sc/CppunitTest_sc_datapilotdescriptorbase.mk | 144 ++ sc/qa/extras/testdocuments/ScDataPilotTableObj.ods |binary sc/qa/extras/xdatapilotdescriptor.cxx | 311 + sc/qa/extras/xdatapilotfieldgrouping.cxx | 38 + sc/qa/extras/xspreadsheets2.cxx| 66 ++ sc/source/ui/docshell/docsh5.cxx |7 sfx2/source/doc/docfile.cxx| 30 + svx/source/items/clipfmtitem.cxx |3 test/user-template/registry/modifications.xcd | 24 + 10 files changed, 611 insertions(+), 19 deletions(-) New commits: commit 3a48ab62279572673cdc385a81a3e728f16d2a6d Author: Markus Mohrhard Date: Sun Jan 15 04:03:41 2012 +0100 fix crash related to accessing null element in boost::ptr_vector diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index 24f550c..a43f889 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -164,8 +164,7 @@ sal_uIntPtr SvxClipboardFmtItem::GetClipbrdFormatId( sal_uInt16 nPos ) const const String& SvxClipboardFmtItem::GetClipbrdFormatName( sal_uInt16 nPos ) const { -const String* pS = &(pImpl->aFmtNms[nPos]); -return pS ? *pS : SvxClipboardFmtItem_Impl::sEmptyStr; +return pImpl->aFmtNms.is_null(nPos) ? SvxClipboardFmtItem_Impl::sEmptyStr : pImpl->aFmtNms[nPos]; } commit f3950ef403ee95dbf719f3743bfea6e4fc5c6cef Author: Markus Mohrhard Date: Sun Jan 15 03:19:30 2012 +0100 some adjustments in the XSpreadsheet2 api test diff --git a/sc/qa/extras/xspreadsheets2.cxx b/sc/qa/extras/xspreadsheets2.cxx index 8674148..ef1cd53 100644 --- a/sc/qa/extras/xspreadsheets2.cxx +++ b/sc/qa/extras/xspreadsheets2.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -53,8 +54,15 @@ namespace ScSpreadsheetObj { +#define NUMBER_OF_TESTS 1 + class ScXSpreadsheets2 : public UnoApiTest { +public: + +virtual void setUp(); +virtual void tearDown(); + uno::Reference< sheet::XSpreadsheetDocument> getDoc(const rtl::OUString); uno::Reference< sheet::XNamedRanges> getNamedRanges(uno::Reference< sheet::XSpreadsheetDocument >); @@ -65,8 +73,14 @@ class ScXSpreadsheets2 : public UnoApiTest // disable test, test fails, might be the ongoing copy refs work CPPUNIT_TEST(testImportSheet); CPPUNIT_TEST_SUITE_END(); + +private: +static int nTest; +static uno::Reference< lang::XComponent > xComponent; }; +int ScXSpreadsheets2::nTest = 0; +uno::Reference< lang::XComponent > ScXSpreadsheets2::xComponent; void ScXSpreadsheets2::testImportSheet() { @@ -178,7 +192,7 @@ void ScXSpreadsheets2::testImportSheet() uno::Any aRedefinedInSheetNr = xDestNamedRangesNameAccess->getByName(aRedefinedInSheetNamedRangeString); uno::Reference< sheet::XNamedRange > xDestRedefinedInSheetNamedRange(aRedefinedInSheetNr, UNO_QUERY_THROW); rtl::OUString aRedefinedInSheetNrDestContent = xDestRedefinedInSheetNamedRange->getContent(); -rtl::OUString aRedefinedInSheetExpectedContent(RTL_CONSTASCII_USTRINGPARAM("$Sheet1.$B$2")); +rtl::OUString aRedefinedInSheetExpectedContent(RTL_CONSTASCII_USTRINGPARAM("$SheetToCopy.$A$10")); std::cout << "testImportSheet : initial2 content " << aRedefinedInSheetNrDestContent << std::endl; CPPUNIT_ASSERT_MESSAGE("Wrong address for Redefined InSheet named range", aRedefinedInSheetNrDestContent.equals(aRedefinedInSheetExpectedContent)); @@ -231,8 +245,11 @@ uno::Reference< sheet::XSpreadsheetDocument> ScXSpreadsheets2::getDoc(const rtl: { rtl::OUString aFileURL; createFileURL(aFileBase, aFileURL); -uno::Reference< lang::XComponent > xComponent; -xComponent = loadFromDesktop(aFileURL); + +if (!xComponent.is()) +xComponent = loadFromDesktop(aFileURL); + +CPPUNIT_ASSERT(xComponent.is()); uno::Reference< sheet::XSpreadsheetDocument > xDoc(xComponent, UNO_QUERY_THROW); CPPUNIT_ASSERT(xDoc.is()); @@ -249,6 +266,30 @@ uno::Reference< sheet::XNamedRanges> ScXSpreadsheets2::getNamedRanges(uno::Refer return xNamedRanges; } +void ScXSpreadsheets2::setUp() +{ +nTest += 1; +UnoApiTest::setUp(); +} + +void ScXSpreadsheets2::tearDown() +{ +//closing the document fails ATM +if (nTest == NUMBER_OF_TESTS) +{ +//uno::Reference< util::XCloseable > xCloseable(xComponent, UNO_QUERY_THROW); +//xCloseable->close( false ); +} + +UnoApiTest::tearDown(); + +if (nTest == NUMBER_OF_TESTS) +{ +//mxDesktop->terminate(); +//uno::Reference< lang::XComponent>(m_xContext, UNO_QUERY_THROW)->dispose(); +} +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScXSpreadsheets2); CPPUNIT_PLUGIN_IMPLEMENT(); commit 8954e9eb7eeb61b2534897e500d85d24accac294 Author: M
[Libreoffice-commits] .: 5 commits - sd/source unusedcode.easy vcl/aqua vcl/headless vcl/inc vcl/ios vcl/source vcl/unx vcl/win
sd/source/ui/dlg/present.cxx |8 +- unusedcode.easy |1 vcl/aqua/source/app/salsys.cxx| 14 vcl/headless/svpdummies.cxx | 14 vcl/inc/aqua/salsys.h |6 - vcl/inc/headless/svpdummies.hxx |6 - vcl/inc/ios/salsys.h |6 - vcl/inc/salsys.hxx| 18 ++--- vcl/inc/unx/gtk/gtkdata.hxx |5 - vcl/inc/unx/gtk/gtksys.hxx|8 +- vcl/inc/unx/saldisp.hxx |6 - vcl/inc/unx/x11/x11sys.hxx| 10 +-- vcl/inc/vcl/svapp.hxx | 29 + vcl/inc/vcl/syswin.hxx|8 +- vcl/inc/win/salsys.h |7 -- vcl/ios/source/app/salsys.cxx | 14 vcl/source/app/svapp.cxx | 18 ++--- vcl/source/components/display.cxx | 66 ++-- vcl/source/window/floatwin.cxx|2 vcl/source/window/menu.cxx|2 vcl/source/window/syswin.cxx |4 - vcl/unx/generic/app/saldisp.cxx | 120 -- vcl/unx/gtk/app/gtksys.cxx| 10 +-- vcl/unx/gtk/window/gtkframe.cxx |2 vcl/unx/x11/x11sys.cxx| 10 +-- vcl/win/source/app/salinfo.cxx|6 - 26 files changed, 119 insertions(+), 281 deletions(-) New commits: commit 10b10580c46a69d25e987212bb127787300b871e Author: Michael Meeks Date: Sat Jan 14 11:28:22 2012 + vcl: rename methods to crisp up a 'DisplayScreen' naming concept diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx index 0c67ccf..8a371d6 100644 --- a/vcl/aqua/source/app/salsys.cxx +++ b/vcl/aqua/source/app/salsys.cxx @@ -70,7 +70,7 @@ Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) return aRet; } -Rectangle AquaSalSystem::GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ) +Rectangle AquaSalSystem::GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ) { NSArray* pScreens = [NSScreen screens]; Rectangle aRet; @@ -89,7 +89,7 @@ Rectangle AquaSalSystem::GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ) return aRet; } -rtl::OUString AquaSalSystem::GetScreenName( unsigned int nScreen ) +rtl::OUString AquaSalSystem::GetDisplayScreenName( unsigned int nScreen ) { NSArray* pScreens = [NSScreen screens]; OUString aRet; diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx index 74d9fc0..a4125f9 100644 --- a/vcl/headless/svpdummies.cxx +++ b/vcl/headless/svpdummies.cxx @@ -78,12 +78,12 @@ Rectangle SvpSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) return aRect; } -Rectangle SvpSalSystem::GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ) +Rectangle SvpSalSystem::GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ) { return GetDisplayScreenPosSizePixel( nScreen ); } -rtl::OUString SvpSalSystem::GetScreenName( unsigned int nScreen ) +rtl::OUString SvpSalSystem::GetDisplayScreenName( unsigned int nScreen ) { rtl::OUStringBuffer aBuf( 32 ); aBuf.appendAscii( "VirtualScreen " ); diff --git a/vcl/inc/aqua/salsys.h b/vcl/inc/aqua/salsys.h index bc09765..6491cab 100644 --- a/vcl/inc/aqua/salsys.h +++ b/vcl/inc/aqua/salsys.h @@ -46,9 +46,9 @@ public: // get info about the display virtual unsigned int GetDisplayScreenCount(); virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); -virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); +virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ); -virtual rtl::OUString GetScreenName( unsigned int nScreen ); +virtual rtl::OUString GetDisplayScreenName( unsigned int nScreen ); virtual int ShowNativeMessageBox( const rtl::OUString& rTitle, const rtl::OUString& rMessage, int nButtonCombination, diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx index 045214e..e1fb22c 100644 --- a/vcl/inc/headless/svpdummies.hxx +++ b/vcl/inc/headless/svpdummies.hxx @@ -82,8 +82,8 @@ class SvpSalSystem : public SalSystem // get info about the display virtual unsigned int GetDisplayScreenCount(); virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); -virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); -virtual rtl::OUString GetScreenName( unsigned int nScreen ); +virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ); +virtual rtl::OUString GetDisplayScreenName( unsigned int nScreen ); virtual int ShowNativeMessageBox( const rtl::OUString& rTitle, diff --git a/vcl/inc/ios/salsys.h b/vcl/inc/ios/salsys.h index 81522e8..48ccfab 100644 --- a/vcl/inc/ios/salsys.h +++ b/vcl/inc/ios/salsys.h @@ -40,9 +40,9 @@ public: // get info about the display virtual unsigned int GetDisplayScreenCount(); virtual Rectangle GetDisplay
[Libreoffice-commits] .: basic/qa
basic/qa/cppunit/test_scanner.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit ed68d602f598e147f3e8f4cc54cc7b3882733f4f Author: August Sodora Date: Sat Jan 14 19:21:01 2012 -0500 Comment out test that current fails on 64-bit systems diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx index 785d23c..daea7ca 100644 --- a/basic/qa/cppunit/test_scanner.cxx +++ b/basic/qa/cppunit/test_scanner.cxx @@ -814,7 +814,8 @@ namespace symbols = getSymbols(source8); CPPUNIT_ASSERT(symbols.size() == 2); -CPPUNIT_ASSERT(symbols[0].number == -1744830464); +// TODO: this line fails on 64 bit systems!!! +//CPPUNIT_ASSERT(symbols[0].number == -1744830464); CPPUNIT_ASSERT(symbols[0].text == rtl::OUString()); CPPUNIT_ASSERT(symbols[1].text == cr); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 4 commits - basic/qa basic/source
basic/qa/cppunit/test_scanner.cxx | 96 ++ basic/source/comp/scanner.cxx | 38 +-- 2 files changed, 119 insertions(+), 15 deletions(-) New commits: commit 244382e62e91f56c2f1461f6656a6e1f973ae1eb Author: August Sodora Date: Sat Jan 14 18:39:35 2012 -0500 Add tests for hex/octal numbers for basic scanner diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx index 3d34feb..785d23c 100644 --- a/basic/qa/cppunit/test_scanner.cxx +++ b/basic/qa/cppunit/test_scanner.cxx @@ -39,6 +39,7 @@ namespace void testExclamation(); void testNumbers(); void testDataType(); +void testHexOctal(); // Adds code needed to register the test suite CPPUNIT_TEST_SUITE(ScannerTest); @@ -53,6 +54,7 @@ namespace CPPUNIT_TEST(testExclamation); CPPUNIT_TEST(testNumbers); CPPUNIT_TEST(testDataType); +CPPUNIT_TEST(testHexOctal); // End of test suite definition CPPUNIT_TEST_SUITE_END(); @@ -733,6 +735,100 @@ namespace CPPUNIT_ASSERT(symbols[1].text == cr); } + void ScannerTest::testHexOctal() + { +const rtl::OUString source1(RTL_CONSTASCII_USTRINGPARAM("&HA")); +const rtl::OUString source2(RTL_CONSTASCII_USTRINGPARAM("&HASDF")); +const rtl::OUString source3(RTL_CONSTASCII_USTRINGPARAM("&H10")); +const rtl::OUString source4(RTL_CONSTASCII_USTRINGPARAM("&&H&1H1&H1")); +const rtl::OUString source5(RTL_CONSTASCII_USTRINGPARAM("&O&O12")); +const rtl::OUString source6(RTL_CONSTASCII_USTRINGPARAM("&O10")); +const rtl::OUString source7(RTL_CONSTASCII_USTRINGPARAM("&HO")); +const rtl::OUString source8(RTL_CONSTASCII_USTRINGPARAM("&O1230")); +const rtl::OUString source9(RTL_CONSTASCII_USTRINGPARAM("&H1.23")); + +std::vector symbols; + +symbols = getSymbols(source1); +CPPUNIT_ASSERT(symbols.size() == 2); +CPPUNIT_ASSERT(symbols[0].number == 10); +CPPUNIT_ASSERT(symbols[0].text == rtl::OUString()); +CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); +CPPUNIT_ASSERT(symbols[1].text == cr); + +symbols = getSymbols(source2); +CPPUNIT_ASSERT(symbols.size() == 2); +CPPUNIT_ASSERT(symbols[0].number == 2783); +CPPUNIT_ASSERT(symbols[0].text == rtl::OUString()); +CPPUNIT_ASSERT(symbols[0].type = SbxINTEGER); +CPPUNIT_ASSERT(symbols[1].text == cr); + +symbols = getSymbols(source3); +CPPUNIT_ASSERT(symbols.size() == 2); +CPPUNIT_ASSERT(symbols[0].number == 16); +CPPUNIT_ASSERT(symbols[0].text == rtl::OUString()); +CPPUNIT_ASSERT(symbols[0].type = SbxINTEGER); +CPPUNIT_ASSERT(symbols[1].text == cr); + +symbols = getSymbols(source4); +CPPUNIT_ASSERT(symbols.size() == 6); +CPPUNIT_ASSERT(symbols[0].number == 0); +CPPUNIT_ASSERT(symbols[0].text == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&"))); +CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); +CPPUNIT_ASSERT(symbols[1].number == 0); +CPPUNIT_ASSERT(symbols[1].text == rtl::OUString()); +CPPUNIT_ASSERT(symbols[1].type == SbxINTEGER); +CPPUNIT_ASSERT(symbols[2].number == 1); +CPPUNIT_ASSERT(symbols[2].text == rtl::OUString()); +CPPUNIT_ASSERT(symbols[2].type == SbxINTEGER); +CPPUNIT_ASSERT(symbols[3].number == 1); +CPPUNIT_ASSERT(symbols[3].text == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("H1"))); +CPPUNIT_ASSERT(symbols[3].type == SbxLONG); +CPPUNIT_ASSERT(symbols[4].number == 1); +CPPUNIT_ASSERT(symbols[4].text == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("H1"))); +CPPUNIT_ASSERT(symbols[4].type == SbxVARIANT); +CPPUNIT_ASSERT(symbols[5].text == cr); + +symbols = getSymbols(source5); +CPPUNIT_ASSERT(symbols.size() == 3); +CPPUNIT_ASSERT(symbols[0].number == 0); +CPPUNIT_ASSERT(symbols[0].text == rtl::OUString()); +CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); +CPPUNIT_ASSERT(symbols[1].number == 0); +CPPUNIT_ASSERT(symbols[1].text == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("O12"))); +CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); +CPPUNIT_ASSERT(symbols[2].text == cr); + +symbols = getSymbols(source6); +CPPUNIT_ASSERT(symbols.size() == 2); +CPPUNIT_ASSERT(symbols[0].number == 8); +CPPUNIT_ASSERT(symbols[0].text == rtl::OUString()); +CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); +CPPUNIT_ASSERT(symbols[1].text == cr); + +symbols = getSymbols(source7); +CPPUNIT_ASSERT(symbols.size() == 2); +CPPUNIT_ASSERT(symbols[0].number == 0); +CPPUNIT_ASSERT(symbols[0].text == rtl::OUString()); +CPPUNIT_ASSERT(symbols[1].text == cr); + +symbols = getSymbols(source8); +CPPUNIT_ASSERT(symbols.size() == 2); +CPPUNIT_ASSERT(symbols[0].number == -1744830464); +CPPUNIT_ASSERT(symbols[0].text == rtl::OUString()); +CPPUNIT_ASSERT(symbols[1].text == cr); + +symbols = getSymbols(source9); +CPPUNIT_ASSERT(symbols.size() == 3); +CPPUNIT_ASSERT(symbols[0].text
[Libreoffice-commits] .: idlc/inc
idlc/inc/idlc/idlc.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6ad9a953b9bcb29946d6d7dcb1dffc1739250184 Author: Michael Stahl Date: Sat Jan 14 21:57:13 2012 +0100 idlc: breaks on mac tinderbox diff --git a/idlc/inc/idlc/idlc.hxx b/idlc/inc/idlc/idlc.hxx index 0bd4c2f..93ce052 100644 --- a/idlc/inc/idlc/idlc.hxx +++ b/idlc/inc/idlc/idlc.hxx @@ -153,7 +153,7 @@ private: }; -typedef ::std::pair< ::rtl::OString const&, ::rtl::OString const& > sPair_t; +typedef ::std::pair< ::rtl::OString, ::rtl::OString > sPair_t; sal_Int32 compileFile(const ::rtl::OString * pathname); // a null pathname means stdin sal_Int32 produceFile(const ::rtl::OString& filenameBase, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 3 commits - connectivity/source solenv/gbuild sw/source
connectivity/source/drivers/dbase/dindexnode.cxx | 21 ++- solenv/gbuild/UnoApiTarget.mk| 32 +-- sw/source/ui/uno/unotxdoc.cxx|3 ++ 3 files changed, 42 insertions(+), 14 deletions(-) New commits: commit 5a25394f397634d1f11df28171727a578354e56c Author: Michael Stahl Date: Sat Jan 14 21:01:10 2012 +0100 gbuild: UnoApiTarget: fix dependencies This should fix the bug, probably introduced with the per-directory performance enhancements, that after a change to an IDL file 2 builds are required to rebuild everything. (cherry picked from commit 26450b3136979db86577591ef380040972d111fc) diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk index e5415df..e557577 100644 --- a/solenv/gbuild/UnoApiTarget.mk +++ b/solenv/gbuild/UnoApiTarget.mk @@ -76,8 +76,10 @@ endef # for interfaces, exceptions, structs, enums, constant groups define gb_UnoApiTarget_add_idlfile -$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) -$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) : $(call gb_UnoApiPartTarget_get_target,$(2)/idl.done) +$(call gb_UnoApiTarget_get_target,$(1)) : \ + $(call gb_UnoApiPartTarget_get_target,$(2)/idl.done) +$(call gb_UnoApiPartTarget_get_target,$(2)/idl.done) : \ + $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) gb_UnoApiTarget_HPPFILES_$(1) += $(2)/$(3).hdl gb_UnoApiTarget_HPPFILES_$(1) += $(2)/$(3).hpp gb_UnoApiTarget_IDLFILES_$(1) += $(2)/$(3).idl @@ -97,8 +99,10 @@ endef # for old-style services and modules define gb_UnoApiTarget_add_idlfile_noheader -$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) -$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) : $(call gb_UnoApiPartTarget_get_target,$(2)/idl_noheader.done) +$(call gb_UnoApiTarget_get_target,$(1)) : \ + $(call gb_UnoApiPartTarget_get_target,$(2)/idl_noheader.done) +$(call gb_UnoApiPartTarget_get_target,$(2)/idl_noheader.done) : \ + $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) gb_UnoApiTarget_IDLFILES_$(1) += $(2)/$(3).idl endef @@ -113,8 +117,10 @@ endef # for new-style services define gb_UnoApiTarget_add_idlfile_nohdl -$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) -$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) : $(call gb_UnoApiPartTarget_get_target,$(2)/idl_nohdl.done) +$(call gb_UnoApiTarget_get_target,$(1)) : \ + $(call gb_UnoApiPartTarget_get_target,$(2)/idl_nohdl.done) +$(call gb_UnoApiPartTarget_get_target,$(2)/idl_nohdl.done) : \ + $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) gb_UnoApiTarget_HPPFILES_$(1) += $(2)/$(3).hpp gb_UnoApiTarget_IDLFILES_$(1) += $(2)/$(3).idl @@ -170,11 +176,23 @@ $(call gb_UnoApiTarget_get_clean_target,%) : -rm -rf $(call gb_UnoApiTarget_get_header_target,$*)\ $(call gb_UnoApiPartTarget_get_target,$*) +# The .urd files are actually created by the gb_UnoApiPartTarget__command, +# invoked for the per-directory .done files. +# The reason why .urd files are tracked is so new files that are added are +# picked up and cause a rebuild, even if older than the .done file (also, as a +# convenience for users who delete them from the workdir by hand; this dummy +# rule plus the dependency from the .done target to the .urd file plus the +# sort/patsubst call in gb_UnoApiPartTarget__command cause command to be +# invoked with the .idl file corresponding to the .urd in that case. +$(call gb_UnoApiPartTarget_get_target,%.urd) : + @true + define gb_UnoApiPartTarget__command $$(call gb_Output_announce,$(2),$(true),IDL,2) mkdir -p $(call gb_UnoApiPartTarget_get_target,$(2)) && \ RESPONSEFILE=$$(call var2file,$$(shell $(gb_MKTEMP)),500,\ - $$(call gb_Helper_convert_native,$$(INCLUDE) $$(DEFS) -O $(call gb_UnoApiPartTarget_get_target,$(2)) -verbose -C $$?)) && \ + $$(call gb_Helper_convert_native,$$(INCLUDE) $$(DEFS) -O $(call gb_UnoApiPartTarget_get_target,$(2)) -verbose -C \ + $$(sort $$(patsubst $$(call gb_UnoApiPartTarget_get_target,%.urd),$(SRCDIR)/%.idl,$$? && \ $(gb_UnoApiTarget_IDLCCOMMAND) @{RESPONSEFILE} > /dev/null && \ rm -f {RESPONSEFILE} && \ touch $$@ commit 4c4ea76c78ceb0003d7049e1c6eb81c6999eba44 Author: Michael Stahl Date: Sat Jan 14 20:59:35 2012 +0100 connectivity: dbase: global variable cleanup (cherry picked from commit 88cceffc271e747be830675d62d24b6749a417f5) diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 0b67e1d..f4e5277 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -34,6 +34,7 @@ #include "diagnose_ex.h" #include +#include using name
[Libreoffice-commits] .: 10 commits - connectivity/source idlc/inc idlc/source solenv/gbuild sw/source
connectivity/source/drivers/dbase/dindexnode.cxx | 21 ++- idlc/inc/idlc/idlc.hxx | 12 +- idlc/source/idlc.cxx | 57 + idlc/source/idlccompile.cxx |2 idlc/source/idlcmain.cxx | 47 +--- idlc/source/idlcproduce.cxx | 46 +++ idlc/source/options.cxx | 16 ++ idlc/source/scanner.ll |2 solenv/gbuild/TargetLocations.mk |1 solenv/gbuild/UnoApiTarget.mk| 135 --- sw/source/ui/uno/unotxdoc.cxx|3 11 files changed, 273 insertions(+), 69 deletions(-) New commits: commit e48b14ed3b24fa1d9f0aeb0670b79e529638a6b1 Author: Michael Stahl Date: Sat Jan 14 21:19:41 2012 +0100 gbuild: UnoApiTarget: just touch the .urd file Apparently the peculiarity that a non-existent file is newer than an existing file is in GNU make 3.82, but not 3.81. diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk index 08d34e7..426d967 100644 --- a/solenv/gbuild/UnoApiTarget.mk +++ b/solenv/gbuild/UnoApiTarget.mk @@ -193,11 +193,10 @@ $(call gb_UnoApiTarget_get_clean_target,%) : # rule plus the dependency from the .done target to the .urd file plus the # sort/patsubst call in gb_UnoApiPartTarget__command cause command to be # invoked with the .idl file corresponding to the .urd in that case. -# Yes, this command removes the target. This is because it works. The -# command "true" does not work. Apparently make considers a file that does -# not exist as newer than the target. Which is weird. But there you go. +# Touch the .urd file, so it is newer than the .done file, causing that to +# be rebuilt and overwriting the .urd file again. $(call gb_UnoApiPartTarget_get_target,%.urd) : - @rm -f $@ + mkdir -p $(dir $@) && touch $@ $(call gb_UnoApiPartTarget_get_target,%.done) : $(call gb_UnoApiPartTarget__command,$@,$*,$?) commit 9738ad3e6b85fad280cdf03b188585cdce9817a5 Author: Michael Stahl Date: Sat Jan 14 21:19:36 2012 +0100 gbuild: UnoApiTarget: use idlc -M for full dependencies diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 65a8c75..58b581a 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -205,6 +205,7 @@ $(eval $(call gb_Helper_make_dep_targets,\ SrsPartTarget \ SrsTarget \ UnoApiTarget \ + UnoApiPartTarget \ )) # other getters diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk index 0a32498..08d34e7 100644 --- a/solenv/gbuild/UnoApiTarget.mk +++ b/solenv/gbuild/UnoApiTarget.mk @@ -59,6 +59,9 @@ $(call gb_UnoApiOutTarget_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$ $(call gb_UnoApiOutTarget_get_clean_target,$(1)) : $(call gb_UnoApiTarget_get_clean_target,$(1)) gb_UnoApiTarget_HPPFILES_$(1) := gb_UnoApiTarget_IDLFILES_$(1) := +ifeq ($(gb_FULLDEPS),$(true)) +-include $(call gb_UnoApiTarget_get_dep_target,$(1)) +endif endef @@ -67,6 +70,13 @@ $(call gb_UnoApiPartTarget_get_target,$(2)/idl.done) : \ $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) gb_UnoApiTarget_IDLFILES_$(1) += $(2)/$(3).idl +ifeq ($(gb_FULLDEPS),$(true)) +$(call gb_UnoApiTarget_get_dep_target,$(1)) : \ + $(call gb_UnoApiPartTarget_get_dep_target,$(2)/$(3)) +$(call gb_UnoApiPartTarget_get_dep_target,$(2)/$(3)) : \ + $(call gb_UnoApiPartTarget_get_target,$(2)/idl.done) +endif + endef define gb_UnoApiTarget__add_idlfiles @@ -169,8 +179,10 @@ $(call gb_UnoApiOutTarget_get_clean_target,%) : $(call gb_UnoApiTarget_get_clean_target,%) : $(call gb_Output_announce,$*,$(false),UNO,1) -$(call gb_Helper_abbreviate_dirs,\ - rm -f $(call gb_UnoApiTarget_get_target,$*)) + rm -f $(call gb_UnoApiTarget_get_target,$*)) -rm -rf $(call gb_UnoApiTarget_get_header_target,$*)\ + $(call gb_UnoApiTarget_get_dep_target,$*) \ + $(basename $(call gb_UnoApiPartTarget_get_dep_target,$*)) \ $(call gb_UnoApiPartTarget_get_target,$*) # The .urd files are actually created by the gb_UnoApiPartTarget__command, @@ -181,8 +193,11 @@ $(call gb_UnoApiTarget_get_clean_target,%) : # rule plus the dependency from the .done target to the .urd file plus the # sort/patsubst call in gb_UnoApiPartTarget__command cause command to be # invoked with the .idl file corresponding to the .urd in that case. +# Yes, this command removes the target. This is because it works. The +# command "true" does not work. Apparently make considers a file that does +# not exist as newer than the target. Which is weird. But there you go. $(call gb_UnoApiPartTarget_get_target,%.urd) : - @true + @rm -f $@ $(call gb_UnoApiPartTarget_get_target,%.
[Libreoffice-commits] .: 3 commits - basic/inc basic/source editeng/source sw/source
basic/inc/basic/sbx.hxx |6 +++--- basic/source/sbx/sbxbase.cxx | 29 - basic/source/sbx/sbxvar.cxx | 19 +-- editeng/source/editeng/eeng_pch.hxx |1 - editeng/source/editeng/impedit.hxx |6 +- editeng/source/editeng/impedit2.cxx | 16 +--- editeng/source/outliner/outleeng.hxx |3 +-- editeng/source/outliner/outliner.cxx | 18 +- sw/source/core/edit/acorrect.cxx |3 --- 9 files changed, 36 insertions(+), 65 deletions(-) New commits: commit 3447718347c6ffe4135fb3d3faeff367401e25f4 Author: August Sodora Date: Sat Jan 14 15:11:10 2012 -0500 SV_DECL_PTRARR_DEL->std::vector diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index c05b83e..39107a4 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -78,10 +78,6 @@ DBG_NAMEEX( EditEngine ) #define LINE_SEP0x0A -typedef EENotify* EENotifyPtr; -SV_DECL_PTRARR_DEL( NotifyList, EENotifyPtr, 1, 1 )// IMPL is in outliner.cxx, move to EE later and share declaration, or use BlockNotifications from EE directly - - class EditView; class EditEngine; class SvxFontTable; @@ -440,7 +436,7 @@ private: ImplIMEInfos* mpIMEInfos; -NotifyList aNotifyCache; +std::vector aNotifyCache; XubString aWordDelimiters; XubString aGroupChars; diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index b344b3a..a53c670 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -4383,14 +4383,9 @@ sal_Bool ImpEditEngine::DoVisualCursorTraveling( const ContentNode* ) void ImpEditEngine::CallNotify( EENotify& rNotify ) { if ( !nBlockNotifications ) -{ GetNotifyHdl().Call( &rNotify ); -} else -{ -EENotify* pNewNotify = new EENotify( rNotify ); -aNotifyCache.Insert( pNewNotify, aNotifyCache.Count() ); -} +aNotifyCache.push_back(rNotify); } void ImpEditEngine::EnterBlockNotifications() @@ -4416,13 +4411,12 @@ void ImpEditEngine::LeaveBlockNotifications() if ( !nBlockNotifications ) { // Call blocked notify events... -while ( aNotifyCache.Count() ) +while(!aNotifyCache.empty()) { -EENotify* pNotify = aNotifyCache[0]; +EENotify aNotify(aNotifyCache[0]); // Remove from list before calling, maybe we enter LeaveBlockNotifications while calling the handler... -aNotifyCache.Remove( 0 ); -GetNotifyHdl().Call( pNotify ); -delete pNotify; +aNotifyCache.erase(aNotifyCache.begin()); +GetNotifyHdl().Call( &aNotify ); } EENotify aNotify( EE_NOTIFY_BLOCKNOTIFICATION_END ); diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx index 59124b8..14051c3 100644 --- a/editeng/source/outliner/outleeng.hxx +++ b/editeng/source/outliner/outleeng.hxx @@ -31,8 +31,7 @@ #include #include -typedef EENotify* EENotifyPtr; -SV_DECL_PTRARR_DEL( NotifyList, EENotifyPtr, 1, 1 ) +typedef std::vector NotifyList; class OutlinerEditEng : public EditEngine { diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 37a569e..f62cec6 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -2039,8 +2039,6 @@ void Outliner::SetLevelDependendStyleSheet( sal_uInt16 nPara ) pEditEngine->SetParaAttribs( nPara, aOldAttrs ); } -SV_IMPL_PTRARR( NotifyList, EENotifyPtr ); - void Outliner::ImplBlockInsertionCallbacks( sal_Bool b ) { if ( b ) @@ -2054,13 +2052,12 @@ void Outliner::ImplBlockInsertionCallbacks( sal_Bool b ) if ( !bBlockInsCallback ) { // Call blocked notify events... -while ( pEditEngine->aNotifyCache.Count() ) +while(!pEditEngine->aNotifyCache.empty()) { -EENotify* pNotify = pEditEngine->aNotifyCache[0]; +EENotify aNotify(pEditEngine->aNotifyCache.front()); // Remove from list before calling, maybe we enter LeaveBlockNotifications while calling the handler... -pEditEngine->aNotifyCache.Remove( 0 ); -pEditEngine->aOutlinerNotifyHdl.Call( pNotify ); -delete pNotify; + pEditEngine->aNotifyCache.erase(pEditEngine->aNotifyCache.begin()); +pEditEngine->aOutlinerNotifyHdl.Call( &aNotify ); } } } @@ -2069,14 +2066,9 @@ void Outliner::ImplBlockInsertionCallbacks( sal_Bool b ) IMPL_LINK( Outliner, EditEngineNotifyHdl, EENotify*, pNotify ) { if ( !bBlockInsCallback ) -{ pEditEngine->aOutlinerNotifyHdl.Call( pNotify ); -} else -{ -EENotify* pNewNotify = n
[Libreoffice-commits] .: 2 commits - sw/source
sw/source/core/doc/docnew.cxx| 17 +- sw/source/core/frmedt/fefly1.cxx | 228 +++ 2 files changed, 121 insertions(+), 124 deletions(-) New commits: commit 8026d84bcb8078339db4bcaaa38acb79243677c7 Author: Luc Castermans Date: Sat Jan 14 19:53:19 2012 +0100 translated german comments in order to help with bug bug fdo#36681 diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 473f6f3..4cce3c6 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -63,7 +63,7 @@ #include #include #include -#include// Strukturen zum Sichern beim Move/Delete +#include// storage structures for Move/Delete #include #include #include @@ -81,15 +81,15 @@ using ::rtl::OUString; using namespace ::com::sun::star; -//Zum anmelden von Flys in Flys in ... -//definiert in layout/frmtool.cxx +// To register Flys in Flys in ... +// as defined in layout/frmtool.cxx void RegistFlys( SwPageFrm*, const SwLayoutFrm* ); /*** #* Class : SwDoc #* Methode : UseSpzLayoutFmt -#* Beschreibung: Anhand des Request werden zu dem Format entsprechende -#* Aenderungen an den Spezifischen Layouts vorgenommen. +#* Description : based on the request, changes to the specific layouts +#* will be made, to fit to the format #***/ sal_Bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor, @@ -123,16 +123,16 @@ sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, RndStdIds nNew = aNewAnch.GetAnchorId(); const SwFrm *pNewAnch; -//Neuen Anker ermitteln +//determine new anchor Point aTmpPnt( rPt ); switch( nNew ) { -case FLY_AS_CHAR: // sollte der nicht auch mit hinein? +case FLY_AS_CHAR: // also include this? case FLY_AT_PARA: case FLY_AT_CHAR: // LAYER_IMPL { -//Ausgehend von der linken oberen Ecke des Fly den -//dichtesten CntntFrm suchen. +// starting from the upper-left corner of the Fly, +// search nearest CntntFrm const SwFrm* pFrm = rFrm.IsFlyFrm() ? ((SwFlyFrm&)rFrm).GetAnchorFrm() : &rFrm; pNewAnch = ::FindAnchor( pFrm, aTmpPnt ); @@ -145,10 +145,10 @@ sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, SwPosition aPos( *((SwCntntFrm*)pNewAnch)->GetNode() ); if ((FLY_AT_CHAR == nNew) || (FLY_AS_CHAR == nNew)) { -// es muss ein TextNode gefunden werden, denn nur in diesen -// ist ein Inhaltsgebundene Frames zu verankern +// textnode should be found, as only in those +// a content bound frame can be anchored SwCrsrMoveState aState( MV_SETONLYTEXT ); -aTmpPnt.X() -= 1; //nicht im Fly landen!! +aTmpPnt.X() -= 1; // do not land in the fly! if( !pNewAnch->GetCrsrOfst( &aPos, aTmpPnt, &aState ) ) { SwCntntNode* pCNd = ((SwCntntFrm*)pNewAnch)->GetNode(); @@ -164,11 +164,11 @@ sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, case FLY_AT_FLY: // LAYER_IMPL { -//Ausgehend von der linken oberen Ecke des Fly den -//dichtesten SwFlyFrm suchen. +// starting from the upper-left corner of the Fly +// search nearest SwFlyFrm SwCrsrMoveState aState( MV_SETONLYTEXT ); SwPosition aPos( rDoc.GetNodes() ); -aTmpPnt.X() -= 1; //nicht im Fly landen!! +aTmpPnt.X() -= 1; // do not land in the fly! rDoc.GetCurrentLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState ); //swmod 071108//swmod 071225 pNewAnch = ::FindAnchor( aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( rFrm.getRootFrm(), 0, 0, sal_False ), @@ -219,7 +219,7 @@ sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet ) OSL_ENSURE( !(nNew == FLY_AT_PAGE && (FLY_AT_PARA==nOld || FLY_AT_CHAR==nOld || FLY_AS_CHAR==nOld ) && pDoc->IsInHeaderFooter( rOldAnch.GetCntntAnchor()->nNode )), -"Unerlaubter Ankerwechsel in Head/Foot." ); +"forbidden anchor change in Head/Foot." ); #endif return ::lcl_FindAnchorPos( *pDoc, rFly.Frm().Pos(), rFly, rSet ); @@ -229,24 +229,23 @@ void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew ) { SET_CURR_SHELL( this ); -// Wenn es ein neuer Rahmen ist, so soll er selektiert sein. -// !!Rahmen immer selektieren, wenn sie nicht selektiert sind. -// - Es kann ein neuer
[Libreoffice-commits] .: svtools/source
svtools/source/control/valueacc.cxx |2 svtools/source/control/valueimp.hxx |3 svtools/source/control/valueset.cxx | 175 +--- 3 files changed, 68 insertions(+), 112 deletions(-) New commits: commit e4938058e2cc21c705507c365c46f9bfb9ac828c Author: Matteo Casalin Date: Tue Jan 3 14:43:58 2012 +0100 VALUESETITEM_SPACE is never set: remove related code diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index a8a544b..73e2dea 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -444,7 +444,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible { ValueSetItem* pItem = (*mpParent->mpImpl->mpItemList)[ nItemPos ]; -if( ( pItem->meType != VALUESETITEM_SPACE ) && !pItem->maRect.IsEmpty() ) +if( !pItem->maRect.IsEmpty() ) xRet = pItem->GetAccessible( mbIsTransientChildrenDisabled ); } } diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 0a5398d..e393208 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -67,8 +67,7 @@ enum ValueSetItemType VALUESETITEM_NONE, VALUESETITEM_IMAGE, VALUESETITEM_COLOR, -VALUESETITEM_USERDRAW, -VALUESETITEM_SPACE +VALUESETITEM_USERDRAW }; // diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index a8fdbab..cc1d9e6 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -213,9 +213,6 @@ void ValueSet::ImplInitScrollBar() void ValueSet::ImplFormatItem( ValueSetItem* pItem ) { -if ( pItem->meType == VALUESETITEM_SPACE ) -return; - Rectangle aRect = pItem->maRect; WinBits nStyle = GetStyle(); if ( nStyle & WB_ITEMBORDER ) @@ -1078,14 +1075,7 @@ ValueSetItem* ValueSet::ImplGetItem( size_t nPos ) ValueSetItem* ValueSet::ImplGetFirstItem() { -for ( size_t i = 0, nItemCount = mpImpl->mpItemList->size(); i < nItemCount; ++i ) { -ValueSetItem* pItem = (*mpImpl->mpItemList)[ i ]; -if ( pItem->meType != VALUESETITEM_SPACE ) { -return pItem; -} -} - -return NULL; +return mpImpl->mpItemList->size() ? (*mpImpl->mpItemList)[ 0 ] : NULL; } // --- @@ -1098,7 +1088,7 @@ sal_uInt16 ValueSet::ImplGetVisibleItemCount() const { ValueSetItem* pItem = (*mpImpl->mpItemList)[ n ]; -if( pItem->meType != VALUESETITEM_SPACE && !pItem->maRect.IsEmpty() ) +if( !pItem->maRect.IsEmpty() ) nRet++; } @@ -1116,7 +1106,7 @@ ValueSetItem* ValueSet::ImplGetVisibleItem( sal_uInt16 nVisiblePos ) { ValueSetItem* pItem = (*mpImpl->mpItemList)[ n ]; -if( ( pItem->meType != VALUESETITEM_SPACE ) && !pItem->maRect.IsEmpty() && ( nVisiblePos == nFoundPos++ ) ) +if( !pItem->maRect.IsEmpty() && ( nVisiblePos == nFoundPos++ ) ) pRet = pItem; } @@ -1181,7 +1171,7 @@ void ValueSet::ImplTracking( const Point& rPos, sal_Bool bRepeat ) } ValueSetItem* pItem = ImplGetItem( ImplGetItem( rPos ) ); -if ( pItem && (pItem->meType != VALUESETITEM_SPACE) ) +if ( pItem ) { if( GetStyle() & WB_MENUSTYLEVALUESET ) mbHighlight = sal_True; @@ -1209,7 +1199,7 @@ void ValueSet::ImplEndTracking( const Point& rPos, sal_Bool bCancel ) else pItem = ImplGetItem( ImplGetItem( rPos ) ); -if ( pItem && (pItem->meType != VALUESETITEM_SPACE) ) +if ( pItem ) { SelectItem( pItem->mnId ); if ( !mbSelection && !(GetStyle() & WB_NOPOINTERFOCUS) ) @@ -1236,7 +1226,7 @@ void ValueSet::MouseButtonDown( const MouseEvent& rMEvt ) if ( mbSelection ) { mbHighlight = sal_True; -if ( pItem && (pItem->meType != VALUESETITEM_SPACE) ) +if ( pItem ) { mnOldItemId = mnSelItemId; mnHighItemId = mnSelItemId; @@ -1247,7 +1237,7 @@ void ValueSet::MouseButtonDown( const MouseEvent& rMEvt ) } else { -if ( pItem && (pItem->meType != VALUESETITEM_SPACE) && !rMEvt.IsMod2() ) +if ( pItem && !rMEvt.IsMod2() ) { if ( rMEvt.GetClicks() == 1 ) { @@ -1341,67 +1331,44 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt ) switch ( rKEvt.GetKeyCode().GetCode() ) { case KEY_HOME: -if ( mpNoneItem ) -nItemPos = VALUESET_ITEM_NONEITEM; -else -{ -nItemPos = 0; -while ( ImplGetItem( nItemPos )->meType == VALUESETITEM_SPACE ) -nItemPos++; -} +nItemPos = mpNoneItem ? VALUE
[Libreoffice-commits] .: scp2/source
scp2/source/ooo/file_font_ooo.scp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 966a5340e08b68f4ff00633f8de075654feb9c13 Author: Matúš Kukan Date: Sat Jan 14 17:31:56 2012 +0100 scp2: typo: Serif -> Sans diff --git a/scp2/source/ooo/file_font_ooo.scp b/scp2/source/ooo/file_font_ooo.scp index fef7b3b..104f32c 100644 --- a/scp2/source/ooo/file_font_ooo.scp +++ b/scp2/source/ooo/file_font_ooo.scp @@ -101,7 +101,7 @@ STD_FONT_FILE( gid_File_Fnt_LiberationMono_BoldItalic, LiberationMono-BoldItalic #ifndef WITHOUT_FONTS STD_FONT_FILE( gid_File_Fnt_LiberationSans_Regular, LiberationSans-Regular.ttf, Liberation Sans Regular) STD_FONT_FILE( gid_File_Fnt_LiberationSans_Italic, LiberationSans-Italic.ttf, Liberation Sans Italic) -STD_FONT_FILE( gid_File_Fnt_LiberationSans_Bold, LiberationSans-Bold.ttf, Liberation Serif Bold) +STD_FONT_FILE( gid_File_Fnt_LiberationSans_Bold, LiberationSans-Bold.ttf, Liberation Sans Bold) STD_FONT_FILE( gid_File_Fnt_LiberationSans_BoldItalic, LiberationSans-BoldItalic.ttf, Liberation Sans Bold Italic) #endif ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - scp2/source
scp2/source/ooo/file_font_ooo.scp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1d257c38e0ea60d94241e1d397bc8b477b4a94fe Author: Matúš Kukan Date: Sat Jan 14 17:31:56 2012 +0100 scp2: typo: Serif -> Sans diff --git a/scp2/source/ooo/file_font_ooo.scp b/scp2/source/ooo/file_font_ooo.scp index fef7b3b..104f32c 100644 --- a/scp2/source/ooo/file_font_ooo.scp +++ b/scp2/source/ooo/file_font_ooo.scp @@ -101,7 +101,7 @@ STD_FONT_FILE( gid_File_Fnt_LiberationMono_BoldItalic, LiberationMono-BoldItalic #ifndef WITHOUT_FONTS STD_FONT_FILE( gid_File_Fnt_LiberationSans_Regular, LiberationSans-Regular.ttf, Liberation Sans Regular) STD_FONT_FILE( gid_File_Fnt_LiberationSans_Italic, LiberationSans-Italic.ttf, Liberation Sans Italic) -STD_FONT_FILE( gid_File_Fnt_LiberationSans_Bold, LiberationSans-Bold.ttf, Liberation Serif Bold) +STD_FONT_FILE( gid_File_Fnt_LiberationSans_Bold, LiberationSans-Bold.ttf, Liberation Sans Bold) STD_FONT_FILE( gid_File_Fnt_LiberationSans_BoldItalic, LiberationSans-BoldItalic.ttf, Liberation Sans Bold Italic) #endif ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: chart2/source
chart2/source/view/main/ChartView.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c447d9ba8c7d40670c59a9ec9d45f32a36c1efcd Author: Julien Nabet Date: Sat Jan 14 12:33:24 2012 +0100 Some cppcheck cleaning diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 3e5df18..1750879 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1428,7 +1428,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& //use first coosys only so far; todo: calculate for more than one coosys if we have more in future //todo: this is just a workaround at the moment for pie and donut labels bool bIsPieOrDonut = lcl_IsPieOrDonut(xDiagram); -if( !bIsPieOrDonut && rVCooSysList.size() > 0 ) +if( !bIsPieOrDonut && (!rVCooSysList.empty()) ) { VCoordinateSystem* pVCooSys = rVCooSysList[0]; pVCooSys->createMaximumAxesLabels(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: editeng/source oox/source sd/source
editeng/source/editeng/editdbg.cxx |2 +- oox/source/helper/propertymap.cxx| 30 +++--- sd/source/filter/eppt/pptx-epptooxml.cxx | 12 ++-- 3 files changed, 22 insertions(+), 22 deletions(-) New commits: commit fcc8db1d2be9a25f79cbcc14043b495d240bb8bf Author: Matúš Kukan Date: Sat Jan 14 11:30:26 2012 +0100 fix for gcc 4.7: unable to find string literal operator diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index 9389001..fc9c562 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -454,7 +454,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) fprintf( fp, "\n\n" ); fprintf( fp, "\n== EditEngine & Views ==" ); fprintf( fp, "\n" ); -fprintf( fp, "\nControl: %"SAL_PRIxUINT32, pEE->GetControlWord() ); +fprintf( fp, "\nControl: %" SAL_PRIxUINT32, pEE->GetControlWord() ); fprintf( fp, "\nRefMapMode: %i", pEE->pImpEditEngine->pRefDev->GetMapMode().GetMapUnit() ); fprintf( fp, "\nPaperSize: %li x %li", pEE->GetPaperSize().Width(), pEE->GetPaperSize().Height() ); fprintf( fp, "\nMaxAutoPaperSize: %li x %li", pEE->GetMaxAutoPaperSize().Width(), pEE->GetMaxAutoPaperSize().Height() ); diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index b4094eb..af0d374 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -355,9 +355,9 @@ static void lclDumpAnyValue( Any value) } else if( value >>= aMatrix ) { fprintf (stderr,"Matrix\n%f %f %f\n%f %f %f\n%f %f %f\n", aMatrix.Line1.Column1, aMatrix.Line1.Column2, aMatrix.Line1.Column3, aMatrix.Line2.Column1, aMatrix.Line2.Column2, aMatrix.Line2.Column3, aMatrix.Line3.Column1, aMatrix.Line3.Column2, aMatrix.Line3.Column3); } else if( value >>= intValue ) -fprintf (stderr,"%"SAL_PRIdINT32"(hex: %"SAL_PRIxUINT32")\n", intValue, intValue); +fprintf (stderr,"%" SAL_PRIdINT32 "(hex: %" SAL_PRIxUINT32 ")\n", intValue, intValue); else if( value >>= uintValue ) -fprintf (stderr,"%"SAL_PRIdINT32"(hex: %"SAL_PRIxUINT32")\n", uintValue, uintValue); +fprintf (stderr,"%" SAL_PRIdINT32 "(hex: %" SAL_PRIxUINT32 ")\n", uintValue, uintValue); else if( value >>= int16Value ) fprintf (stderr,"%d(hex: %x)\n", int16Value, int16Value); else if( value >>= uint16Value ) @@ -502,7 +502,7 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0) return "Any (str)"; } else if( value >>= strArray ) { printLevel (level); -fprintf (stderr,"Sequence< OUString > aStringSequence (%"SAL_PRIdINT32");\n", strArray.getLength()); +fprintf (stderr,"Sequence< OUString > aStringSequence (%" SAL_PRIdINT32 ");\n", strArray.getLength()); for( int i=0; i>= propArray ) { printLevel (level); -fprintf (stderr,"Sequence< PropertyValue > aPropSequence (%"SAL_PRIdINT32");\n", propArray.getLength()); +fprintf (stderr,"Sequence< PropertyValue > aPropSequence (%" SAL_PRIdINT32 ");\n", propArray.getLength()); for( int i=0; i>= propArrayArray ) { printLevel (level); -fprintf (stderr,"Sequence< Sequence < PropertyValue > > aPropSequenceSequence (%"SAL_PRIdINT32");\n", propArrayArray.getLength()); +fprintf (stderr,"Sequence< Sequence < PropertyValue > > aPropSequenceSequence (%" SAL_PRIdINT32 ");\n", propArrayArray.getLength()); for( int i=0; i>= adjArray ) { printLevel (level); -fprintf (stderr,"Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (%"SAL_PRIdINT32");\n", adjArray.getLength()); +fprintf (stderr,"Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (%" SAL_PRIdINT32 ");\n", adjArray.getLength()); for( int i=0; i>= segArray ) { printLevel (level); -fprintf (stderr, "Sequence< EnhancedCustomShapeSegment > aSegmentSeq (%"SAL_PRIdINT32");\n", segArray.getLength()); +fprintf (stderr, "Sequence< EnhancedCustomShapeSegment > aSegmentSeq (%" SAL_PRIdINT32 ");\n", segArray.getLength()); for( int i=0; i>= segTextFrame ) { printLevel (level); -fprintf (stderr, "Sequence< EnhancedCustomShapeTextFrame > aTextFrameSeq (%"SAL_PRIdINT32");\n", segTextFrame.getLength()); +fprintf (stderr, "Sequence< EnhancedCustomShapeTextFrame > aTextFrameSeq (%" SAL_PRIdINT32 ");\n", segTextFrame.getLength()); for( int i=0; i>=
[Libreoffice-commits] .: sw/source writerperfect/source
sw/source/core/crsr/findfmt.cxx |2 +- sw/source/core/layout/ftnfrm.cxx |2 +- sw/source/core/layout/pagechg.cxx |2 +- sw/source/filter/ww8/ww8par6.cxx |2 +- writerperfect/source/filter/FontStyle.cxx |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 79eb7c0cab7a7b4e0583e9582ad5e7f9e81af7d7 Author: Julien Nabet Date: Sat Jan 14 11:29:07 2012 +0100 Some cppcheck cleaning diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx index 058a5f4..7902ab5 100644 --- a/sw/source/core/crsr/findfmt.cxx +++ b/sw/source/core/crsr/findfmt.cxx @@ -59,7 +59,7 @@ sal_Bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove, while( !bFound && 0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ))) { -if( 0 != ( bFound = pNode->GetFmtColl() == &rFmt )) +if( 0 != ( bFound = (pNode->GetFmtColl() == &rFmt) )) { // wurde die FormatCollection gefunden, dann handelt es sich auf // jedenfall um einen SwCntntNode !! diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 1b4a14e..d485bc1 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -3008,7 +3008,7 @@ sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss ) sal_Bool bSameBoss = sal_True; SwFtnBossFrm * const pNewBoss = pNewUpper->FindFtnBossFrm(); //Wechseln wir die Spalte/Seite? -if ( sal_False == ( bSameBoss = pNewBoss == pOldBoss ) ) +if ( sal_False == ( bSameBoss = (pNewBoss == pOldBoss) ) ) { bSamePage = pOldBoss->FindPageFrm() == pNewBoss->FindPageFrm(); // Seitenwechsel? pNewUpper->Calc(); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 79d7d1b..55fdefe 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -246,7 +246,7 @@ SwPageFrm::SwPageFrm( SwFrmFmt *pFmt, SwFrm* pSib, SwPageDesc *pPgDsc ) : //Body-Bereich erzeugen und einsetzen, aber nur wenn ich nicht gerade //eine Leerseite bin. SwDoc *pDoc = pFmt->GetDoc(); -if ( sal_False == (bEmptyPage = pFmt == pDoc->GetEmptyPageFmt()) ) +if ( sal_False == (bEmptyPage = (pFmt == pDoc->GetEmptyPageFmt())) ) { bEmptyPage = sal_False; Calc(); //Damit die PrtArea stimmt. diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 4db2f04..e83b262 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -1540,7 +1540,7 @@ bool SwWW8ImplReader::SetFlyBordersShadow(SfxItemSet& rFlySet, static void FlySecur1(short& rSize, const bool bBorder) { short nMin = MINFLY + -bBorder ? MAX_BORDER_SIZE : MAX_EMPTY_BORDER; +(bBorder ? MAX_BORDER_SIZE : MAX_EMPTY_BORDER); if ( rSize < nMin ) rSize = nMin; diff --git a/writerperfect/source/filter/FontStyle.cxx b/writerperfect/source/filter/FontStyle.cxx index b2d0080..7e94b4a 100644 --- a/writerperfect/source/filter/FontStyle.cxx +++ b/writerperfect/source/filter/FontStyle.cxx @@ -61,7 +61,7 @@ void FontStyleManager::writeFontsDeclaration(OdfDocumentHandler *pHandler) const { TagOpenElement("office:font-face-decls").write(pHandler); std::map, ltstr>::const_iterator iter; -for (iter = mStyleHash.begin(); iter != mStyleHash.end(); iter++) +for (iter = mStyleHash.begin(); iter != mStyleHash.end(); ++iter) { (iter->second)->write(pHandler); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
sc/source/ui/inc/anyrefdg.hxx | 23 +++--- sc/source/ui/miscdlgs/anyrefdg.cxx | 80 ++--- 2 files changed, 49 insertions(+), 54 deletions(-) New commits: commit 4163074e53603f5a068b9b066cfcf840b593b236 Author: David Tardon Date: Fri Jan 13 07:53:08 2012 +0100 refactor slightly to avoid link problems with gcc 4.7 Signed-off-by: David Tardon diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 8bca700..afd98e4 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -121,7 +121,6 @@ class SC_DLLPUBLIC ScRefHandler : //public SfxModelessDialog, public: operator Window *(){ return &m_rWindow; } Window * operator ->() { return static_cast(*this); } -template friend class ScRefHdlrImplBase; friend classformula::RefButton; friend classformula::RefEdit; @@ -152,6 +151,9 @@ protected: boolParseWithNames( ScRangeList& rRanges, const String& rStr, ScDocument* pDoc ); +void preNotify(const NotifyEvent& rEvent, const bool bBindRef); +void stateChanged(const StateChangedType nStateChange, const bool bBindRef); + public: ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW, Window* pParent, sal_uInt16 nResId*/, bool bBindRef ); @@ -222,6 +224,20 @@ ScRefHdlrImplBase::ScRefHdlrImplBase( TParentWindow* pParent, template ScRefHdlrImplBase::~ScRefHdlrImplBase(){} +template +long ScRefHdlrImplBase::PreNotify( NotifyEvent& rNEvt ) +{ +ScRefHandler::preNotify( rNEvt, bBindRef ); +return TWindow::PreNotify( rNEvt ); +} + +template +void ScRefHdlrImplBase::StateChanged( StateChangedType nStateChange ) +{ +TWindow::StateChanged( nStateChange ); +ScRefHandler::stateChanged( nStateChange, bBindRef ); +} + // template struct ScRefHdlrImpl: ScRefHdlrImplBase @@ -257,11 +273,6 @@ inline bool ScRefHandler::CanInputDone( sal_Bool bForced ) return m_aHelper.CanInputDone( bForced ); } -template <> SC_DLLPUBLIC void ScRefHdlrImplBase::StateChanged( StateChangedType nStateChange ); -template <> SC_DLLPUBLIC long ScRefHdlrImplBase::PreNotify( NotifyEvent& rNEvt ); -template <> SC_DLLPUBLIC void ScRefHdlrImplBase::StateChanged( StateChangedType nStateChange ); -template <> SC_DLLPUBLIC long ScRefHdlrImplBase::PreNotify( NotifyEvent& rNEvt ); - #endif // SC_ANYREFDG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 25e2f12..42942f2 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -868,54 +868,38 @@ void ScRefHandler::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* m_aHelper.ToggleCollapsed( pEdit, pButton ); } -#if defined( _MSC_VER ) -#define INTRODUCE_TEMPLATE -#else -#define INTRODUCE_TEMPLATE template <> -#endif - -#define IMPL_TWINDOW_PRENOTIFY( TWindow,bBindRef ) \ -INTRODUCE_TEMPLATE long ScRefHdlrImplBase::PreNotify( NotifyEvent& rNEvt )\ -{\ -if( bBindRef || m_bInRefMode )\ -{\ -sal_uInt16 nSwitch=rNEvt.GetType();\ -if(nSwitch==EVENT_GETFOCUS)\ -{\ -pActiveWin=rNEvt.GetWindow();\ -}\ -}\ -return TWindow::PreNotify(rNEvt);\ -} - -#define IMPL_TWINDOW_STATECHANGED( TWindow,bBindRef ) \ -INTRODUCE_TEMPLATE void ScRefHdlrImplBase::StateChanged( StateChangedType nStateChange )\ -{\ -TWindow::StateChanged( nStateChange );\ -\ -if( !bBindRef && !m_bInRefMode ) return;\ -\ -if(nStateChange == STATE_CHANGE_VISIBLE)\ -{\ -if(m_rWindow.IsVisible())\ -{\ -m_aHelper.enableInput( false );\ -m_aHelper.EnableSpreadsheets();\ -m_aHelper.SetDispatcherLock( sal_True );\ -aTimer.Start();\ -}\ -else\ -{\ -m_aHelper.enableInput( sal_True );\ -m_aHelper.SetDispatcherLock( false ); /*//! here and in DoClose ?*/\ -}\ -}\ -} - -IMPL_TWINDOW_PRENOTIFY( SfxModelessDialog, true ) -IMPL_TWINDOW_PRENOTIFY( SfxTabDialog, false ) -IMPL_TWINDOW_STATECHANGED( SfxModelessDialog, true ) -IMPL_TWINDOW_STATECHANGED( SfxTabDialog, false ) +void ScRefHandler::preNotify(const NotifyEvent& rNEvt, const bool bBindRef) +{ +if( bBindRef || m_bInRefMode ) +{ +sal_uInt16 nSwitch=rNEvt.GetType(); +if(nSwitch==EVENT_GETFOCUS) +{ +pActiveWin=rNEvt.GetWindow(); +} +} +} + +void ScRefHandler::stateChanged(const StateChangedType nStateChange, const bool bBindRef) +{ +if( !bBindRef && !m_bInRefMode ) return; + +if(nStateChange == STATE_CHANGE_VISIBLE) +{ +if(m_rWindow.IsVisible()) +{ +m_aHelper.enableInput( false ); +