Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4178
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/78/4178/1
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
---
A sc/inc/dbdataformatting.hxx
A sc/source/core/tool/dbdataformatting.cxx
2 files changed, 138 insertions(+), 0 deletions(-)
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;
+}
--
To view, visit https://gerrit.libreoffice.org/4178
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3416f8cc56bf0a2afd7fde17039dc17bb6743a55
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: feature/gsoc-calc-enhanced-db-range
Gerrit-Owner: Akash Shetye <shetyeakash@gmail.com>
Context
- [PATCH feature/gsoc-calc-enhanced-db-range] Adds formatting class to hold stylesheet names for alternati... · Akash Shetye (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.