[Libreoffice-commits] core.git: Branch 'feature/gsoc-calc-enhanced-db-range' - sc/inc sc/source

Akash Shetye shetyeakash at gmail.com
Thu Jun 6 11:03:19 PDT 2013


 sc/inc/dbdataformatting.hxx              |   49 +++++++++++++++++
 sc/source/core/tool/dbdataformatting.cxx |   89 +++++++++++++++++++++++++++++++
 2 files changed, 138 insertions(+)

New commits:
commit 8fa7417df19079ea30382fb85bcb672025b445ff
Author: Akash Shetye <shetyeakash at gmail.com>
Date:   Thu Jun 6 12:19:51 2013 +0530

    Adds formatting class to hold stylesheet names for alternating rows and cols.
    
    ScDBDataFormatting is added to hold the style sheet names for ScDBData's alternating rows and columns.
    
    Change-Id: I3416f8cc56bf0a2afd7fde17039dc17bb6743a55
    Reviewed-on: https://gerrit.libreoffice.org/4178
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/inc/dbdataformatting.hxx b/sc/inc/dbdataformatting.hxx
new file mode 100644
index 0000000..d1897ad
--- /dev/null
+++ b/sc/inc/dbdataformatting.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef SC_DBDATAFORMATTING_HXX
+#define SC_DBDATAFORMATTING_HXX
+
+#include "rtl/ustring.hxx"
+
+class ScDBDataFormatting
+{
+    private:
+        OUString maFirstRowStripeStyle;
+        OUString maSecondRowStripeStyle;
+        OUString maFirstColStripeStyle;
+        OUString maSecondColStripeStyle;
+        bool bBandedRows;
+        bool bBandedColumns;
+    public:
+        ScDBDataFormatting(const OUString& rFirstRowStripeStyle, const OUString& rSecondRowStripeStyle, const OUString& rFirstColStripeStyle, const OUString& rSecondColStripeStyle);
+        void SetBandedRows( bool bBRows );
+        bool GetBandedRows();
+        void SetBandedColumns( bool bBCols );
+        bool GetBandedColumns();
+        const OUString& GetFirstRowStripeStyle() const;
+        const OUString& GetSecondRowStripeStyle() const;
+        const OUString& GetFirstColStripeStyle() const;
+        const OUString& GetSecondColStripeStyle() const;
+        void SetFirstRowStripeStyle( const OUString& aStyleName );
+        void SetSecondRowStripeStyle( const OUString& aStyleName );
+        void SetFirstColStripeStyle( const OUString& aStyleName );
+        void SetSecondColStripeStyle( const OUString& aStyleName );
+};
+
+#endif
diff --git a/sc/source/core/tool/dbdataformatting.cxx b/sc/source/core/tool/dbdataformatting.cxx
new file mode 100644
index 0000000..1a84eb0
--- /dev/null
+++ b/sc/source/core/tool/dbdataformatting.cxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "dbdataformatting.hxx"
+#include "rtl/ustring.hxx"
+
+ScDBDataFormatting::ScDBDataFormatting(const OUString& rFirstRowStripeStyle, const OUString& rSecondRowStripeStyle, const OUString& rFirstColStripeStyle, const OUString& rSecondColStripeStyle) :
+maFirstRowStripeStyle    ( rFirstRowStripeStyle),
+maSecondRowStripeStyle   ( rSecondRowStripeStyle ),
+maFirstColStripeStyle    ( rFirstColStripeStyle ),
+maSecondColStripeStyle   ( rSecondColStripeStyle )
+{
+}
+
+void ScDBDataFormatting::SetBandedRows( bool bBRows )
+{
+    bBandedRows = bBRows;
+}
+
+bool ScDBDataFormatting::GetBandedRows()
+{
+    return bBandedRows;
+}
+
+void ScDBDataFormatting::SetBandedColumns( bool bBCols )
+{
+    bBandedColumns = bBCols;
+}
+
+bool ScDBDataFormatting::GetBandedColumns()
+{
+    return bBandedColumns;
+}
+
+const OUString& ScDBDataFormatting::GetFirstRowStripeStyle() const
+{
+    return maFirstRowStripeStyle;
+}
+
+const OUString& ScDBDataFormatting::GetSecondRowStripeStyle() const
+{
+    return maSecondRowStripeStyle;
+}
+
+const OUString& ScDBDataFormatting::GetFirstColStripeStyle() const
+{
+    return maFirstColStripeStyle;
+}
+
+const OUString& ScDBDataFormatting::GetSecondColStripeStyle() const
+{
+    return maSecondColStripeStyle;
+}
+
+void ScDBDataFormatting::SetFirstRowStripeStyle( const OUString& aStyleName )
+{
+    maFirstRowStripeStyle = aStyleName;
+}
+
+void ScDBDataFormatting::SetSecondRowStripeStyle( const OUString& aStyleName )
+{
+    maSecondRowStripeStyle = aStyleName;
+}
+
+void ScDBDataFormatting::SetFirstColStripeStyle( const OUString& aStyleName )
+{
+    maFirstColStripeStyle = aStyleName;
+}
+
+void ScDBDataFormatting::SetSecondColStripeStyle( const OUString& aStyleName )
+{
+    maSecondColStripeStyle = aStyleName;
+}


More information about the Libreoffice-commits mailing list